Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1457914 - [3.4] upgrade get applied to all nodes if openshift_upgrade_nodes_label fits no label
[3.4] upgrade get applied to all nodes if openshift_upgrade_nodes_label fits ...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Upgrade (Show other bugs)
3.4.1
Unspecified Unspecified
medium Severity high
: ---
: 3.4.z
Assigned To: Russell Teague
Anping Li
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-01 10:07 EDT by Carsten Lichy-Bittendorf
Modified: 2017-06-29 09:33 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Verifies the provided label matches a set of hosts prior to upgrading. If the label didn't match hosts, the upgrade would silently proceed with upgrading all nodes given the logic for creating the oo_nodes_to_upgrade group.
Story Points: ---
Clone Of:
: 1462992 1462995 (view as bug list)
Environment:
Last Closed: 2017-06-29 09:33:14 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1666 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix and enhancement 2017-06-29 13:32:39 EDT

  None (edit)
Description Carsten Lichy-Bittendorf 2017-06-01 10:07:35 EDT
Description of problem:
running the upgrade playbook with option 'openshift_upgrade_nodes_label' all nodes get migrated if no label matches. This is very risky as due to a typo suddenly all nodes could get migrated at once.

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

How reproducible:


Steps to Reproduce:
1. Setup OCP 3.3 cluster
2. try to upgrade a single node by running: 
ansible-playbook /usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.yml \
    -e openshift_upgrade_nodes_serial='100%' \
    -e openshift_upgrade_nodes_label='kubernetes.io/hostname=some.hostneme.which.doesn't.fit'

Actual results:
all nodes get migrated

Expected results:
no node should get migrated, if no label matches

Additional info:
Comment 6 Russell Teague 2017-06-19 15:35:33 EDT
Proposed for 3.6: https://github.com/openshift/openshift-ansible/pull/4498
Comment 7 Russell Teague 2017-06-19 15:58:15 EDT
Proposed for 3.4: https://github.com/openshift/openshift-ansible/pull/4500
Comment 8 Russell Teague 2017-06-21 11:52:00 EDT
Merged: https://github.com/openshift/openshift-ansible/pull/4500
Comment 10 Anping Li 2017-06-27 00:24:15 EDT
The expected message is reported. so move to verified.

TASK [Fail if no nodes match openshift_upgrade_nodes_label] ********************
fatal: [openshift-225.lab.eng.nay.redhat.com]: FAILED! => {
    "changed": false, 
    "failed": true
}

MSG:

openshift_upgrade_nodes_label was specified but no nodes matched
	to retry, use: --limit @/usr/share/ansible/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_4/upgrade_nodes.retry
Comment 12 errata-xmlrpc 2017-06-29 09:33:14 EDT
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-2017:1666

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