ffu: repo command switching incorrectyl rendered.

Bug #1749911 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
Critical
Sofer Athlan-Guyot

Bug Description

Following the ipsec bug[1] we had to fix the vars "is an hash and thus is not ordered" problem quickly. Now we don't have any random failure but the rendered template is not functioning:

    - command: tripleo-repos {{ cmd_args | join(' ') }}
      name: Enable tripleo-repos
      vars:
        cmd_args: '{{ fast_forward_repo_args | json_query(''tripleo_repos[?release==''+release+''].args'')
          }}'
    when:
    - step|int == 3
    - is_bootstrap_node|bool
    - fast_forward_repo_type == 'tripleo-repos'

Causing:

    TASK [Enable tripleo-repos] ******************************************************************************************************************************************************************************************************************
    fatal: [192.168.24.16]: FAILED! => {"changed": true, "cmd": ["tripleo-repos"], "delta": "0:00:00.110420", "end": "2018-02-15 13:31:55.793571", "msg": "non-zero return code", "rc": 2, "start": "2018-02-15 13:31:55.683151", "stderr": "usage: tripleo-repos [-h] [-d DISTRO] [-b BRANCH] [-o OUTPUT_PATH]\n [--centos-mirror CENTOS_MIRROR] [--rdo-mirror RDO_MIRROR]\n REPO [REPO ...]\ntripleo-repos: error: too few arguments", "stderr_lines": ["usage: tripleo-repos [-h] [-d DISTRO] [-b BRANCH] [-o OUTPUT_PATH]", " [--centos-mirror CENTOS_MIRROR] [--rdo-mirror RDO_MIRROR]", " REPO [REPO ...]", "tripleo-repos: error: too few arguments"], "stdout": "", "stdout_lines": []}
            to retry, use: --limit @/home/stack/tripleo-4bzh0W-config/fast_forward_upgrade_playbook.retry

[1] https://bugs.launchpad.net/tripleo/+bug/1749338

Changed in tripleo:
status: New → Triaged
assignee: nobody → Sofer Athlan-Guyot (sofer-athlan-guyot)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-heat-templates (master)

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

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

Reviewed: https://review.openstack.org/545261
Committed: https://git.openstack.org/cgit/openstack/tripleo-heat-templates/commit/?id=19029070c5aaa5bf2726fce1f1c993bd15f6ff62
Submitter: Zuul
Branch: master

commit 19029070c5aaa5bf2726fce1f1c993bd15f6ff62
Author: Sofer Athlan-Guyot <email address hidden>
Date: Fri Feb 16 11:43:05 2018 +0100

    Simplify FastForwardRepoArgs structure used in FFU repo selection.

    The current structure is unnecessarily complex forcing the use of
    json_query filter with a parameter. The quoting inside that line
    become hard to read and is currently failing.

    We change the structure to a simple hash, as this is currently all
    what is needed.

    Change-Id: I17f2d1b4e549e275d7d6a675cd522c6b567815ac
    Closes-Bug: #1749911

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-heat-templates 8.0.0.0rc1

This issue was fixed in the openstack/tripleo-heat-templates 8.0.0.0rc1 release candidate.

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

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

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

Reviewed: https://review.openstack.org/550478
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=688679d60223d675e16494b1a75ff06b6f572df4
Submitter: Zuul
Branch: master

commit 688679d60223d675e16494b1a75ff06b6f572df4
Author: Sofer Athlan-Guyot <email address hidden>
Date: Wed Mar 7 14:52:06 2018 +0100

    Fix non working repo upgrade command for ffu.

    As seen in the related bug, assigning dependent variable in the _vars_
    section of Ansible isn't reliable as it's an hash.

    Use the same refactor here to simplify the cmd_args assignement.

    Change-Id: I53829f8c4461a648553328a92d7b379d8904da95
    Related-Bug: #1749911

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-upgrade (stable/queens)

Related fix proposed to branch: stable/queens
Review: https://review.openstack.org/551368

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tripleo-upgrade (stable/queens)

Reviewed: https://review.openstack.org/551368
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=52efe4b5eb135c92b0b6d06147e9219d7aa2a7da
Submitter: Zuul
Branch: stable/queens

commit 52efe4b5eb135c92b0b6d06147e9219d7aa2a7da
Author: Sofer Athlan-Guyot <email address hidden>
Date: Wed Mar 7 14:52:06 2018 +0100

    Fix non working repo upgrade command for ffu.

    As seen in the related bug, assigning dependent variable in the _vars_
    section of Ansible isn't reliable as it's an hash.

    Use the same refactor here to simplify the cmd_args assignement.

    Change-Id: I53829f8c4461a648553328a92d7b379d8904da95
    Related-Bug: #1749911
    (cherry picked from commit 688679d60223d675e16494b1a75ff06b6f572df4)

tags: added: in-stable-queens
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.