All CentOS 7 ovb jobs are failing with SyntaxError: invalid syntax while creating stack
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tripleo |
Fix Released
|
High
|
Unassigned |
Bug Description
All C7 branches ovb jobs are failing while creating stack with RETRY_LIMIT
```
TASK [ovb-manage : Create a stack]
2021-03-28 22:27:27.958138 | primary | File "/home/
2021-03-28 22:27:27.958334 | primary | print('Waiting for stack to complete', end="")
2021-03-28 22:27:27.958392 | primary | ^
2021-03-28 22:27:27.958431 | primary | SyntaxError: invalid syntax
2021-03-28 22:27:38.500352 | primary | ERROR
2021-03-28 22:27:38.500621 | primary | {
2021-03-28 22:27:38.500667 | primary | "delta": "0:00:00.019007",
2021-03-28 22:27:38.500696 | primary | "end": "2021-03-28 22:27:27.960184",
2021-03-28 22:27:38.500722 | primary | "msg": "non-zero return code",
2021-03-28 22:27:38.500751 | primary | "rc": 1,
2021-03-28 22:27:38.500778 | primary | "start": "2021-03-28 22:27:27.941177"
2021-03-28 22:27:38.500803 | primary | }
2021-03-28 22:27:38.591849 |
2021-03-28 22:27:38.591967 | TASK [ovb-manage : Show last stack status]
2021-03-28 22:27:41.058684 | primary | Stack not found: baremetal_61429
2021-03-28 22:27:41.203173 | primary | ok: Runtime: 0:00:02.046703
2021-03-28 22:27:41.293271 |
2021-03-28 22:27:41.293391 | TASK [ovb-manage : Delete CREATE_FAILED stack]
2021-03-28 22:27:51.916033 | primary | ERROR
2021-03-28 22:27:51.916356 | primary | {
2021-03-28 22:27:51.916416 | primary | "msg": "The conditional check '\"CREATE_FAILED\" in result.stdout' failed. The error was: error while evaluating conditional (\"CREATE_FAILED\" in result.stdout): Unable to look up a name or access an attribute in template string ({% if \"CREATE_FAILED\" in result.stdout %} True {% else %} False {% endif %}).\nMake sure your variable name does not contain invalid characters like '-': argument of type 'AnsibleUndefined' is not iterable\n\nThe error appears to be in '/var/lib/
2021-03-28 22:27:51.916474 | primary | }
2021-03-28 22:27:51.939579 |
2021-03-28 22:27:51.939694 | PLAY RECAP
```
Since the C7 branches uses python2 and
print('Waiting for stack to complete', end="") end is not supported in print method in python2.
It all happend due to a upgrade of ovb/stable-2.0 branches. https:/
By adding from __future__ import print_function in the ovb codebase will fix the issue.
We probably should have a centos7 job gating with tripleo-ci to avoid these issues.