Skip to content

Clarify precedence and expected behaviour of image-related flags on mgrpxy install/update/ptf commands #639

@rjpmestre

Description

@rjpmestre

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-image overriding everything?
  • Is --scc-registry supposed 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:

  1. If --httpd-image is provided with a domain, use it as-is.
  2. Define the image name:
    . . Default is proxy-httpd
    . . If --httpd-image is provided without a domain, use it as the image name.
  3. If --registry is set, append the image name to it.
  4. If --scc-registry is set (and --registry is not), append image name to it.
  5. 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-image w/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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions