openstack-tox-linters job is failing for the tripleo-quickstart-extras master gate check

Bug #1797838 reported by Marios Andreou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Sorin Sbarnea

Bug Description

The openstack-tox-linters job is failing for the tripleo-quickstart-extras master gate check with a trace like:

  [102] No Jinja2 in when
  /home/m/Documents/WORK/NewEclipsey/Github/Tuskar/tripleo-quickstart-extras/roles/overcloud-scale/tasks/scale-nodes.yml:37
  Task/Handler: Check that post scale node count is correct
...
  2018-10-15 00:04:33.701610 | ubuntu-xenial | 102 No Jinja2 in when
  2018-10-15 00:04:33.701698 | ubuntu-xenial | /home/zuul/src/git.openstack.org/openstack/tripleo-quickstart-extras/roles/build-images/tasks/main.yml:2
  2018-10-15 00:04:33.701812 | ubuntu-xenial | Task/Handler: Delete prior working directory if present
  2018-10-15 00:04:33.701837 | ubuntu-xenial |
  2018-10-15 00:04:33.727720 | ubuntu-xenial | ERROR: InvocationError for command '/bin/bash ci-scripts/ansible-lint.sh' (exited with code 1)
  2018-10-15 00:04:33.727897 | ubuntu-xenial | linters finish: runtests after 88.77 seconds
  2018-10-15 00:04:33.728326 | ubuntu-xenial | linters start: run-test-post
  2018-10-15 00:04:33.728461 | ubuntu-xenial | linters finish: run-test-post after 0.00 seconds
  2018-10-15 00:04:33.728827 | ubuntu-xenial | ___________________________________ summary ____________________________________
  2018-10-15 00:04:33.728885 | ubuntu-xenial | ERROR: linters: commands failed
  2018-10-15 00:04:34.200874 | ubuntu-xenial | ERROR
  2018-10-15 00:04:34.201344 | ubuntu-xenial | {
  2018-10-15 00:04:34.201465 | ubuntu-xenial | "delta": "0:01:33.944656",
  2018-10-15 00:04:34.201594 | ubuntu-xenial | "end": "2018-10-15 00:04:33.745439",
  2018-10-15 00:04:34.201703 | ubuntu-xenial | "msg": "non-zero return code",
  2018-10-15 00:04:34.201808 | ubuntu-xenial | "rc": 1,
  2018-10-15 00:04:34.201911 | ubuntu-xenial | "start": "2018-10-15 00:02:59.800783"
  2018-10-15 00:04:34.202013 | ubuntu-xenial | }

see full trace at http://logs.openstack.org/45/560445/163/check/openstack-tox-linters/fc7eedb/job-output.txt.gz#_2018-10-15_00_04_33_701610

This is also reproducible locally for me

Revision history for this message
Marios Andreou (marios-b) wrote :

fix at remote: https://review.openstack.org/610472 Add ANSIBLE0019 (rule id 102) to skip list - jina in when

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-quickstart-extras (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/610472

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-quickstart-extras (master)

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

Changed in tripleo:
assignee: Marios Andreou (marios-b) → Sorin Sbarnea (ssbarnea)
status: Triaged → In Progress
Revision history for this message
Marios Andreou (marios-b) wrote :
Revision history for this message
Marios Andreou (marios-b) wrote :

as just discussed with the ci team we will merge the skip and then soren can re-enable it with https://review.openstack.org/610501

Revision history for this message
Sorin Sbarnea (ssbarnea) wrote :

The linter message is really unfortunate because what it really wanted to mean was that jinja curly
braces are not to be used on when commands because they are "implicitly" treated as jinja.

Bad: when: "{{ foo is defined }}"
Good: when: foo is defined

As stated by Marios, https://review.openstack.org/610501 is expected to revert the linter hack and fix the linting errors, closing this bug for good.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-quickstart-extras (master)

Reviewed: https://review.openstack.org/610472
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=ecd5d0d806dfac9cb3c50a4604396fc56851c6cb
Submitter: Zuul
Branch: master

commit ecd5d0d806dfac9cb3c50a4604396fc56851c6cb
Author: Marios Andreou <email address hidden>
Date: Mon Oct 15 13:22:13 2018 +0300

    Add ANSIBLE0019 (rule id 102) to skip list -[102] No Jinja in when

    As discussed in the related bug this is currently blocking master
    t-q-e gate.

    Change-Id: I8f85ed0a409d01fab7b54953c7980a1a10560951
    Related-Bug: #1797838

Changed in tripleo:
milestone: none → stein-1
Sorin Sbarnea (ssbarnea)
tags: removed: alert ci
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-quickstart-extras (master)

Reviewed: https://review.openstack.org/610501
Committed: https://git.openstack.org/cgit/openstack/tripleo-quickstart-extras/commit/?id=a472345db1f58b4d0b6a4a8d3c5c8be85b614c33
Submitter: Zuul
Branch: master

commit a472345db1f58b4d0b6a4a8d3c5c8be85b614c33
Author: Sorin Sbarnea <email address hidden>
Date: Mon Oct 15 13:51:58 2018 +0100

    Repair ansible when calls with jinja2

    - adopts official syntax for 'when:' commands
    - assures we use current linter which spots when errors
    - reverts temporary linter rule disablement
    - use parsable output (pep8 like) for ansible-lint

    Change-Id: I6eb5719841c2f264e1efed4bf38726f71c840e36
    Closes-Bug: #1797838

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-quickstart-extras 2.1.1

This issue was fixed in the openstack/tripleo-quickstart-extras 2.1.1 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.