Bug 1440213 - openstack minor update - list_updates=$(yum list updates) never returns empty string
Summary: openstack minor update - list_updates=$(yum list updates) never returns empty...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 10.0 (Newton)
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: rc
: 11.0 (Ocata)
Assignee: Alex Schultz
QA Contact: Gurenko Alex
URL:
Whiteboard:
Depends On: 1439952
Blocks: 1440217
TreeView+ depends on / blocked
 
Reported: 2017-04-07 15:11 UTC by Alex Schultz
Modified: 2018-03-05 13:11 UTC (History)
10 users (show)

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.
Clone Of: 1439952
: 1440217 (view as bug list)
Environment:
Last Closed: 2017-05-17 20:18:57 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2017:1245 normal SHIPPED_LIVE Red Hat OpenStack Platform 11.0 Bug Fix and Enhancement Advisory 2017-05-17 23:01:50 UTC
OpenStack gerrit 456358 None None None 2017-04-12 19:01:34 UTC
Launchpad 1680634 None None None 2017-04-07 15:11:22 UTC

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


Note You need to log in before you can comment on or make changes to this bug.