Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install packages that should be updated #4986

Merged
merged 1 commit into from May 11, 2018

Conversation

drpaneas
Copy link
Contributor

@drpaneas drpaneas commented May 7, 2018

Some maintenance incidents contain packages which are not
pre-installed in MicroOS. In order to update them, we first
have to install them.

@pdostal
Copy link
Member

pdostal commented May 7, 2018

It looks good to me! Everything's understandable and the output is easy to access and read from the openqa webui 👍

[-r] Just reboot cluster test" 1>&2
exit 1
}

while getopts "s:cr" opt; do
while getopts ":s:c:u:r:i:" opt; do
Copy link
Contributor

Choose a reason for hiding this comment

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

: marks options that expect an argument. (When you want getopts to expect an argument for an option, just place a : (colon) after the proper option flag). Please fix or point me to documentation saying otherwise.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You are right. I misunderstood the documentation.

@@ -34,6 +42,13 @@ case $opt in
esac
done

# Make sure that Salt master container is running
Copy link
Contributor

@kravciak kravciak May 9, 2018

Choose a reason for hiding this comment

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

This is already handled by set -exuo pipefail and script would fail on next line.
But if you want it, keep it - it might prevent some issues in future.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I will prefer keeping it because it failed in one of my local tests.

$runner "zypper lr UPDATE | grep Enabled"

# Reboot the cluster
where="-P roles:(admin|kube-(master|minion))"
Copy link
Contributor

Choose a reason for hiding this comment

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

I am not sure how salt handles cases when you reboot salt-master together with all minions.
Can it happen that admin reboots before (master|minion) and reboot command won't be processed on all nodes?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Seems to work fine in my local testing.

switch_to 'velum';
}

# Check that update changed system as expected
sub check_update_changes {
my $admin = 'admin.openqa.test';
Copy link
Contributor

Choose a reason for hiding this comment

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

You can define my $admin for whole module (~line 25) - but it's fine if you prefer this way


# Install packages that should be updated - poo#114205
if (is_caasp('qam')) {
assert_script_run "ssh $admin './update.sh -i $repo' | tee /dev/$serialdev | grep EXIT_OK", 600;
Copy link
Contributor

Choose a reason for hiding this comment

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

$repo parameter is not used by update.sh script. The same applies to -u $repo below, it should be just -u

@kravciak
Copy link
Contributor

kravciak commented May 9, 2018

Please fix parameter parsing (:s:c:u:r:i:) and double check if "$srun $where system.reboot" works - otherwise it looks good (you can ignore other comments)

@drpaneas drpaneas force-pushed the prepare_to_update branch 2 times, most recently from 4141e10 to ae28919 Compare May 9, 2018 13:16
Some maintenance incidents contain packages which are not
pre-installed in MicroOS. In order to update them, we first
have to install them.
@drpaneas
Copy link
Contributor Author

Last verification run with the changes: http://skyrim.qam.suse.de/tests/2926#

All seems to be fine. Let's merge it.

@rwx788 rwx788 merged commit 56ab301 into os-autoinst:master May 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants