tripleo-upgrade workaround for update isn't standard and not working.

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

Bug Description

Hi,

the standard format for workaround in tripleo-upgrade is something like this:

---
pre_overcloud_upgrade_prepare_workarounds:
- RHBZ-1657138:
    patch: false
    basedir: ''
    id: ''
    command: |
        echo "Workaround for docker issue"

        #source {{ undercloud_rc }} ;
        #tripleo-ansible-inventory --static-yaml-inventory /tmp/workarounds-invenroy.yml \
        # --stack {{ overcloud_stack_name }} ;
        #ansible -i /tmp/workarounds-invenroy.yml overcloud -b -m shell \
        # -a 'sudo yum install -y yum-versionlock' ;
        ## downgrade docker
        #ansible -i /tmp/workarounds-invenroy.yml overcloud -b -m shell \
        # -a 'sudo yum downgrade -y docker-common docker-client docker-rhel-push-plugin docker'
        ## restart docker
        #ansible -i /tmp/workarounds-invenroy.yml overcloud -b -m shell \
        # -a 'sudo systemctl restart docker ; sudo systemctl status docker ; sudo docker version ; date'
        ## version lock docker
        #ansible -i /tmp/workarounds-invenroy.yml overcloud -b -m shell \
        # -a 'sudo yum versionlock add docker*' ;

This doesn't work for update you have to use something like this:

      pre_undercloud_update_workarounds:
        - script: pre_undercloud_update_workarounds.sh
          workarounds:
            - directory: ''
              patch_id: ''
              misc: ''
              command: 'sudo yum upgrade -y openstack-tripleo-heat-templates'

            - directory: ''
              patch_id: ''
              misc: ''
              command: 'sudo dnf install -y /var/lib/local-repo/podman-1.0.5-1.gitf604175.module+el8.0.0+4017+bbba319f.x86_64.rpm'
# todo:doesn't work for some reason ! command: 'sudo yum upgrade -y podman'

      post_undercloud_update_workarounds:
        - script: post_undercloud_update_workarounds.sh
          workarounds: []

      pre_overcloud_update_prepare_workarounds:
        - script: pre_overcloud_update_prepare_workarounds.sh
          workarounds: []

      post_overcloud_update_prepare_workarounds:
        - script: post_overcloud_update_prepare_workarounds.sh
          workarounds: []

      pre_overcloud_update_run_workarounds:
        - script: pre_overcloud_update_run_workarounds.sh
          workarounds: []

      post_overcloud_update_run_workarounds:
        - script: post_overcloud_update_run_workarounds.sh
          workarounds: []

      pre_overcloud_update_converge_workarounds:
        - script: pre_overcloud_update_converge_workarounds.sh
          workarounds: []

      post_overcloud_update_converge_workarounds:
        - script: post_overcloud_update_converge_workarounds.sh
          workarounds: []

and in the end it doesn't work for both undercloud and overcloud as the structured are not created in the same way:

undercloud: https://github.com/openstack/tripleo-upgrade/blob/master/tasks/update/create-undercloud-update-scripts.yaml#L9..L18

overcloud: https://github.com/openstack/tripleo-upgrade/blob/master/tasks/update/create-overcloud-update-scripts.yaml#L17..L31

one is a list the other is a list of list ...

We should fix the former and unify the latter.

Tags: upgrade
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/680612

Changed in tripleo:
assignee: nobody → Sofer Athlan-Guyot (sofer-athlan-guyot)
status: Triaged → In Progress
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

Note to run it you need:

 ir tripleo-upgarde --updates-workarounds true --extra-vars @<file with above format in it>.yaml ...

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

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

commit cc30c79cc641d5d19e922e0a5a26b0f29ff557bf
Author: Sofer Athlan-Guyot <email address hidden>
Date: Fri Sep 6 10:18:40 2019 +0200

    Fix overcloud update workarounds creation.

    The structure used there was wrong, we need a list, not a list of
    list.

    We also fix the log file overwriting.

    Change-Id: Ic9d2ea2ba122b0b85be99daa51a93c236c2a4b77
    Partial-Bug: #1843017

Changed in tripleo:
milestone: train-rc1 → ussuri-1
Changed in tripleo:
milestone: ussuri-1 → ussuri-2
wes hayutin (weshayutin)
Changed in tripleo:
milestone: ussuri-2 → ussuri-3
Revision history for this message
Sofer Athlan-Guyot (sofer-athlan-guyot) wrote :

This has been solved by standardizing workaround mechanism across upgrade/update and ffwd.

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