Bug 2215746 - capsule-installer is no longer used while running satellite-change-hostname
Summary: capsule-installer is no longer used while running satellite-change-hostname
Keywords:
Status: POST
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: satellite-change-hostname
Version: 6.11.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: satellite6-bugs
QA Contact: Lukas Pramuk
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-06-18 09:55 UTC by mithun kalyat
Modified: 2023-06-30 00:20 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SAT-18567 0 None None None 2023-06-22 10:45:27 UTC

Description mithun kalyat 2023-06-18 09:55:52 UTC
Description of problem:

satellite-change-hostname still uses to 'capsule-installer'

Version-Release number of selected component (if applicable):
 
Red Hat Satellite 6.12

How reproducible:

[root@old-capsule]# satellite-change-hostname capsule.example.com --username redhat --password redhat --certs-tar /root/capsule.exampe.com-certs.tar
Checking for certs tarball

Checking hostname validity

***WARNING*** This script will modify your system.
You will need to re-register any capsule clients registered to this system after script completion.
 Have you taken the necessary precautions (backups, snapshots, etc...)?
Proceed with changing your hostname? [y/n]
y
Precheck passed
updating hostname in /etc/hostname
setting hostname
checking if hostname was changed
stopping services
removing old cert rpms
No packages marked for removal.
deleting old certs
backed up /var/www/html/pub to /var/www/html/pub/old-capsule.example.com-20230602162832.backup
updating hostname in /etc/hosts
updating hostname in foreman installer scenarios
backing up last_scenario.yaml
removing last_scenario.yaml
re-running the installer
capsule-installer --scenario capsule -v --disable-system-checks --foreman-proxy-register-in-foreman false --certs-tar-file /root/capsule.example.com-certs.tar
restoring last_scenario.yaml
cleaning up temporary files
ERROR: capsule-installer is no longer used.  Please use 'satellite-installer --scenario capsule'.
       For more information on available options, include '--help'.

  Something went wrong with the Capsule installer.
  Please check the above output and the corresponding logs.
  
  Once the issue is resolved you may complete the hostname change by running: 'capsule-installer --scenario capsule -v --disable-system-checks'
  and completing the following steps:
You will have to update the Name and URL of the Smart Proxy in Capsule to the new hostname.



Failed 'capsule-installer --scenario capsule -v --disable-system-checks --foreman-proxy-register-in-foreman false --certs-tar-file /root/capsule.example.com-certs.tar' with exit code 1
[root@capsule ~]

Need to run the command manually to complete the process.

root@old-capsule ~]# satellite-installer --scenario capsule --disable-system-checks --foreman-proxy-register-in-foreman false --certs-tar-file /root/capsule.example.com-certs.tar
2023-06-02 16:31:09 [NOTICE] [root] Loading installer configuration. This will take some time.
2023-06-02 16:31:21 [NOTICE] [root] Running installer with log based terminal output at level NOTICE.
2023-06-02 16:31:21 [NOTICE] [root] Use -l to set the terminal output log level to ERROR, WARN, NOTICE, INFO, or DEBUG. See --full-help for definitions.
2023-06-02 16:31:23 [WARN  ] [pre] Skipping system checks.
2023-06-02 16:31:23 [WARN  ] [pre] Skipping system checks.
2023-06-02 16:31:32 [NOTICE] [configure] Starting system configuration.
2023-06-02 16:31:47 [NOTICE] [configure] 250 configuration steps out of 2064 steps complete.
2023-06-02 16:31:47 [NOTICE] [configure] 500 configuration steps out of 2064 steps complete.
2023-06-02 16:31:47 [NOTICE] [configure] 750 configuration steps out of 2064 steps complete.
2023-06-02 16:31:48 [NOTICE] [configure] 1000 configuration steps out of 2064 steps complete.
2023-06-02 16:31:55 [NOTICE] [configure] 1250 configuration steps out of 2066 steps complete.
2023-06-02 16:31:58 [NOTICE] [configure] 1500 configuration steps out of 2071 steps complete.
2023-06-02 16:31:59 [NOTICE] [configure] 1750 configuration steps out of 2075 steps complete.
2023-06-02 16:32:13 [NOTICE] [configure] 2000 configuration steps out of 2077 steps complete.
2023-06-02 16:32:20 [NOTICE] [configure] System configuration has finished.
  Success!
  * Capsule is running at https://capsule.example.com:9090

  The full log is at /var/log/foreman-installer/capsule.log

What is the business impact? Please also provide timeframe information.
Need to rename server as the name is too long for Active Directory naming.  Unable to use capsule in this state.

Comment 4 Evgeni Golov 2023-06-29 06:39:56 UTC
Hah!

So this was fixed upstream in https://github.com/theforeman/foreman-packaging/commit/0bf35df06809da38bf539acad69a24a655cc8e6a and is fixed there since Katello 4.6

It was then backported to 6.11 (Katello 4.3) in https://gitlab.cee.redhat.com/satellite/satellite-packaging/-/commit/71a6eeb72e5e349435fd87218931c69d4806358f
But not to 6.12 (Katello 4.5).

It's again fixed in 6.13+ as no backport is necessary.

Cancelling 6.13.z+ and 6.14.0+ flags, adding 6.12.z?


Note You need to log in before you can comment on or make changes to this bug.