Skip to content

Upgrade command needs to get the existing that FQDN #765

Description

@rjmateus

During installation, the user can provide an FQDN to be used as the server name and to generate the certificates. If the FQDN is not passed, it will call the command hostname -f [1]

The upgrade command doesn't receive the FQDN as a parameter, but it needs the FQDN to compute the certificates. Since not FQDN is passed, it always use the command call hostname -f, which may not return the wanted FQDN to use.
It's used in the context of DB certificate generation [2] (needed also for MLM 5.1) but also in the context of the new TFTP container [3] (needed for 5.2)

The update process must use the same FQDN as the one that was installed before. We must improve our code base for the upgrade process to look for the configured FQDN and use it, instead of collecting it using the cmd call.

The alternative solution (but not user-friendly) of allowing the user to pass the FQDN when calling the upgrade would be error-prone and redundant, since we already have that value on the rhn.conf, and the same value must be used.

[1] https://github.com/uyuni-project/uyuni-tools/blob/main/shared/utils/utils.go#L418-L433
[2] https://github.com/uyuni-project/uyuni-tools/blob/main/mgradm/shared/podman/podman.go#L441
[3] https://github.com/uyuni-project/uyuni-tools/blob/main/mgradm/shared/podman/podman.go#L504

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions