Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1507848 - katello-change-hostname should remove last_scenario.yml only after success of installer
katello-change-hostname should remove last_scenario.yml only after success of...
Status: CLOSED ERRATA
Product: Red Hat Satellite 6
Classification: Red Hat
Component: satellite-change-hostname (Show other bugs)
6.3.0
Unspecified Unspecified
unspecified Severity high (vote)
: GA
: Unused
Assigned To: Jonathon Turel
Peter Ondrejka
: Triaged
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-31 06:00 EDT by Peter Ondrejka
Modified: 2018-02-21 11:54 EST (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-02-21 11:54:17 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 21517 None None None 2017-10-31 11:06 EDT

  None (edit)
Description Peter Ondrejka 2017-10-31 06:00:00 EDT
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 08:57:24 EDT
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 10:40:10 EDT
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 10:57:50 EDT
We aligned it to 6.3 GA earlier this morning, so goal should be to include it.
Comment 6 John Mitsch 2017-10-31 11:02:11 EDT
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 11:06:46 EDT
Created redmine issue http://projects.theforeman.org/issues/21517 from this bug
Comment 8 Brad Buckingham 2017-11-01 15:14:32 EDT
The bug referenced in comment 6 has been aligned to 6.3.
Comment 9 Stephen Wadeley 2017-11-15 04:15:17 EST
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 pm-sat@redhat.com 2018-01-25 18:14:36 EST
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 pm-sat@redhat.com 2018-02-21 11:54:17 EST
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.