gate-quickstart role failing depends-on 'UnboundLocalError: local variable 'remote_head' referenced before assignment'

Bug #1655757 reported by Harry Rybacki
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo-quickstart
Fix Released
High
Harry Rybacki

Bug Description

It appears that changes with a `Depends-on: <change id>` are presently breaking the gate-quickstart role. I first noted this when making a tripleo-quickstart-extras change[1] depend on a tripleo-quickstart change[2].

From the gate's console output[3] we see the following error:

```
TASK [gate-quickstart : Check out the gated change] ****************************
task path: /home/centos/workspace/tripleo-quickstart-extras-gate-mitaka-delorean-full-minimal/usr/local/share/ansible/roles/gate-quickstart/tasks/checkout.yml:6
Wednesday 11 January 2017 19:36:42 +0000 (0:00:00.058) 0:00:05.991 *****
An exception occurred during task execution. To see the full traceback, use -vvv. The error was: UnboundLocalError: local variable 'remote_head' referenced before assignment
fatal: [localhost]: FAILED! => {"changed": false, "failed": true, "module_stderr": "Traceback (most recent call last):\n File \"/tmp/ansible_wcP1Ev/ansible_module_git.py\", line 1040, in <module>\n main()\n File \"/tmp/ansible_wcP1Ev/ansible_module_git.py\", line 994, in main\n result.update(changed=True, after=remote_head, msg='Local modifications exist')\nUnboundLocalError: local variable 'remote_head' referenced before assignment\n", "module_stdout": "", "msg": "MODULE FAILURE"}
```

The failing task is calling Ansible's git module. This appears to be known issue[4] related to 'force: true'[5]. A fix was merged to devel and backported to stable-2.2[6]. We have pinned ansible to '2.2.0.0' in our requirements.txt[7] though -- so I'm not sure exactly what is going on. Need to verify exactly what 2.2 stable means with respect to 2.2.0.0

[1] - https://review.openstack.org/#/c/419007/3
[2] - https://review.openstack.org/#/c/418998/4
[3] - https://ci.centos.org/artifacts/rdo/jenkins-tripleo-quickstart-extras-gate-mitaka-delorean-full-minimal-558/console.txt.gz
[4] - https://github.com/ansible/ansible-modules-core/issues/5504
[5] - https://github.com/openstack/tripleo-quickstart-extras/blob/master/roles/gate-quickstart/tasks/checkout.yml#L11
[6] - https://github.com/ansible/ansible/pull/19057
[7] - https://github.com/openstack/tripleo-quickstart/blob/master/requirements.txt#L1

Tags: ci
tags: added: ci
summary: - gate-quickstart role failing 'UnboundLocalError: local variable
- 'remote_head' referenced before assignment'
+ gate-quickstart role failing depends-on 'UnboundLocalError: local
+ variable 'remote_head' referenced before assignment'
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart (master)

Fix proposed to branch: master
Review: https://review.openstack.org/419135

Changed in tripleo-quickstart:
assignee: nobody → Harry Rybacki (hrybacki-h)
status: New → In Progress
Revision history for this message
Harry Rybacki (hrybacki-h) wrote :

It looks like 2.2 stable[1] is higher than our pinned version of 2.2.0.0[2]. Filing a review to bump to 2.2.1[3]

[1] - https://github.com/ansible/ansible/tree/stable-2.2
[2] - https://github.com/openstack/tripleo-quickstart/blob/master/requirements.txt#L1
[3] - https://review.openstack.org/419135

Revision history for this message
Harry Rybacki (hrybacki-h) wrote :

Although the fix has been merged into Ansible, it's not (presently) in a release. https://github.com/ansible/ansible/releases

John Trowbridge (trown)
Changed in tripleo-quickstart:
importance: Undecided → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-quickstart (master)

Change abandoned by Harry Rybacki (<email address hidden>) on branch: master
Review: https://review.openstack.org/419135
Reason: Abandoning in lieu of https://review.openstack.org/#/c/419639

Revision history for this message
Harry Rybacki (hrybacki-h) wrote :

Fix has been reviewed and merged: https://review.openstack.org/#/c/419639

Changed in tripleo-quickstart:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart (master)

Reviewed: https://review.openstack.org/419135
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart/commit/?id=fe7fcc45996e9e72b48caa6c5852236fd2743c6d
Submitter: Jenkins
Branch: master

commit fe7fcc45996e9e72b48caa6c5852236fd2743c6d
Author: Harry Rybacki <email address hidden>
Date: Wed Jan 11 16:15:08 2017 -0500

    Bump required ansible version pin to 2.2.1.0

    2.2.0.0 does not include an important fix that is breaking the
    depends-on functionality of the gate-quickstart role.

    Change-Id: I351e03293bdce9ba5acb301e4097b0ad2b95998f
    Closes-bug: 1655757

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-quickstart 2.0.0

This issue was fixed in the openstack/tripleo-quickstart 2.0.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.