wilcards in roles groups will break noop tests

Bug #1539457 reported by Maksim Malchuk
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Maksim Malchuk
8.0.x
Fix Released
High
Maksim Malchuk

Bug Description

wildcards in roles groups will break noop-tests:
  groups: ['/.*/'] in deployment/puppet/osnailyfacter/modular/fuel_pkgs/tasks.yaml
will lead (for example) to silently skip the noop test for
  /etc/puppet/modules/osnailyfacter/modular/fuel_pkgs/setup_repositories.pp

rspec with puppet-debug enabled :
=== YAML: 'neut_vlan.compute.nossl.yaml' ===
RUN: bundle exec rspec --format documentation --color --tty --backtrace --exclude-pattern 'spec/hosts/globals/globals_spec.rb' --pattern 'spec/hosts/fuel_pkgs/setup_repositories_spec.rb'
DEBUG: 2016-01-29 03:39:11 +0300: Hiera YAML backend starting
DEBUG: 2016-01-29 03:39:11 +0300: Looking up test_tasks in YAML backend
DEBUG: 2016-01-29 03:39:11 +0300: Looking for data source globals/neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Cannot find datafile /Users/mmalchuk/Dropbox/Work/repos/github.com/openstack/fuel-library/tests/noop/astute.yaml/globals/neut_vlan.compute.nossl.yaml, skipping
DEBUG: 2016-01-29 03:39:11 +0300: Looking for data source neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Looking up role in YAML backend
DEBUG: 2016-01-29 03:39:11 +0300: Looking for data source globals/neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Cannot find datafile /Users/mmalchuk/Dropbox/Work/repos/github.com/openstack/fuel-library/tests/noop/astute.yaml/globals/neut_vlan.compute.nossl.yaml, skipping
DEBUG: 2016-01-29 03:39:11 +0300: Looking for data source neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Found role in neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Looking up fqdn in YAML backend
DEBUG: 2016-01-29 03:39:11 +0300: Looking for data source globals/neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Cannot find datafile /Users/mmalchuk/Dropbox/Work/repos/github.com/openstack/fuel-library/tests/noop/astute.yaml/globals/neut_vlan.compute.nossl.yaml, skipping
DEBUG: 2016-01-29 03:39:11 +0300: Looking for data source neut_vlan.compute.nossl
DEBUG: 2016-01-29 03:39:11 +0300: Found fqdn in neut_vlan.compute.nossl
Manifest 'fuel_pkgs/setup_repositories.pp' is not enabled on the node 'node-5'. Skipping tests.

maybe we need to fix tests/noop/spec/lib/tasks.rb
to correct support these wildcards?

Revision history for this message
Maksim Malchuk (mmalchuk) wrote :

we have these wildcards in 8.0 too

Changed in fuel:
status: New → Confirmed
Revision history for this message
Bartłomiej Piotrowski (bpiotrowski) wrote :

We surely need to fix it as soon as possible, before any task is broken due to new notation. The 44th line of file mentioned by Maksim has rather limited check:

return true if task['groups'] == '*'

At the moment only setup_repositories is using the wildcard notation, but there is another bug to convert all applicable tasks to it.

Changed in fuel:
assignee: Fuel Library Team (fuel-library) → Maksim Malchuk (mmalchuk)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (master)

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

Andrey Maximov (maximov)
tags: added: team-bugfix
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (master)

Reviewed: https://review.openstack.org/273950
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=08ed86c5539ca715c7f6fa351e8c9004030924a1
Submitter: Jenkins
Branch: master

commit 08ed86c5539ca715c7f6fa351e8c9004030924a1
Author: Maksim Malchuk <email address hidden>
Date: Fri Jan 29 11:56:04 2016 +0300

    Support wildcards in the tasks roles

    This commit adds wildcards support for noop tests.

    Change-Id: I2f32fe26bf90656b820c21167faa0e35697bc322
    Closes-Bug: #1539457

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-library (stable/8.0)

Fix proposed to branch: stable/8.0
Review: https://review.openstack.org/274056

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-library (stable/8.0)

Reviewed: https://review.openstack.org/274056
Committed: https://git.openstack.org/cgit/openstack/fuel-library/commit/?id=ec7e212972ead554f21b52b9e165156665f659df
Submitter: Jenkins
Branch: stable/8.0

commit ec7e212972ead554f21b52b9e165156665f659df
Author: Maksim Malchuk <email address hidden>
Date: Fri Jan 29 11:56:04 2016 +0300

    Support wildcards in the tasks roles

    This commit adds wildcards support for noop tests.

    Change-Id: I2f32fe26bf90656b820c21167faa0e35697bc322
    (cherry-pick from commit 08ed86c5539ca715c7f6fa351e8c9004030924a1)
    Closes-Bug: #1539457

Revision history for this message
Mikhail Samoylov (msamoylov) wrote :

Verified. Checked that CI job https://ci.fuel-infra.org/job/fuellib_noop_tests/9472/consoleFull include lines:

fuel_pkgs/setup_repositories.pp
  on Ubuntu platforms
    should compile into a catalogue without dependency cycles
  on CentOS platforms
    should compile into a catalogue without dependency cycles

tags: added: on-verification
tags: removed: on-verification
tags: added: on-verification
Revision history for this message
Andrey Lavrentyev (alavrentyev) wrote :

Verified on CI job for 9.0-mitaka: https://ci.fuel-infra.org/job/fuellib_noop_tests/13371/consoleFull

There are no 'setup_repositories' test skips.

tags: removed: on-verification
Changed in fuel:
status: Fix Committed → 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.