Bug 1383189 - openshift_upgrade_nodes_serial doesn't work in nodes upgrade
Summary: openshift_upgrade_nodes_serial doesn't work in nodes upgrade
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cluster Version Operator
Version: 3.3.1
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Jason DeTiberus
QA Contact: Anping Li
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-10 06:55 UTC by Anping Li
Modified: 2016-11-22 22:29 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-22 22:29:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
upgradenode.logs2 (663.52 KB, text/plain)
2016-10-10 06:55 UTC, Anping Li
no flags Details

Description Anping Li 2016-10-10 06:55:02 UTC
Created attachment 1208736 [details]
upgradenode.logs2

Description of problem:

upgrade nodes failed for "ERROR! Unexpected Exception: invalid literal for int() with base 10: '{{ openshift_upgrade_nodes_serial | default(1) }}'"


Version-Release number of selected component (if applicable):
ansible-2.2.0-0.5.prerelease.el7.noarch
openshift-ansible-3.3.32-1

How reproducible:
always

Steps to Reproduce:
1. install OCP 3.2 1 master + 2 nodes
2. run playbook upgrade_control_plane.yml
3. run playbook upgrade_nodes.yml and openshift_upgrade_nodes_serial
   ansible-playbook /root/openshift-ansible/playbooks/byo/openshift-cluster/upgrades/v3_3/upgrade_nodes.yml -e openshift_upgrade_nodes_serial=2 -v |& tee upgradeplane.logs

Actual results:

TASK [debug] *******************************************************************
task path: /root/openshift-ansible/playbooks/common/openshift-cluster/upgrades/cleanup_unused_images.yml:21
skipping: [openshift-121.lab.eng.nay.redhat.com] => {
    "changed": false, 
    "skip_reason": "Conditional check failed", 
    "skipped": true
}
skipping: [openshift-127.lab.eng.nay.redhat.com] => {
    "changed": false, 
    "skip_reason": "Conditional check failed", 
    "skipped": true
}
skipping: [openshift-125.lab.eng.nay.redhat.com] => {
    "changed": false, 
    "skip_reason": "Conditional check failed", 
    "skipped": true
}
ERROR! Unexpected Exception: invalid literal for int() with base 10: '{{ openshift_upgrade_nodes_serial | default(1) }}'
the full traceback was:

Traceback (most recent call last):
  File "/usr/bin/ansible-playbook", line 97, in <module>
    exit_code = cli.run()
  File "/usr/lib/python2.7/site-packages/ansible/cli/playbook.py", line 154, in run
    results = pbex.run()
  File "/usr/lib/python2.7/site-packages/ansible/executor/playbook_executor.py", line 147, in run
    result = self._tqm.run(play=play)
  File "/usr/lib/python2.7/site-packages/ansible/executor/task_queue_manager.py", line 233, in run
    max_serial = max([pct_to_int(x, num_hosts) for x in serial_items])
  File "/usr/lib/python2.7/site-packages/ansible/utils/helpers.py", line 33, in pct_to_int
    return int(value)
ValueError: invalid literal for int() with base 10: '{{ openshift_upgrade_nodes_serial | default(1) }}'



Expected results:


Additional info:

Comment 1 Devan Goodwin 2016-10-13 13:51:01 UTC
Was this with ansible-2.2.0-0.5.prerelease.el7.noarch or ansible-2.2.0-0.50.prerelease.el7.noarch?

The 0.50 build appears to be what went out with 3.3 repos.

I recall seeing this error while working on the serial upgrade vars, and I recall an ansible upgrade fixing it. 

Also Anping you marked a bunch of upgrade bugs as blocked by this, are you seeing errors if you *do not* specify openshift_upgrade_nodes_serial as well? (i.e. can you work around by just not using serial node upgrade)

Comment 2 Devan Goodwin 2016-10-13 17:23:48 UTC
Anping: confirmed, this is a bug in ansible-2.2.0-0.5.prerelease.el7.noarch, it is fixed in 0.50, the latest 3.3 build.

Comment 3 Anping Li 2016-10-14 01:50:38 UTC
Yes, 0.50 works with openshift-ansible-3.3.35-1, so move to verified.


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