Skip to content

Remove salt podman login#1927

Open
NamelessOne91 wants to merge 1 commit into
uyuni-project:masterfrom
NamelessOne91:remove_salt_podman_login
Open

Remove salt podman login#1927
NamelessOne91 wants to merge 1 commit into
uyuni-project:masterfrom
NamelessOne91:remove_salt_podman_login

Conversation

@NamelessOne91
Copy link
Copy Markdown
Contributor

@NamelessOne91 NamelessOne91 commented Oct 6, 2025

What does this PR change?

uyuni-tools should now be able to work out of the box with an authenticated registry.
There are 2 cases:

  • When the registry is registry.suse.com, --scc-user and --scc-password are used
  • For custom registries (such as registry.suse.de) you need to specify --registry-user and --registry--password.

The value for these flag can also be provided through a config file ( as we do).

@NamelessOne91 NamelessOne91 self-assigned this Oct 6, 2025
@NamelessOne91 NamelessOne91 requested a review from a team as a code owner October 6, 2025 19:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes the manual podman login command from the Salt state and instead configures registry authentication through the mgradm configuration file, allowing uyuni-tools to handle authentication automatically.

Changes:

  • Added registry user and password configuration to mgradm.yaml config file
  • Removed manual podman login command from install_podman.sls Salt state

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
salt/server_containerized/mgradm.yaml Added conditional registry authentication configuration using cc_username and cc_password grains
salt/server_containerized/install_podman.sls Removed manual podman login command that was previously executed during setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

{%- if grains.get('container_repository') %}
registry:
host: {{ grains.get('container_repository') }}
{% if grains.get('cc_username') %}
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removed podman login command had a guard clause to skip authentication for 'paygo' product versions. The new registry authentication configuration in mgradm.yaml (lines 16-19) doesn't have a similar guard. If paygo versions should not have registry authentication, consider adding a check like: {% if 'paygo' not in grains.get('product_version') | default('', true) and grains.get('cc_username') %}

Suggested change
{% if grains.get('cc_username') %}
{% if 'paygo' not in grains.get('product_version') | default('', true) and grains.get('cc_username') %}

Copilot uses AI. Check for mistakes.
registry:
host: {{ grains.get('container_repository') }}
{% if grains.get('cc_username') %}
user: {{ grains.get('cc_username') }}
Copy link

Copilot AI Jan 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inconsistent quote usage for grains.get(). Line 17 uses single quotes for 'cc_username', but line 18 uses double quotes for "cc_password". For consistency, both should use the same quote style, preferably matching the rest of the file which predominantly uses double quotes (e.g., lines 8-9, 11-12).

Suggested change
user: {{ grains.get('cc_username') }}
user: {{ grains.get("cc_username") }}

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants