Skip to content

Add SYSTEM_UPDATE option for atomic hosts#310

Merged
jprovaznik merged 3 commits intomasterfrom
unknown repository
Dec 12, 2016
Merged

Add SYSTEM_UPDATE option for atomic hosts#310
jprovaznik merged 3 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link
Copy Markdown

@ghost ghost commented Dec 9, 2016

If system_update is set to false, atomic is still being updated.

@ghost ghost closed this Dec 9, 2016
@ghost ghost reopened this Dec 9, 2016
Comment thread fragments/host-update.sh Outdated
then
# Update the OS tree
atomic host upgrade || notify_failure "failed to run 'atomic host upgrade'"
[ "$SYSTEM_UPDATE" = "True" ] && (atomic host upgrade || notify_failure "failed to run 'atomic host upgrade'")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good catch. One nit, because [ "$SYSTEM_UPDATE" = "True" ] is checked in both branches of "if-then-else", it would be better to move "[ "$SYSTEM_UPDATE" = "True" ]" in front of the if statement, something like:

[ "$SYSTEM_UPDATE" = "True" ] || exit 0

if [ -e /run/ostree-booted ]
then
# Update the OS tree
atomic host upgrade || notify_failure "failed to run 'atomic host upgrade'"
else
# Update using traditional RPMs
retry yum install -y deltarpm || notify_failure "could not install deltarpm"
retry yum -y update || notify_failure "could not update RPMs"
fi

@ghost
Copy link
Copy Markdown
Author

ghost commented Dec 12, 2016

OK done :)

@jprovaznik
Copy link
Copy Markdown
Contributor

Cool, also a wrong indentation sneaked in in the "if" branch, could you fix it and squash commits to one?

@jprovaznik jprovaznik merged commit 41bce70 into redhat-openstack:master Dec 12, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant