Project

General

Profile

Bug #21517

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

Added by John Mitsch 10 months ago. Updated about 1 month ago.

Status:
Closed
Priority:
Normal
Category:
Tooling
Target version:
Difficulty:
easy
Triaged:
Yes
Bugzilla link:
Team Backlog:
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

Has duplicate Katello - Bug #21252: katello-change-hostname- doesn't delete last scenario fileClosed2017-10-09

History

#1 Updated by John Mitsch 10 months ago

  • Is duplicate of Bug #21252: katello-change-hostname- doesn't delete last scenario file added

#2 Updated by John Mitsch 10 months ago

  • Is duplicate of deleted (Bug #21252: katello-change-hostname- doesn't delete last scenario file)

#3 Updated by John Mitsch 10 months ago

  • Has duplicate Bug #21252: katello-change-hostname- doesn't delete last scenario file added

#4 Updated by Justin Sherrill 10 months ago

  • Legacy Backlogs Release (now unused) set to 114
  • Category set to Tooling
  • Subject changed from katello-change-hostname should remove last_scenario.yml only after success of installer to katello-change-hostname should remove last_scenario.yml only after success of installer

#5 Updated by Jonathon Turel 7 months ago

  • Difficulty set to easy
  • Assignee set to Jonathon Turel
  • Status changed from New to Assigned

#6 Updated by Jonathon Turel 7 months ago

  • Legacy Backlogs Release (now unused) changed from 114 to 329
  • Target version set to 242

#7 Updated by The Foreman Bot 7 months ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman-packaging/pull/2110 added

#8 Updated by Brad Buckingham 7 months ago

  • Target version changed from 242 to 245

#9 Updated by Justin Sherrill 7 months ago

  • Legacy Backlogs Release (now unused) changed from 329 to 339

#10 Updated by Jonathon Turel 7 months ago

  • Status changed from Ready For Testing to Closed

#11 Updated by John Mitsch 5 months ago

  • Legacy Backlogs Release (now unused) changed from 339 to 338

Also available in: Atom PDF