Bug 1298525

Summary: using restart service plus message instead of system restart if ansible task is running on masters
Product: OpenShift Container Platform Reporter: Anping Li <anli>
Component: Cluster Version OperatorAssignee: Andrew Butcher <abutcher>
Status: CLOSED WONTFIX QA Contact: Anping Li <anli>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.1.0CC: abutcher, aos-bugs, bleanhar, jokerman, mmccomas
Target Milestone: ---Keywords: UpcomingRelease
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-15 15:30:09 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:

Description Anping Li 2016-01-14 10:46:47 UTC
Description of problem:
For system rolling restart. I can't see the warning message.  I also have no way to abort the 'system restart'. 


Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.0.29-1

How reproducible:
always

Steps to Reproduce:
1. in inventory file: set openshift_rolling_restart_mode=system
2. ansible-playbook -i /root/config/ose31nativeha /root/openshift-ansible/playbooks/byo/openshift-master/restart.yml

Actual results:
Masters were restart by rolling. But there are no window to display warning message and the user can't abort 'system restart'

Expected results:
1)  The following message should be received by all Terminal.
Warning: Running playbook from a host that will be restarted!
        Press CTRL+C and A to abort playbook execution. You may
        continue by pressing ENTER but the playbook will stop
        executing once this system restarts and services must be
        manually verified.
        
2) There is time for admin to abort 'system restart'


Additional info:

Comment 2 Andrew Butcher 2016-01-14 14:05:18 UTC
Are you running ansible from a host outside the cluster or on a host which will be rebooted as part of the rolling restart? The message should only be shown when running the playbook from a host that will be rebooted, such as the first master.

Comment 3 Anping Li 2016-01-15 02:11:48 UTC
(In reply to Andrew Butcher from comment #2)
> Are you running ansible from a host outside the cluster or on a host which
> will be rebooted as part of the rolling restart? The message should only be
> shown when running the playbook from a host that will be rebooted, such as
> the first master.

Oh,I am running outside masters. Will try to run on master soon.

Comment 4 Anping Li 2016-01-15 06:10:44 UTC
Andrew, yes, the warning message works well if the ansible is running on masters.  
On question is about the post step if Enter is press. Could you just restart service rather than restart system?

Comment 5 Andrew Butcher 2016-01-15 15:30:09 UTC
We will continue with system restarts if the user decides to continue since they configured openshift_rolling_restart_mode=system, but we'll the update the message and call attention to the openshift_rolling_restart_mode variable, letting the user know they can change the restart method to 'services' and relaunch the playbook.