yum check-update in redhat/centos lxc container creation fails if updates are available

Bug #1850940 reported by Jeff Albert
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack-Ansible
New
Undecided
Unassigned

Bug Description

During LXC container creation, a bash script is built to prep the container environment with platform-specific actions.

https://github.com/openstack/openstack-ansible-lxc_container_create/blob/stable/rocky/templates/container-setup.sh.j2

One of those actions for RedHat/CentOS is a `yum check-update`, followed immediately by a full `yum -y update` to actually apply updates that are available.

https://github.com/openstack/openstack-ansible-lxc_container_create/blob/stable/rocky/vars/redhat-7.yml#L44

However, the output of check-update is never used, and it by design returns a non-zero return code if updates are available to be installed, which means the script fails because it implements `set -ev`, which fails the whole script if any subcommand fails.

The `yum check-update` command is superfluous in this action set, and I think should be removed.

Revision history for this message
Jeff Albert (jralbert) wrote :

Argh, moments too late I discovered this change, which does the removal I'm proposing, in the stein branch:

https://github.com/openstack/openstack-ansible-lxc_container_create/commit/b15b97fa0ab73579e4939ae767a2810196b33df2#diff-0dc9e326c64f4a15341a43e16b94ee60

Can/should this be backported to Rocky?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.