Project

General

Profile

Actions

Bug #21517

closed

katello-change-hostname should remove last_scenario.yml only after success of installer

Added by John Mitsch about 7 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Tooling
Target version:
Difficulty:
easy
Triaged:
Fixed in Releases:
Found in Releases:

Description

Cloned from https://bugzilla.redhat.com/show_bug.cgi?id=1507848

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:

]# katello-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)


Related issues 1 (0 open1 closed)

Has duplicate Katello - Bug #21252: katello-change-hostname- doesn't delete last scenario fileClosedJohn Mitsch10/09/2017Actions
Actions

Also available in: Atom PDF