fuel plugins --install for plugin with duplicated task id

Bug #1554982 reported by Pavel Chechetin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
In Progress
Medium
Vitalii Kulanov
Mitaka
Won't Fix
Medium
Vitalii Kulanov
Newton
In Progress
Medium
Vitalii Kulanov

Bug Description

Given we have a plugin with a task_id collided with another task_id in the same plugin.
fpb doesn't complain about it, but it should've.

Even though fuel plugins --install prints errors about duplicated task_ids, the plugin ends up installed.
But it doesn't work, because information from it only partially was inserted into DB.
Exit code of such a faulty installation ends up 0.

ISO version: 8.0

Step to reproduce
  Install a plugins with duplicated task_id

Expected behavior:
   fpb doesn't build a plugin with duplicated task_id

   the plugin isn't installed

   fuel plugins returns non-zero exit code

Actual behavior:
    fpb doesn't complain about duplicated task_id and build plugin

    the plugin is installed

    fuel plugins returns 0

description: updated
summary: - [nailgun] fuel plugins --install for plugin with duplicated task id
+ fuel plugins --install for plugin with duplicated task id
Changed in fuel:
milestone: none → 9.0
assignee: nobody → Fuel Python Team (fuel-python)
tags: added: feature-plugins
Revision history for this message
Andriy Popovych (popovych-andrey) wrote :

FPB is just generator of basic skeleton and validates correctness of plugin attributes structure not identifiers. Actually during build process FPB knows nothing about other plugins and it shouldn't.

Revision history for this message
Pavel Chechetin (paulche) wrote :

Hold on, its not about other plugins.
The issue above with collided task_id was inside one plugin.

Revision history for this message
Ilya Kutukov (ikutukov) wrote :

Validation is possible on both side, fuel and FPB, but if we want to detect problem early before plugin have been delivered it's better to detect id collision on FPB side.

description: updated
tags: added: customer-found
Changed in fuel:
status: New → Confirmed
Changed in fuel:
importance: Undecided → Medium
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/292018

Changed in fuel:
assignee: Fuel Python Team (fuel-python) → vkulanov (vitaliy-t)
status: Confirmed → In Progress
Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

Some comments to proposed fix that should be discussed:

Method 'check_deployment_tasks' in ValidatorV3 is not used for validating tasks.yaml file (in fpb).
(https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/validators/validator_v3.py#L90-L116)
But there are two unittests in test_validator_v3.py that validates type schemas of deployment tasks (from tasks.yaml) that used check_deployment_tasks:
https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/tests/test_validator_v3.py#L42
https://github.com/openstack/fuel-plugins/blob/master/fuel_plugin_builder/tests/test_validator_v3.py#L120

This is the only reason why we need to check 'id' key:
https://review.openstack.org/#/c/292018/1/fuel_plugin_builder/validators/validator_v3.py

Revision history for this message
Vitalii Kulanov (vitaliy-t) wrote :

Another point is that in the next fpb release ValidatorV4 will dealing with the only process of JSON schema validation (no business extra logic). So if we still need to validate uniqueness of task id in fpb we can try to do it: 1) by means of json-schema (not sure it is possible "in easy way" and, possible, requires schema redesign) or add extra business logic to fpb Validator.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on fuel-plugins (master)

Change abandoned by Fuel DevOps Robot (<email address hidden>) on branch: master
Review: https://review.openstack.org/292018
Reason: This review is > 4 weeks without comment, and failed Jenkins the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Dmitry Pyzhov (dpyzhov)
Changed in fuel:
milestone: 10.0 → 11.0
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.