Bug #21517

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

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

Status:Closed
Priority:Normal
Assigned To:Jonathon Turel
Category:Tooling
Target version:Team Brad - Iteration 27
Difficulty:easy Pull request:https://github.com/theforeman/foreman-packaging/pull/2110
Bugzilla link:1507848 Found in Katello release:
Story points-
Velocity based estimate-
ReleaseKatello 3.7.0Release relationshipAuto

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

Duplicated by Katello - Bug #21252: katello-change-hostname- doesn't delete last scenario file Closed 10/09/2017

History

#1 Updated by John Mitsch 7 months ago

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

#2 Updated by John Mitsch 7 months ago

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

#3 Updated by John Mitsch 7 months ago

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

#4 Updated by Justin Sherrill 7 months ago

  • Release set to Katello Backlog
  • 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 4 months ago

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

#6 Updated by Jonathon Turel 4 months ago

  • Release changed from Katello Backlog to Katello 3.5.1
  • Target version set to Team Brad - Iteration 26

#7 Updated by The Foreman Bot 4 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 4 months ago

  • Target version changed from Team Brad - Iteration 26 to Team Brad - Iteration 27

#9 Updated by Justin Sherrill 4 months ago

  • Release changed from Katello 3.5.1 to Katello 3.5.2

#10 Updated by Jonathon Turel 4 months ago

  • Status changed from Ready For Testing to Closed

#11 Updated by John Mitsch about 1 month ago

  • Release changed from Katello 3.5.2 to Katello 3.7.0

Also available in: Atom PDF