Bug 1440213

Summary: openstack minor update - list_updates=$(yum list updates) never returns empty string
Product: Red Hat OpenStack Reporter: Alex Schultz <aschultz>
Component: openstack-tripleo-heat-templatesAssignee: Alex Schultz <aschultz>
Status: CLOSED ERRATA QA Contact: Gurenko Alex <agurenko>
Severity: high Docs Contact:
Priority: unspecified    
Version: 10.0 (Newton)CC: achernet, akaris, aschultz, dmacpher, jschluet, mburns, ohochman, rhel-osp-director-maint, sclewis, slinaber
Target Milestone: rcKeywords: Triaged
Target Release: 11.0 (Ocata)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-heat-templates-6.0.0-10.el7ost Doc Type: Bug Fix
Doc Text:
A bug in the overcloud package update script caused cluster services to always restart even if no packages were available for update. This fix corrects the check that determines if there are pending package updates. If no packages updates are available, the yum update script exits and does not restart cluster services.
Story Points: ---
Clone Of: 1439952
: 1440217 (view as bug list) Environment:
Last Closed: 2017-05-17 20:18:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1439952    
Bug Blocks: 1440217    

Description Alex Schultz 2017-04-07 15:11:23 UTC
Cloned for OSP11

+++ This bug was initially created as a clone of Bug #1439952 +++

Description of problem:
openstack minor update - list_updates=$(yum list updates) never returns empty string

/usr/share/openstack-tripleo-heat-templates/extraconfig/tasks/yum_update.sh
~~~
(...)
list_updates=$(yum list updates)

if [[ "$list_updates" == "" ]]; then
    echo "No packages require updating"
    exit 0
fi
(...)
~~~

The if condition never fulfills!

This can be easily tested:
~~~
[root@undercloud-4 ~]# list_updates=$(yum list updates)
[root@undercloud-4 ~]# echo $list_updates
Loaded plugins: search-disabled-repos
~~~

Expected results:
This should be `yum -q list updates`, and the if condition will be reached

Additional info:

Comment 4 errata-xmlrpc 2017-05-17 20:18:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2017:1245