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 1507848 - katello-change-hostname should remove last_scenario.yml only after success of installer
Summary: katello-change-hostname should remove last_scenario.yml only after success of...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: satellite-change-hostname
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Jonathon Turel
QA Contact: Peter Ondrejka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-10-31 10:00 UTC by Peter Ondrejka
Modified: 2019-09-26 16:11 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Known Issue
Doc Text:
Satellite Installer requires absolute paths. Always provide an absolute path for --certs-tar. For example, /root/new.name-certs.tar. If you run the installer with a relative path, run the installer again with the absolute path and the --scenario parameter to create the last_scenario.yml.
Clone Of:
Environment:
Last Closed: 2018-02-21 16:54:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 21517 0 Normal Closed katello-change-hostname should remove last_scenario.yml only after success of installer 2021-02-05 22:57:56 UTC

Description Peter Ondrejka 2017-10-31 10:00:00 UTC
Some time ago I filed http://projects.theforeman.org/issues/21079, it's currently in backlog, but I'd like it to be revisited due to issues related to https://bugzilla.redhat.com/show_bug.cgi?id=1466688#c14 

The above bug forces the installer and hence k-c-h to require a full path on certs tar. If you don't do this on the first try, there is no second try due to deleted last_scenario.yml

Example rename session on 6.3 capsule:

]# satellite-change-hostname new.name.com -u admin -p changeme --certs-tar new.name-certs.tar
...
[ INFO 2017-10-31 05:17:16 verbose] Running installer with args [["--scenario", "capsule", "-v", "--foreman-proxy-register-in-foreman", "false", "--foreman-proxy-content-certs-tar", "new.name.com-certs.tar", "--disable-system-checks"]]
[ERROR 2017-10-31 05:17:16 verbose] Parameter foreman-proxy-content-certs-tar invalid: new.name.com-certs.tar is not one of regexes matching /^(([a-zA-Z]:[\\\/])|([\\\/][\\\/][^\\\/]+[\\\/][^\\\/]+)|([\\\/][\\\/]\?[\\\/][^\\\/]+))/ or regexes matching /^\/([^\/\0]+\/*)+$/

now retrying with full path:

]# satellite-change-hostname new.name.com -u admin -p changeme --certs-tar /root/new.name-certs.tar
/usr/share/katello/helper.rb:4:in `readlink': No such file or directory - /etc/foreman-installer/scenarios.d/last_scenario.yaml (Errno::ENOENT)
	from /usr/share/katello/helper.rb:4:in `last_scenario'
	from /usr/share/katello/hostname-change.rb:21:in `initialize'
	from /usr/sbin/satellite-change-hostname:20:in `new'
	from /usr/sbin/satellite-change-hostname:20:in `<main>'


So if 1466688 is not fixed, we need to (a) update docs (will file a bug), (b) make sure there is an option to retry (this bug)

Comment 3 Brad Buckingham 2017-10-31 12:57:24 UTC
Workarounds:

1. always provide an absolute path for --certs-tar (e.g. /root/new.name-certs.tar)

2. re-run the installer with --scenario parameter to re-create the last_scenario.yml

Comment 4 John Mitsch 2017-10-31 14:40:10 UTC
If I understand correctly, there are two issues - certs tar needing an absolute path and last_scenario file being deleted, so you can't retry k-c-h.

For the absolute path issue, it should be fixed by:
https://bugzilla.redhat.com/show_bug.cgi?id=1466688
upstream PR - https://github.com/Katello/katello-installer/pull/542

Brad, can we pull this into 6.3? (I realize it won't make the beta)

Peter
For the deleting last_scenario issue, a simple solution that we can do now is 
- move last_scenario.yml instead of deleting it
- run through k-c-h
- if k-c-h fails, have a cleanup that moves last_scenario back

I can work on a PR to do this, thanks for raising the issue

Comment 5 Brad Buckingham 2017-10-31 14:57:50 UTC
We aligned it to 6.3 GA earlier this morning, so goal should be to include it.

Comment 6 John Mitsch 2017-10-31 15:02:11 UTC
Sorry I meant this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1466688

Can we pull this BZ into 6.3?

Comment 7 John Mitsch 2017-10-31 15:06:46 UTC
Created redmine issue http://projects.theforeman.org/issues/21517 from this bug

Comment 8 Brad Buckingham 2017-11-01 19:14:32 UTC
The bug referenced in comment 6 has been aligned to 6.3.

Comment 9 Stephen Wadeley 2017-11-15 09:15:17 UTC
Hello

Re the need for absolute paths

what do you think of this: https://bugzilla.redhat.com/show_bug.cgi?id=1466688#c15

Comment 10 Satellite Program 2018-01-25 23:14:36 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/21517 has been resolved.

Comment 14 Satellite Program 2018-02-21 16:54:17 UTC
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:0336


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