-
Notifications
You must be signed in to change notification settings - Fork 26
Description
The interaction between image-related flags such as --httpd-image, --registry, and --scc-registry is not fully clear.
One can assume certain things. And that leads to different users report conflicting expectations, especially when combinations of these flags are used.
While users can assume a few things, this often leads to conflicting expectations, especially when multiple flags are used in combination. We've seen this confusion reflected in Bugzilla reports and internal feedback.
To improve readability, let’s assume the following conditions for all examples below:
- Command:
mgrpxy support ptf podman - Default registry:
registry.suse.com/suse/manager/5.0/x86_64 - Flags:
--ptf AAA --user a123
Examples of Expected Behavior
Each of the following uses a single image-related flag and shows the expected resolved image:
mgrpxy support ptf podman
# → registry.suse.com/a/a123/AAA/suse/manager/5.0/x86_64/proxy-httpd
mgrpxy support ptf podman --scc-registry my.scc.registry/suse/manager/5.0/x86_64
# → my.scc.registry/suse/manager/5.0/x86_64/proxy-httpd
mgrpxy support ptf podman --registry some.other.domain/suse/suse/manager/5.0/x86_64
# → some.other.domain/a/a123/AAA/suse/manager/5.0/x86_64/proxy-httpd
mgrpxy support ptf podman --httpd-image httpd.specific.domain/suse/suse/manager/5.0/x86_64/proxy-httpd
# → httpd.specific.domain/suse/suse/manager/5.0/x86_64/proxy-httpd
A non-documented but seemingly supported behavior is when --httpd-image provides only a name or relative path, which is then appended to the selected registry:
mgrpxy support ptf podman --httpd-image other-proxy-httpd
# → registry.suse.com/a/a123/AAA/suse/manager/5.0/x86_64/other-proxy-httpd
mgrpxy support ptf podman --httpd-image some/path/other-proxy-httpd
# → registry.suse.com/a/a123/AAA/suse/manager/5.0/x86_64/some/path/other-proxy-httpd
Ambiguity in Combined Usage
Now consider this case, which includes all three image-related flags:
mgrpxy support ptf podman \
--registry some.other.domain/suse/suse/manager/5.0/x86_64 \
--scc-registry my.scc.registry/suse/manager/5.0/x86_64 \
--httpd-image httpd.specific.domain/suse/suse/manager/5.0/x86_64/proxy-httpd
At this point, it's no longer clear:
- Which registry is used?
- Is
--httpd-imageoverriding everything? - Is
--scc-registrysupposed to be used in combination with user/pass for auth purposed, or does it affect image resolution?
Assumed Precedence Logic
We suggest making this precedence logic explicit and documented:
- If
--httpd-imageis provided with a domain, use it as-is. - Define the image name:
. . Default isproxy-httpd
. . If--httpd-imageis provided without a domain, use it as the image name. - If
--registryis set, append the image name to it. - If
--scc-registryis set (and --registry is not), append image name to it. - If no registry flags are set, use the built-in default registry and append the image name.
#Problem Summary
- Users don’t know which flags override others when multiple are set.
- There’s no clear documentation of fallback/precedence behavior.
- Inconsistent behavior when using
--httpd-imagew/o domain. - Some of this flags might not even be relevant for other commands (like install and update).
Suggested Actions
- Define the set of flags required for each command
- Document the flag precedence order clearly
- Improve help text to explain how each flag affects image resolution.
- Ensure explicit warnings if conflicting flags are set or precedence is ambiguous.
- Centralizing as possible the image resolution logic in the codebase so all commands behave identically.