Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
This is to avoid bad tool usage as currently its possible to change the hostname with hostnamectl and then execute katello-change-hostname which leads to the error:
Error: smart_proxy not found
Couldn't find default Capsule id
Failed 'hammer -u admin -p changeme --output json capsule info --name old-hostname' with exit code 70
Version-Release number of selected component (if applicable):
Satellite 6.2.14
Satellite 6.2.15
How reproducible:
Change satellite hostname with hostnamectl and then run katello-change-hostname
Steps to Reproduce:
1. hostnameclt set-hostname katello.example.com
2. katello-change-hostname katello.example.com -u admin -p XXX (will fail with above)
Changing to the old hostname with hostnamectl so katello-change-hostname can pass:
3. hostnamectl set-hostname test2.example.com
4. katello-change-hostname katello.example.com -u admin -p XXX (will pass)
Mongo will contain old hostname:
5. > db.event_listeners.find()
{ "_id" : ObjectId("5b0ff0b0226fa42c34df85b1"), "notifier_config" : { "url" : "https://test2.example.com/katello/api/v2/repositories/sync_complete?token=....
Actual results:
katello-change-hostname will run when hostname was already changed with hostnamectl which produces error.
Expected results:
Add check to find out if new hostname used with katello-change-hostname is matching with current hostname from hostnamectl. It should not match, if it does it should error out and not proceed further.
Verified with satellite 6.4 snap 20
satellite-change-hostname ... -u admin -p xxx
The hostname specified must be different from the current hostname. If you have changed the hostname with another utility, please change it back to the original hostname before running this tool.
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHSA-2018:2927
Description of problem: This is to avoid bad tool usage as currently its possible to change the hostname with hostnamectl and then execute katello-change-hostname which leads to the error: Error: smart_proxy not found Couldn't find default Capsule id Failed 'hammer -u admin -p changeme --output json capsule info --name old-hostname' with exit code 70 Version-Release number of selected component (if applicable): Satellite 6.2.14 Satellite 6.2.15 How reproducible: Change satellite hostname with hostnamectl and then run katello-change-hostname Steps to Reproduce: 1. hostnameclt set-hostname katello.example.com 2. katello-change-hostname katello.example.com -u admin -p XXX (will fail with above) Changing to the old hostname with hostnamectl so katello-change-hostname can pass: 3. hostnamectl set-hostname test2.example.com 4. katello-change-hostname katello.example.com -u admin -p XXX (will pass) Mongo will contain old hostname: 5. > db.event_listeners.find() { "_id" : ObjectId("5b0ff0b0226fa42c34df85b1"), "notifier_config" : { "url" : "https://test2.example.com/katello/api/v2/repositories/sync_complete?token=.... Actual results: katello-change-hostname will run when hostname was already changed with hostnamectl which produces error. Expected results: Add check to find out if new hostname used with katello-change-hostname is matching with current hostname from hostnamectl. It should not match, if it does it should error out and not proceed further.