Katello / katello-packaging

[DEPRECATED] Packaging for Katello
7 stars 33 forks source link

[WIP] Fixes #20430 - katello-change-hostname performs installer dry-run #491

Closed johnpmitsch closed 6 years ago

johnpmitsch commented 7 years ago

The installer will do a dry run in the precheck to check for potential problems before making changes.

theforeman-bot commented 7 years ago

Issues: #20430

johnpmitsch commented 7 years ago

@ehelms updated

johnpmitsch commented 7 years ago

@ehelms which do we want to do?

dry run of the installer (exit if it fails)
update hostname on system + remove certs
real run of the installer

or

update hostname on the system + remove certs
dry run of the installer (exit if it fails)
real run of the installer

My concern with the second option is there would be permanent changes. However, with the first option, the dry run of the installer isn't as thorough of a check.

johnpmitsch commented 7 years ago

@ehelms Apologies for the stream of consciousness, but here is what I'm thinking for the hostname-change pre-check

update hostname on system
move certs to files/folders in a directory we create in /tmp
Perform dry run of the installer
if dry run is successful:
  continue with change hostname script, which will run the actual installer
else:
  move certs back to appropriate location
  change system hostname back to the old hostname
  fail out of script w/ error

I think this will be the most robust way to check if the installer will succeed when running katello-change hostname while preventing irreversable changes from happening to user's systems. Curious to hear your thoughts

theforeman-bot commented 7 years ago

@johnpmitsch, this pull request is currently not mergeable. Please rebase against the master branch and push again.

If you have a remote called 'upstream' that points to this repository, you can do this by running:

    $ git pull --rebase upstream master

This message was auto-generated by Foreman's prprocessor

ehelms commented 6 years ago

@johnpmitsch planning to revisit this?

johnpmitsch commented 6 years ago

I am closing this as the dry run of the installer would fail sometimes and the actual run would pass. I am working on another "cleanup" solution.