Tasks.yaml should be dropped in example plugin v3.

Bug #1625244 reported by Alexander Kurenyshev
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
High
Georgy Kibardin
8.0.x
New
High
MOS Maintenance
Newton
Confirmed
High
Fuel Sustaining

Bug Description

The file tasks.yaml [1] includes legacy tasks which should be dropped, all stuff that creates files (like cmd: echo all > /tmp/plugin-100.all) should be moved to the new file deployment_tasks.yaml [2] with corresponding requirements (stage: pre_deployment/+101.0 should be run after stage: pre_deployment/100, etc)

After that modifications test [3] should pass

Actual result:
1) file task.yaml exists and non-empty
2) file deployment_tasks.yaml doesn't include tasks for file creation
3) test [3] failed

Expected result:
1) file task.yaml removed/all lines are commented
2) file deployment_tasks.yaml includes moved tasks from tasks.yaml
3) test [3] passed

[1] https://github.com/openstack/fuel-plugins/blob/master/examples/fuel_plugin_example_v3/tasks.yaml
[2] https://github.com/openstack/fuel-plugins/blob/master/examples/fuel_plugin_example_v3/deployment_tasks.yaml
[3] https://product-ci.infra.mirantis.net/job/9.x.system_test.ubuntu.plugins.fuel_plugin_example/68/testReport/(root)/deploy_ha_one_controller_neutron_example_v3/deploy_ha_one_controller_neutron_example_v3/

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/373195

Changed in fuel:
status: New → In Progress
tags: added: non-release
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

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

commit 2ce77d627e34957fac31f1a8a05406d188a2a5b7
Author: Ilya Kutukov <email address hidden>
Date: Tue Sep 20 14:30:30 2016 +0300

    tasks.yaml was commented for plugin example v3

    Task from tasks.yaml in example v3 was running
    example.pp the second time and this have been fixed.

    Change-Id: Ic4263cc7998f9bba9f0144ddc46613d30fa5c002
    Closes-Bug: #1625244

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Alexander Kurenyshev (akurenyshev) wrote :

Not all conditions from Expected result are satisfied:
item 2: all tasks related to the `echo to file` should be moved from tasks.yaml to the deployment_tasks.yaml.
item 3: test passed

Tasks weren't moved to the deployment tasks yaml file and that's why test [1] failed with:
FAIL: Deploy cluster with one controller and example plugin v3
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/proboscis/case.py", line 296, in testng_method_mistake_capture_func
    compatability.capture_type_error(s_func)
  File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/proboscis/compatability/exceptions_2_6.py", line 27, in capture_type_error
    func()
  File "/home/jenkins/venv-nailgun-tests-2.9/local/lib/python2.7/site-packages/proboscis/case.py", line 350, in func
    func(test_case.state.get_state())
  File "/home/jenkins/workspace/9.x.custom.ubuntu.system_test/fuelweb_test/helpers/decorators.py", line 120, in wrapper
    result = func(*args, **kwargs)
  File "/home/jenkins/workspace/9.x.custom.ubuntu.system_test/fuelweb_test/tests/plugins/plugin_example/test_fuel_plugin_example.py", line 200, in deploy_ha_one_controller_neutron_example_v3
    checkers.check_file_exists(slave1['ip'], '/tmp/plugin+100.0.all')
  File "/home/jenkins/workspace/9.x.custom.ubuntu.system_test/core/helpers/log_helpers.py", line 32, in wrapped
    result = func(*args, **kwargs)
  File "/home/jenkins/workspace/9.x.custom.ubuntu.system_test/fuelweb_test/helpers/checkers.py", line 242, in check_file_exists
    'Can not find {0}'.format(path))
AssertionError: Can not find /tmp/plugin+100.0.all

[1] https://custom-ci.infra.mirantis.net/view/9.x/job/9.x.custom.ubuntu.system_test/485/console

Changed in fuel:
status: Fix Committed → Confirmed
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/376996

Changed in fuel:
status: Confirmed → In Progress
Revision history for this message
Andrey Maximov (maximov) wrote :

downgraded to High, doesn't seem to be critical at all. We just missed some cleanup work, why it was promoted to critical?

Changed in fuel:
importance: Critical → High
Andrey Maximov (maximov)
Changed in fuel:
milestone: 9.1 → 9.2
Revision history for this message
Alexandra (aallakhverdieva) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to fuel-plugins (master)

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

commit 40bca6b4f0db21f8181665cbab807daacf43c81d
Author: Ilya Kutukov <email address hidden>
Date: Mon Sep 26 21:09:40 2016 +0300

    Legacy tasks are turned back for exmaple v3.0.0

    In previous patch tasks.yaml contained legacy tasks was cleaned up
    but it turned up that some QA tests was relying on this tasks output
    so this tasks was moved to the deployment_tasks.yaml to provide this
    output.

    Double unfortuantely FPB validation does not support tasks <v1.0.0
    validation for the deployment_tasks.yaml without major changes in
    validation logic.

    So the tasks was converted to the tasks v1.0.0 by adding tasks id.

    Change-Id: I1f820030a0575155b06db3c493accadc252c241a
    Closes-Bug: #1625244

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Maksym Strukov (unbelll) wrote :
Changed in fuel:
status: Fix Committed → Confirmed
Changed in fuel:
assignee: Ilya Kutukov (ikutukov) → Fuel Sustaining (fuel-sustaining-team)
Changed in fuel:
assignee: Fuel Sustaining (fuel-sustaining-team) → Georgy Kibardin (gkibardin)
Changed in fuel:
status: Confirmed → In Progress
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/398316

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

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

commit 50dbec6184e3f4d986704b38c9156c2423218c42
Author: Georgy Kibardin <email address hidden>
Date: Wed Nov 16 15:04:05 2016 +0300

    Remove reboot task

    This task isn't needed for example purposes but it indirectly conflicts
    with other task which are cruicial for tests. These tasks create files
    in /tmp but the reboot task makes them disappear.

    Change-Id: Iff09fb84c04737813455cc7cc75502f14c992e90
    Closes-Bug: #1625244

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
Evgeniy L (rustyrobot) wrote :

Plugin of version 3 must include reboot task, I don't see any reason to remove it from version 3, if files in `/tmp` directory is concern, create these files in different place. What this patch did is removed a valid test case.

Re-opening the ticket.

Changed in fuel:
status: Fix Committed → Confirmed
Revision history for this message
Georgy Kibardin (gkibardin) wrote :

Evgeniy, what use case are you talking about? I talked to QA guys - they have no any. Until recently this reboot task lived in tasks.yaml which mean that by default it hasn't been executed since 9.0 and this doesn't seem to break any test.

Revision history for this message
Georgy Kibardin (gkibardin) wrote :

There is a separate test which tests reboot task in plugin https://product-ci.infra.mirantis.net/job/9.x.system_test.ubuntu.fuel_plugin_reboot and it doesn't use plugin example v3

Changed in fuel:
status: Confirmed → Fix Committed
Revision history for this message
TatyanaGladysheva (tgladysheva) wrote :

Verified on 9.2 snapshot #659.

Test deploy_ha_one_controller_neutron_example_v3 is passed since #541 snapshot (#137 run from 23 Nov, 2016 12:38:10 AM):
https://product-ci.infra.mirantis.net/job/9.x.system_test.ubuntu.plugins.fuel_plugin_example/159/testReport/(root)/deploy_ha_one_controller_neutron_example_v3/deploy_ha_one_controller_neutron_example_v3/.

Changed in fuel:
status: Fix Committed → Fix Released
Revision history for this message
Dmitry Belyaninov (dbelyaninov) wrote :
no longer affects: fuel/8.0.x
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.