Skip to content
This repository has been archived by the owner on Aug 29, 2018. It is now read-only.

fixes #19622 - adds error if backup directory missing #450

Merged
merged 1 commit into from Jul 10, 2017

Conversation

cfouant
Copy link
Member

@cfouant cfouant commented May 22, 2017

No description provided.

Copy link
Contributor

@johnpmitsch johnpmitsch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than one comment, works well

`tar --selinux --overwrite --listed-incremental=/dev/null -xzf config_files.tar.gz -C /`
`foreman-installer --scenario katello --reset`
run_cmd "tar --selinux --overwrite --listed-incremental=/dev/null -xzf config_files.tar.gz -C /"
run_cmd("foreman-installer --scenario katello --reset", [0,6])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since foreman-installer --reset has a y/n confirmation that will stall out this script, I had to pipe yes into the command:
run_cmd("yes | foreman-installer --scenario katello --reset", [0,6])

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is actually working upstream on the latest snaps, I'd like to merge this one, and hopefully get a flag written to the foreman-installer to bypass this issue versus having to temporarily pipe yes. Are you okay to ACK or do you really want those changes in now?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cfouant By latest snaps do you mean 3.4?

Since this command is currently broken in master, my thought is to do this to avoid any issues:

  • use "yes" workaround in this PR
  • fix in foreman-installer with -y flag or similar
  • remove "yes" workaround once foreman-installer flag can be used

@cfouant
Copy link
Member Author

cfouant commented Jun 27, 2017

@johnpmitsch could you okay the requested changes so this PR goes green?

@cfouant cfouant force-pushed the restore-error branch 2 times, most recently from 1143f23 to 2152227 Compare June 27, 2017 18:37
installer = "yes | foreman-installer -v --reset"
if @foreman_proxy_content
run_cmd("tar --selinux --overwrite --listed-incremental=/dev/null -xzf config_files.tar.gz -C /")
installer = "yes | foreman-installer -v --reset" if @foreman_proxy_content
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this if @foreman_proxy_content should be moved to the next line

fatal: [192.168.121.46]: FAILED! => {"changed": true, "cmd": ["/katello-packaging/katello/katello-restore", "-y", "-d", "/backup/katello-backup-20170627192411"], "delta": "0:00:00.043689", "end": "2017-06-27 19:26:41.618141", "failed": true, "rc": 1, "start": "2017-06-27 19:26:41.574452", "stderr": "/katello-packaging/katello/katello-restore:67: warning: else without rescue is useless\n/katello-packaging/katello/katello-restore:74: syntax error, unexpected keyword_end, expecting end-of-input", "stdout": "", "stdout_lines": [], "warnings": []}

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes. rebasing--

@johnpmitsch johnpmitsch merged commit 1ca7edf into Katello:master Jul 10, 2017
@cfouant cfouant deleted the restore-error branch October 3, 2017 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants