Fuel Plugin v4 validator does not allow role regular expressions

Bug #1557997 reported by Vladimir Kuklin
26
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Vladimir Kuklin
Mitaka
Fix Released
High
Vladimir Kuklin

Bug Description

fuel-plugins SHA1 :6fcb35294083f3f73bf62c4d02c09f251f25befb

Traceback (most recent call last):
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/cli.py", line 126, in main
    perform_action(args)
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/cli.py", line 109, in perform_action
    ValidatorManager(args.check).get_validator().validate()
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/validators/validator_v3.py", line 48, in validate
    super(ValidatorV3, self).validate()
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/validators/validator_v2.py", line 44, in validate
    self.check_schemas()
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/validators/validator_v4.py", line 58, in check_schemas
    self.check_deployment_tasks_schema()
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/validators/validator_v3.py", line 70, in check_deployment_tasks_schema
    self.deployment_tasks_path)
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/validators/base.py", line 99, in validate_file_by_schema
    self.validate_schema(data, schema, file_path)
  File "/home/guillaume/git/fuel-plugins/fuel_plugin_builder/validators/base.py", line 49, in validate_schema
    self._make_error_message(exc, file_path, value_path))
ValidationError: File './deployment_tasks.yaml', '/primary-influxdb_grafana/' is not one of ['*', 'master', 'self'], value path '10 -> cross-depends -> 0 -> role -> cross-depends -> 10'
Validation failed
File './deployment_tasks.yaml', '/primary-influxdb_grafana/' is not one of ['*', 'master', 'self'], value path '10 -> cross-depends -> 0 -> role -> cross-depends -> 10'

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

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

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to fuel-web (master)

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

Dmitry Pyzhov (dpyzhov)
tags: added: feature-plugins
tags: added: feature-task-based
summary: - Plugin v4 validator does not allow role regular expressions
+ Fuel Plugin v4 validator does not allow role regular expressions
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to fuel-web (master)

Reviewed: https://review.openstack.org/293680
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=1e94f14e0d68e85f53d35f1542bf5ef719789177
Submitter: Jenkins
Branch: master

commit 1e94f14e0d68e85f53d35f1542bf5ef719789177
Author: Vladimir Kuklin <email address hidden>
Date: Wed Mar 16 22:46:05 2016 +0300

    Lift too strict restrictions on cross-deps role name

    Allow a user to specify any arbitrary string
    as role name for cross-deps could be a regexp

    Change-Id: I15e3a4f880bb9c7a569611b12b91507c1b6dbe05
    Related-bug: #1557997
    Closes-bug: #1562092

Dmitry Pyzhov (dpyzhov)
tags: added: team-enhancements
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

Reviewed: https://review.openstack.org/293360
Committed: https://git.openstack.org/cgit/openstack/fuel-plugins/commit/?id=4a6e3f93debd7ae2304a53f173f3bc6195169028
Submitter: Jenkins
Branch: master

commit 4a6e3f93debd7ae2304a53f173f3bc6195169028
Author: Vladimir Kuklin <email address hidden>
Date: Sun Apr 3 23:45:40 2016 +0300

    Lift too strict restrictions on cross-deps role name

    Allow a user to specify any arbitrary string
    as role name for cross-deps that could be
    a regexp or a TASK_ROLE_PATTERN string

    Change-Id: I7124195fd9249acf13236751b7c59bcff2f42b2c
    Closes-bug: #1557997

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Aleksey Kasatkin (alekseyk-ru) wrote :

This does not look critical. Lowering to high.

Changed in fuel:
importance: Critical → High
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

Fix has been reverted because of bug #1572621

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Bug Checker Bot (bug-checker) wrote : Autochecker

(This check performed automatically)
Please, make sure that bug description contains the following sections filled in with the appropriate data related to the bug you are describing:

actual result

version

expected result

steps to reproduce

For more detailed information on the contents of each of the listed sections see https://wiki.openstack.org/wiki/Fuel/How_to_contribute#Here_is_how_you_file_a_bug

tags: added: need-info
Changed in fuel:
importance: High → Critical
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-plugins (master)

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

Changed in fuel:
status: Confirmed → In Progress
Changed in fuel:
assignee: Vladimir Kuklin (vkuklin) → Bulat Gaifullin (bgaifullin)
Changed in fuel:
assignee: Bulat Gaifullin (bgaifullin) → Vladimir Kuklin (vkuklin)
Changed in fuel:
milestone: 9.0 → 10.0
Revision history for this message
Alexey Shtokolov (ashtokolov) wrote :

There is a workaround, no data loss -> downgraded to High

Changed in fuel:
importance: Critical → High
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

Reviewed: https://review.openstack.org/311142
Committed: https://git.openstack.org/cgit/openstack/fuel-plugins/commit/?id=ca8240ff61cd36faddccbf85ffce447cfeda2664
Submitter: Jenkins
Branch: master

commit ca8240ff61cd36faddccbf85ffce447cfeda2664
Author: Vladimir Kuklin <email address hidden>
Date: Fri Apr 29 18:14:10 2016 +0300

    Lift too strict restrictions on cross-deps role name

      Allow a user to specify any arbitrary string
      as role name for cross-deps that could be
      a regexp or a TASK_ROLE_PATTERN string

      Log a warning when task is not assigned
      to roles/groups/fields

      Set default logging level to INFO

    Change-Id: I42c2490cf22f53892a189165698d1acd56ee4c74
    Closes-bug: #1557997

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

I've reopened this bug. I still cannot build a plugin that contains a role with a regular expression: http://paste.openstack.org/show/JfK1tjvVk7Vz5uFgI8qi/

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Matthew Mosesohn (raytrac3r) wrote :

Sorry, I must have had some old code on my system. I'll move back to fix committed

Changed in fuel:
status: Confirmed → Fix Committed
tags: added: on-verification
Revision history for this message
Alexandr Kostrikov (akostrikov-mirantis) wrote :

Worked fine, but I need to know about 'cross-depends' - is it parsed only by nailgun?

Revision history for this message
Alexandr Kostrikov (akostrikov-mirantis) wrote :

Verified on:
[root@nailgun ~]# shotgun2 short-report
cat /etc/fuel_build_id:
 363
cat /etc/fuel_build_number:
 363
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0

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.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.