Upgrade of stein to train fail because of an issue in tripleo-upgrade

Bug #1856865 reported by Sofer Athlan-Guyot
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Sergii Golovatiuk

Bug Description

Hi,

seen in downstream ci :

set -o pipefail
 if grep -q OS::TripleO::Services::Pacemaker \"/home/stack/composable_roles/roles/roles_data.yaml\" ; then
 cp -f \"/home/stack/composable_roles/roles/roles_data.yaml\" \"/home/stack/composable_roles/roles/roles_data.yaml_update_serial\"
 /usr/libexec/platform-python -c 'import sys, yaml, simplejson as json;
 json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < \"/home/stack/composable_roles/roles/roles_data.yaml_update_serial\" | jq 'del(.[] | .update_serial)' | jq 'map(. |= (. +=
{update_serial: 25}
))' | jq 'map( if .ServicesDefault | contains ([\"OS::TripleO::Services::Pacemaker\"])
 then .update_serial = 1 else . end)' | /usr/libexec/platform-python -c 'import simplejson, sys, yaml;
 print yaml.dump(simplejson.loads(str(sys.stdin.read())),
 default_flow_style=False)' > \"/home/stack/composable_roles/roles/roles_data.yaml\"
 else
 echo \"No service defined, not modifying the role file\"
 fi", "delta": "0:00:00.102370", "end": "2019-12-17 22:34:09.014788", "msg": "non-zero return code", "rc": 1, "start": "2019-12-17 22:34:08.912418", "stderr": " File \"<string>\", line 2
 print yaml.dump(simplejson.loads(str(sys.stdin.read())),
 ^
 SyntaxError: invalid syntax
 Traceback (most recent call last):
 File \"<string>\", line 2, in <module>
 File \"/usr/lib64/python3.6/site-packages/yaml/init.py\", line 72, in load
 return loader.get_single_data()
 File \"/usr/lib64/python3.6/site-packages/yaml/constructor.py\", line 35, in get_single_data
 node = self.get_single_node()
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 36, in get_single_node
 document = self.compose_document()
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 55, in compose_document
 node = self.compose_node(None, None)
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 82, in compose_node
 node = self.compose_sequence_node(anchor)
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 111, in compose_sequence_node
 node.value.append(self.compose_node(node, index))
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 84, in compose_node
 node = self.compose_mapping_node(anchor)
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 133, in compose_mapping_node
 item_value = self.compose_node(node, item_key)
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 82, in compose_node
 node = self.compose_sequence_node(anchor)
 File \"/usr/lib64/python3.6/site-packages/yaml/composer.py\", line 110, in compose_sequence_node
 while not self.check_event(SequenceEndEvent):
 File \"/usr/lib64/python3.6/site-packages/yaml/parser.py\", line 98, in check_event
 self.current_event = self.state()
 File \"/usr/lib64/python3.6/site-packages/yaml/parser.py\", line 393, in parse_block_sequence_entry
 \"expected <block end>, but found %r\" % token.id, token.start_mark)
 yaml.parser.ParserError: while parsing a block collection
 in \"<stdin>\", line 30, column 5
 expected <block end>, but found '<scalar>'

tags: added: ci
Changed in tripleo:
assignee: nobody → Sofer Athlan-Guyot (sofer-athlan-guyot)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-upgrade (master)

Fix proposed to branch: master
Review: https://review.opendev.org/699709

Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
assignee: Sofer Athlan-Guyot (sofer-athlan-guyot) → Sergii Golovatiuk (sgolovatiuk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Fix proposed to branch: master
Review: https://review.opendev.org/699998

Changed in tripleo:
assignee: Sergii Golovatiuk (sgolovatiuk) → Jesse Pretorius (jesse-pretorius)
Changed in tripleo:
milestone: ussuri-1 → ussuri-2
Changed in tripleo:
assignee: Jesse Pretorius (jesse-pretorius) → Sergii Golovatiuk (sgolovatiuk)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-upgrade (master)

Change abandoned by Athlan-Guyot sofer (<email address hidden>) on branch: master
Review: https://review.opendev.org/699709
Reason: We squash that fix into another review.

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

Fix proposed to branch: stable/train
Review: https://review.opendev.org/700218

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

Reviewed: https://review.opendev.org/699391
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=4a0d4b7acd2a8e39c490b9e814c590d9d95eca66
Submitter: Zuul
Branch: master

commit 4a0d4b7acd2a8e39c490b9e814c590d9d95eca66
Author: Daniel Bengtsson <email address hidden>
Date: Tue Dec 17 12:14:03 2019 +0100

    Fix python command and fix python3 compatiblity.

    The python binary is not available in rhel8, add a variable with the
    binary. In stein on, we deal python3 by default and print isn't
    supported anymore now print is a function. This patch defines python_bin
    based on OS version (python in RHEL7 or python3 in RHEL8). Output is
    assigned as ansible registered variable to save it to file later on.
    Additionally this patch moves all pipes to jq to minimize number of forks

    Co-Authored-By: Sergii Golovatiuk <email address hidden>
    Closes-Bug: #1856865

    Change-Id: I8b2cacd4271a59dfda948462146c0866b8b7725f

Changed in tripleo:
status: In Progress → Fix Released
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.opendev.org/700405

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

Reviewed: https://review.opendev.org/700405
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=967f3805d356c180835dba680d86af1b66ebe8f1
Submitter: Zuul
Branch: master

commit 967f3805d356c180835dba680d86af1b66ebe8f1
Author: Jesse Pretorius (odyssey4me) <email address hidden>
Date: Mon Dec 23 10:09:07 2019 +0000

    Clean up roles data adjustment

    1. The python_bin var is unused, so it should be removed.
    2. Tasks should be seperated by a newline in order to easily see
       that they are seperate tasks.
    3. The return code of 2 was in the wrong place. It should have been
       where the data was changed, as per the changed_when condition.
    4. With the return code adjusted, the final task's condition also
       needed adjusting to match.

    Related-Bug: #1856865
    Change-Id: I916c3ed394f54561fff2a106288a667c0b877360

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

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/702199

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

Reviewed: https://review.opendev.org/700218
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=614322b9f63ce9ec240129b22e60772d1b34ce02
Submitter: Zuul
Branch: stable/train

commit 614322b9f63ce9ec240129b22e60772d1b34ce02
Author: Daniel Bengtsson <email address hidden>
Date: Tue Dec 17 12:14:03 2019 +0100

    Fix python command and fix python3 compatiblity.

    The python binary is not available in rhel8, add a variable with the
    binary. In stein on, we deal python3 by default and print isn't
    supported anymore now print is a function. This patch defines python_bin
    based on OS version (python in RHEL7 or python3 in RHEL8). Output is
    assigned as ansible registered variable to save it to file later on.
    Additionally this patch moves all pipes to jq to minimize number of forks

    Co-Authored-By: Sergii Golovatiuk <email address hidden>
    Closes-Bug: #1856865

    Change-Id: I8b2cacd4271a59dfda948462146c0866b8b7725f

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

Reviewed: https://review.opendev.org/702199
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=6c5631bb3d128f79a7d114d8a19f928828c27138
Submitter: Zuul
Branch: stable/train

commit 6c5631bb3d128f79a7d114d8a19f928828c27138
Author: Jesse Pretorius (odyssey4me) <email address hidden>
Date: Mon Dec 23 10:09:07 2019 +0000

    Clean up roles data adjustment

    1. The python_bin var is unused, so it should be removed.
    2. Tasks should be seperated by a newline in order to easily see
       that they are seperate tasks.
    3. The return code of 2 was in the wrong place. It should have been
       where the data was changed, as per the changed_when condition.
    4. With the return code adjusted, the final task's condition also
       needed adjusting to match.

    Related-Bug: #1856865
    Change-Id: I916c3ed394f54561fff2a106288a667c0b877360
    (cherry picked from commit 967f3805d356c180835dba680d86af1b66ebe8f1)

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

Fix proposed to branch: stable/stein
Review: https://review.opendev.org/702621

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

Related fix proposed to branch: stable/stein
Review: https://review.opendev.org/702623

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

Fix proposed to branch: stable/rocky
Review: https://review.opendev.org/702908

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

Reviewed: https://review.opendev.org/702621
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=bceafc0ab4a638fac5ae9b061b09f19654cb4cdd
Submitter: Zuul
Branch: stable/stein

commit bceafc0ab4a638fac5ae9b061b09f19654cb4cdd
Author: Daniel Bengtsson <email address hidden>
Date: Tue Dec 17 12:14:03 2019 +0100

    Fix python command and fix python3 compatiblity.

    The python binary is not available in rhel8, add a variable with the
    binary. In stein on, we deal python3 by default and print isn't
    supported anymore now print is a function. This patch defines python_bin
    based on OS version (python in RHEL7 or python3 in RHEL8). Output is
    assigned as ansible registered variable to save it to file later on.
    Additionally this patch moves all pipes to jq to minimize number of forks

    Co-Authored-By: Sergii Golovatiuk <email address hidden>
    Closes-Bug: #1856865

    Change-Id: I8b2cacd4271a59dfda948462146c0866b8b7725f
    (cherry picked from commit 614322b9f63ce9ec240129b22e60772d1b34ce02)

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

Reviewed: https://review.opendev.org/702623
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=53377cdb144374693827bdfc5ec817239d2b78a1
Submitter: Zuul
Branch: stable/stein

commit 53377cdb144374693827bdfc5ec817239d2b78a1
Author: Jesse Pretorius (odyssey4me) <email address hidden>
Date: Mon Dec 23 10:09:07 2019 +0000

    Clean up roles data adjustment

    1. The python_bin var is unused, so it should be removed.
    2. Tasks should be seperated by a newline in order to easily see
       that they are seperate tasks.
    3. The return code of 2 was in the wrong place. It should have been
       where the data was changed, as per the changed_when condition.
    4. With the return code adjusted, the final task's condition also
       needed adjusting to match.

    Related-Bug: #1856865
    Change-Id: I916c3ed394f54561fff2a106288a667c0b877360
    (cherry picked from commit 967f3805d356c180835dba680d86af1b66ebe8f1)
    (cherry picked from commit 6c5631bb3d128f79a7d114d8a19f928828c27138)

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

Related fix proposed to branch: stable/rocky
Review: https://review.opendev.org/703041

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

Reviewed: https://review.opendev.org/699998
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=16d393d6c06c71693356f01741491c3805dafc74
Submitter: Zuul
Branch: master

commit 16d393d6c06c71693356f01741491c3805dafc74
Author: Jesse Pretorius (odyssey4me) <email address hidden>
Date: Mon Dec 23 10:32:39 2019 +0000

    Change roles_data/update_serial without using shell

    The currently mechanism uses shell/command, cat and jq in
    4 tasks.

    We can do the required transformation without using shell,
    command, cat or jq by using the slurp ansible module and
    some jinja. We can also reduce the implementation to 3
    tasks.

    This patch implements that in order for a more optimal
    execution which is also easier to read and maintain.

    Related-Bug: #1856865
    Change-Id: Iecf2b0211a69e99efe0f402efb00c7080b784104

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

Related fix proposed to branch: stable/train
Review: https://review.opendev.org/711264

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

Reviewed: https://review.opendev.org/711264
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=3ba8b6912f5977c66e56e894290d25aa0dfed81f
Submitter: Zuul
Branch: stable/train

commit 3ba8b6912f5977c66e56e894290d25aa0dfed81f
Author: Jesse Pretorius (odyssey4me) <email address hidden>
Date: Mon Dec 23 10:32:39 2019 +0000

    Change roles_data/update_serial without using shell

    The currently mechanism uses shell/command, cat and jq in
    4 tasks.

    We can do the required transformation without using shell,
    command, cat or jq by using the slurp ansible module and
    some jinja. We can also reduce the implementation to 3
    tasks.

    This patch implements that in order for a more optimal
    execution which is also easier to read and maintain.

    Related-Bug: #1856865
    Change-Id: Iecf2b0211a69e99efe0f402efb00c7080b784104
    (cherry picked from commit 16d393d6c06c71693356f01741491c3805dafc74)

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

Reviewed: https://review.opendev.org/702908
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=7b1bf8f4f32fef0772063d4476afd547ca7bff15
Submitter: Zuul
Branch: stable/rocky

commit 7b1bf8f4f32fef0772063d4476afd547ca7bff15
Author: Daniel Bengtsson <email address hidden>
Date: Tue Dec 17 12:14:03 2019 +0100

    Fix python command and fix python3 compatiblity.

    The python binary is not available in rhel8, add a variable with the
    binary. In stein on, we deal python3 by default and print isn't
    supported anymore now print is a function. This patch defines python_bin
    based on OS version (python in RHEL7 or python3 in RHEL8). Output is
    assigned as ansible registered variable to save it to file later on.
    Additionally this patch moves all pipes to jq to minimize number of forks

    Co-Authored-By: Sergii Golovatiuk <email address hidden>
    Closes-Bug: #1856865

    Change-Id: I8b2cacd4271a59dfda948462146c0866b8b7725f
    (cherry picked from commit 614322b9f63ce9ec240129b22e60772d1b34ce02)
    (cherry picked from commit bceafc0ab4a638fac5ae9b061b09f19654cb4cdd)

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

Reviewed: https://review.opendev.org/703041
Committed: https://git.openstack.org/cgit/openstack/tripleo-upgrade/commit/?id=204ca182ffb634dc0a21c5fc373169482dda6db2
Submitter: Zuul
Branch: stable/rocky

commit 204ca182ffb634dc0a21c5fc373169482dda6db2
Author: Jesse Pretorius (odyssey4me) <email address hidden>
Date: Mon Dec 23 10:09:07 2019 +0000

    Clean up roles data adjustment

    1. The python_bin var is unused, so it should be removed.
    2. Tasks should be seperated by a newline in order to easily see
       that they are seperate tasks.
    3. The return code of 2 was in the wrong place. It should have been
       where the data was changed, as per the changed_when condition.
    4. With the return code adjusted, the final task's condition also
       needed adjusting to match.

    Related-Bug: #1856865
    Change-Id: I916c3ed394f54561fff2a106288a667c0b877360
    (cherry picked from commit 53377cdb144374693827bdfc5ec817239d2b78a1)
    (cherry picked from commit 967f3805d356c180835dba680d86af1b66ebe8f1)
    (cherry picked from commit 6c5631bb3d128f79a7d114d8a19f928828c27138)

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.