The "Compare switch VLANs..." validation cannot be run through mistral

Bug #1761717 reported by Florian Fuchs
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Florian Fuchs

Bug Description

Description
===========

The "Compare switch VLANs to VLANs in nic configs" validation breaks when run via mistral. The validation uses a custom module (switch_vlans) that imports two functions from another custom module (network_environment). Custom modules are recognized by Ansible, but don't necessarily live on the Python path, so running the validation only works if it is run from either from the tripleo-validations repository's top folder or from the /usr/share/openstack-tripleo-validations directory on the undercloud.

Steps to reproduce
==================

Run validation using $ openstack workflow exection create

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

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

Changed in tripleo:
status: Triaged → In Progress
summary: - Switch VLANs validations cannot be run through mistral
+ The "Compare switch VLANs..." validation cannot be run through mistral
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-validations (master)

Change abandoned by Emilien Macchi (<email address hidden>) on branch: master
Review: https://review.openstack.org/559304
Reason: TO NOT RE-CHECK OR RE-APPROVE - CLEARING THE GATE NOW TO FIX A BLOCKER

Changed in tripleo:
milestone: rocky-1 → rocky-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tripleo-validations (master)

Reviewed: https://review.openstack.org/559304
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=d0dc69c1eb8277f9b6789d57ed7ef632161d29a1
Submitter: Zuul
Branch: master

commit d0dc69c1eb8277f9b6789d57ed7ef632161d29a1
Author: Florian Fuchs <email address hidden>
Date: Fri Apr 6 09:53:25 2018 +0000

    Fix Switch VLANs validation

    The "Compare switch VLANs to VLANs in nic config" validation breaks when
    run through Mistral. This is because the custom module used in the
    validation imports functions from another custom module. Custom modules
    are recognized by Ansible, but they don't necessarily live on the Python
    path, so when run through Mistral the imported module cannot be found
    and the validation breaks.

    This patch moves the two imported functions to different locations:

    - `library.network_environment.get_network_config` is refactored into a
      generic utility function in `tripleo_validations.utils`.
    - `library.network_environment.open_network_environment_files` is copied
      to `library.network_environment.switch_vlans` (this is an ugly
      duplication, but the function is going to be removed from the original
      location in a different patch:
      https://review.openstack.org/#/c/547518/)

    Change-Id: If3bc62df730739640341386022c0cd99295b880b
    Closes-Bug: #1761717

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tripleo-validations (stable/queens)

Fix proposed to branch: stable/queens
Review: https://review.openstack.org/563969

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

Reviewed: https://review.openstack.org/563969
Committed: https://git.openstack.org/cgit/openstack/tripleo-validations/commit/?id=40fdd8fcc935ccd9294278f4da3553a3b7156cb0
Submitter: Zuul
Branch: stable/queens

commit 40fdd8fcc935ccd9294278f4da3553a3b7156cb0
Author: Florian Fuchs <email address hidden>
Date: Tue Apr 24 13:53:31 2018 +0000

    Fix Switch VLANs validation

    The "Compare switch VLANs to VLANs in nic config" validation breaks when
    run through Mistral. This is because the custom module used in the
    validation imports functions from another custom module. Custom modules
    are recognized by Ansible, but they don't necessarily live on the Python
    path, so when run through Mistral the imported module cannot be found
    and the validation breaks.

    This patch moves the two imported functions to different locations:

    - `library.network_environment.get_network_config` is refactored into a
      generic utility function in `tripleo_validations.utils`.
    - `library.network_environment.open_network_environment_files` is copied
      to `library.network_environment.switch_vlans` (this is an ugly
      duplication, but the function is going to be removed from the original
      location in a different patch:
      https://review.openstack.org/#/c/547518/)

    Closes-Bug: #1761717

    Conflicts:
     tripleo_validations/utils.py

    Change-Id: I65292df11be601c39552801ed0c00f9ff7556633
    (cherry picked from commit d0dc69c1eb8277f9b6789d57ed7ef632161d29a1)

tags: added: in-stable-queens
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 8.4.2

This issue was fixed in the openstack/tripleo-validations 8.4.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tripleo-validations 9.1.0

This issue was fixed in the openstack/tripleo-validations 9.1.0 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.