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.
Bug 1866929 - Satellite Hostname Change fails due to an error causing incorrect update to /etc/hosts
Summary: Satellite Hostname Change fails due to an error causing incorrect update to /...
Keywords:
Status: CLOSED DUPLICATE of bug 1861831
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Installation
Version: 6.8.0
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: 6.8.0
Assignee: satellite6-bugs
QA Contact: Devendra Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-08-06 20:32 UTC by Kedar Kulkarni
Modified: 2020-08-10 14:56 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-08-10 14:56:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Kedar Kulkarni 2020-08-06 20:32:02 UTC
Created attachment 1710701 [details]
Log messages when /etc/hosts is modified

Description of problem:
When trying to change hostname of Satellite, it incorrectly modifies /etc/hosts as follows:

Original:
10.1.3.104 dhcp-3-57.vms.sat.rdu2.redhat.com dhcp-3-104.vms.sat.rdu2.redhat.com
Modified: 
10.1.3.104 dhcp-3-104.vms.sat.rdu2.redhat.com dhcp-3-104.vms.sat.rdu2.redhat.com



Version-Release number of selected component (if applicable):
6.8.0 Snap 11

How reproducible:
100%

Steps to Reproduce:
1.Install Satellite 
2.Modify /etc/hosts by hand to include old hostname and new(desired) hostname as shown above in original section above. 
3.Run hostname change command. 

satellite-change-hostname <new-hostname> -u admin -p "changeme" -y

Actual results:

Failure, stderr:

No Match for argument: dhcp-3-140.vms.sat.rdu2.redhat.com-tomcat*
/usr/share/katello/hostname-change.rb:378:in `restore_last_scenario_yaml': undefined method `path' for nil:NilClass (NoMethodError)
	from /usr/share/katello/hostname-change.rb:533:in `block in run'
	from /usr/share/katello/helper.rb:59:in `run_cmd'
	from /usr/share/katello/hostname-change.rb:530:in `run'
	from /usr/sbin/satellite-change-hostname:23:in `<main>'

Expected results:
Hostname change should succeed without errors.

Additional info:
As I stated earlier, /etc/hosts file gets modified in the process of hostname change and that seems to be a possible reason for failure or related to failure somehow.

Comment 3 Zach Huntington-Meath 2020-08-10 14:56:35 UTC

*** This bug has been marked as a duplicate of bug 1861831 ***


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