Bug 1613063

Summary: Entering 'no' to exit the minor update of the overcloud appears to actually complete the update
Product: Red Hat OpenStack Reporter: Darin Sorrentino <dsorrent>
Component: openstack-tripleo-commonAssignee: Jiri Stransky <jstransk>
Status: CLOSED ERRATA QA Contact: Raviv Bar-Tal <rbartal>
Severity: high Docs Contact:
Priority: high    
Version: 10.0 (Newton)CC: ccamacho, dvd, flfuchs, hbrock, jpichon, jslagle, jstransk, marjones, mburns, mgeary, rbartal, sathlang, sgolovat, slinaber
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-tripleo-common-5.4.7-7.el7ost Doc Type: Bug Fix
Doc Text:
Previously, when you entered 'no' option in the CLI prompt to cancel a minor update, the update did not cancel and actually completed on all servers. With this update, to avoid an unexpected outcome, the 'no' option is absent.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-04-30 16:58:51 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:

Description Darin Sorrentino 2018-08-06 22:20:18 UTC
Description of problem:

When executing the minor update of the overcloud, we perform 2 steps:

Plan update
Actual update

When we do the actual update, if we enter no which is supposed to cancel the update, it appears to actually still perform an update:

[stack@pbnec1-l-rh-ucld-0 ~]$ openstack overcloud update stack -i pbnec1
starting package update on stack pbnec1
IN_PROGRESS
WAITING
on_breakpoint: [u'pbnec1-l-rh-cmp-0', u'pbnec1-l-rh-ocld-0', u'pbnec1-l-rh-cmp-1', u'pbnec1-l-rh-ocld-1', u'pbnec1-l-rh-ocld-2']
Breakpoint reached, continue? Regexp or Enter=proceed (will clear f19a1617-438b-4381-821a-b999cbadf151), no=cancel update, C-c=quit interactive mode: no
canceling update, doing rollback
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
IN_PROGRESS
COMPLETE
update finished with status COMPLETE
[stack@pbnec1-l-rh-ucld-0 ~]$

Examining the overcloud nodes after this shows that the updated kernel RPM that we saw on the Satellite was installed even though we said not to continue the update.
 

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

yum update all run on nodes even though we said not to update them

Expected results:

Cancelling the update on the first node should exit with no changes to anything.

Additional info:

Comment 3 Jiri Stransky 2018-08-13 13:01:49 UTC
(I guess this was minor update on OSP 10 as OSP 13 uses different upgrade workflow, so i'm retargeting the BZ to 10.)

Thomas, do you think it's somehow possible to tell Heat to really stop all operations on the stack (OSP 10)? The current code which attempts to do the cancellation of update [1] seems to not really cancel the stack-update, rather it somehow completes it.

I wonder if this is possible to implement with Heat in OSP 10 or if we should at least remove the `no=cancel update` option from the CLI to not confuse users.

Similar bug in OSP 11: bug 1427153. It's closed/currentrelease because OSP 13 has Ansible-based updates framework, which doesn't suffer from this issue.

[1] https://github.com/openstack/tripleo-common/blob/ac5e3fc860fbbde41a347bf2fe55838228e6dc88/tripleo_common/_stack_update.py#L81-L86

Comment 4 Thomas Hervé 2018-09-03 11:43:32 UTC
I suspect the issue comes from the cancel followed by the breakpoints clear. In itself cancel-update should work. It certainly lacks testing though.

The options here are trying to fix the behavior, or remove the option. I'd be happy to investigate the issue given an environment.

Comment 5 Sofer Athlan-Guyot 2018-09-04 12:58:36 UTC
The bz#1389115 is for similar behavior in osp9.

Comment 19 Raviv Bar-Tal 2019-04-04 11:55:54 UTC
The "no=cancle" option was removed from cli options,

the cli now looks like:
"
[stack@undercloud-0 ~]$ openstack overcloud update stack -i overcloud
starting package update on stack overcloud
IN_PROGRESS
IN_PROGRESS
WAITING
on_breakpoint: [u'compute-0', u'controller-0']
Breakpoint reached, continue? Regexp or Enter=proceed (will clear 5f12fa0d-5ef5-419a-a2b1-072343e458a6), C-c=quit interactive mode:  
"

Comment 21 errata-xmlrpc 2019-04-30 16:58:51 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/RHBA-2019:0921