It is not possible to execute a separate task

Bug #1578974 reported by Dmitriy Kruglov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Fix Released
Critical
Ihor Kalnytskyi
Mitaka
Fix Released
Critical
Ihor Kalnytskyi
Newton
Fix Released
Critical
Ihor Kalnytskyi

Bug Description

Detailed bug description:
As per the fix for the issue (https://bugs.launchpad.net/fuel/+bug/1567424) the following commit (https://github.com/openstack/fuel-library/commit/b676aa0325bb38288c8e5d337b13d70be8ad636e) introduced conditions to avoid executing some tasks during redeployment of an env if those task doesn't change anything.
This improves redeployment cases, but breaks a possibility for a cluster operator to execute a separate task for its own needs (via direct API request or Fuel CLI command, e.g. fuel node —env 1 —node 1 —tasks globals).

As a proposal some force-like flag can added to API/CLI to allow to execute a separate task on a node(s) (and probably to the corresponding API/CLI that triggers redeployment of changes).

At the moment the issue blocks QA activities for idempotency/ensurability part of LCM (6 system automated tests are affected in swarm by this).

Steps to reproduce:
1. Deploy a simple env, e.g. 1 controller + 1 compute
2. Execute an arbitrary task for a node, e.g.
fuel node --node 2 --tasks openstack-network-compute-nova

Expected result: the task is executed on the given node, last_run_report.yaml report file is (re)generated for the latest task executed.
Actual result: task is not executed, last_run_report.yaml file is not (re)generated.

Description of the environment:
MOS 9.0, build fuel-9.0-257-2016-04-28_08-00-00.iso

tags: added: area-python
removed: fuel-createmirror
Changed in fuel:
status: New → Confirmed
Revision history for this message
Alexey Shtokolov (ashtokolov) wrote :

YAQL conditions should be evaluated with empty old context for separate task runs.

Dmitry Pyzhov (dpyzhov)
no longer affects: fuel/newton
Revision history for this message
Alexey Shtokolov (ashtokolov) wrote :

RCA: It's an expected behaviour for LCM serializers w/o --force.
This bug will be fixed by "--force" support for a separate task execution.
For Newton - ETA 05/11 EOD
For Mitaka - ETA 05/12 EOD

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

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

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

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

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

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

commit 1f3bd90500202cf436f9640194e1d5e3587b3de4
Author: Igor Kalnitsky <email address hidden>
Date: Wed May 11 17:44:27 2016 +0300

    Add 'force' param for DeploySelectedNodesWithTasks

    DeploySelectedNodesWithTasks is intended to run only specified set of
    tasks on specified nodes. In Fuel 9.0 LCM serializers have been
    introduced, hence tasks are skipped if their condition return 'False'
    (and it does, since no changes may introduced).

    This introduces inconvenience for operators, who want to run particular
    task on nodes and do not care if there were changes or not. That's why
    this commit introduces the '?force' HTTP parameter for the mentioned
    handler. If 'force' is true, the task will be executed unconditionally.

    Change-Id: Icbaa2bd72c5ff2fc128a0dab4b22d6db77dd36fb
    Closes-Bug: #1578974

Changed in fuel:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (master)

Reviewed: https://review.openstack.org/315168
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=8bfb0255a1e47425ff809d26fbe10674b576d8a7
Submitter: Jenkins
Branch: master

commit 8bfb0255a1e47425ff809d26fbe10674b576d8a7
Author: Igor Kalnitsky <email address hidden>
Date: Wed May 11 19:58:23 2016 +0300

    Add 'force' param for DeploySelectedNodesWithTasks

    DeploySelectedNodesWithTasks is intended to run only specified set of
    tasks on specified nodes. In Fuel 9.0 LCM serializers have been
    introduced, hence tasks are skipped if their condition return 'False'
    (and it does, since no changes may introduced).

    This introduces inconvenience for operators, who want to run particular
    task on nodes and do not care if there were changes or not. That's why
    this commit introduces the '?force' HTTP parameter for the mentioned
    handler. If 'force' is true, the task will be executed unconditionally.

    Closes-Bug: #1578974

    Depends-On: Icbaa2bd72c5ff2fc128a0dab4b22d6db77dd36fb
    Change-Id: Iaf005341468a4e35cd82586ba3f7b585fdf4752c

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to fuel-web (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/315601

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-fuelclient (stable/mitaka)

Fix proposed to branch: stable/mitaka
Review: https://review.openstack.org/315602

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

Reviewed: https://review.openstack.org/315601
Committed: https://git.openstack.org/cgit/openstack/fuel-web/commit/?id=bf361759a672fc83212af30354d1da91fa9aaf53
Submitter: Jenkins
Branch: stable/mitaka

commit bf361759a672fc83212af30354d1da91fa9aaf53
Author: Igor Kalnitsky <email address hidden>
Date: Wed May 11 17:44:27 2016 +0300

    Add 'force' param for DeploySelectedNodesWithTasks

    DeploySelectedNodesWithTasks is intended to run only specified set of
    tasks on specified nodes. In Fuel 9.0 LCM serializers have been
    introduced, hence tasks are skipped if their condition return 'False'
    (and it does, since no changes may introduced).

    This introduces inconvenience for operators, who want to run particular
    task on nodes and do not care if there were changes or not. That's why
    this commit introduces the '?force' HTTP parameter for the mentioned
    handler. If 'force' is true, the task will be executed unconditionally.

    (cherry picked from 1f3bd90500202cf436f9640194e1d5e3587b3de4)

    Change-Id: Icbaa2bd72c5ff2fc128a0dab4b22d6db77dd36fb
    Closes-Bug: #1578974

tags: added: on-verification
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-fuelclient (stable/mitaka)

Reviewed: https://review.openstack.org/315602
Committed: https://git.openstack.org/cgit/openstack/python-fuelclient/commit/?id=fa053d076899b817e2d314612185be2afa8d3231
Submitter: Jenkins
Branch: stable/mitaka

commit fa053d076899b817e2d314612185be2afa8d3231
Author: Igor Kalnitsky <email address hidden>
Date: Wed May 11 19:58:23 2016 +0300

    Add 'force' param for DeploySelectedNodesWithTasks

    DeploySelectedNodesWithTasks is intended to run only specified set of
    tasks on specified nodes. In Fuel 9.0 LCM serializers have been
    introduced, hence tasks are skipped if their condition return 'False'
    (and it does, since no changes may introduced).

    This introduces inconvenience for operators, who want to run particular
    task on nodes and do not care if there were changes or not. That's why
    this commit introduces the '?force' HTTP parameter for the mentioned
    handler. If 'force' is true, the task will be executed unconditionally.

    (cherry picked from commit 8bfb0255a1e47425ff809d26fbe10674b576d8a7)

    Closes-Bug: #1578974

    Depends-On: Icbaa2bd72c5ff2fc128a0dab4b22d6db77dd36fb
    Change-Id: Iaf005341468a4e35cd82586ba3f7b585fdf4752c

Revision history for this message
ElenaRossokhina (esolomina) wrote :

verified on 9 iso#327
cat /etc/fuel_build_id:
 327
cat /etc/fuel_build_number:
 327
cat /etc/fuel_release:
 9.0
cat /etc/fuel_openstack_version:
 mitaka-9.0
rpm -qa | egrep 'fuel|astute|network-checker|nailgun|packetary|shotgun':
 fuel-release-9.0.0-1.mos6344.noarch
 fuel-provisioning-scripts-9.0.0-1.mos8691.noarch
 network-checker-9.0.0-1.mos72.x86_64
 fuel-mirror-9.0.0-1.mos135.noarch
 fuel-openstack-metadata-9.0.0-1.mos8691.noarch
 fuel-notify-9.0.0-1.mos8362.noarch
 fuel-ostf-9.0.0-1.mos934.noarch
 python-fuelclient-9.0.0-1.mos315.noarch
 fuelmenu-9.0.0-1.mos270.noarch
 fuel-9.0.0-1.mos6344.noarch
 fuel-utils-9.0.0-1.mos8362.noarch
 fuel-nailgun-9.0.0-1.mos8691.noarch
 rubygem-astute-9.0.0-1.mos743.noarch
 fuel-library9.0-9.0.0-1.mos8362.noarch
 shotgun-9.0.0-1.mos88.noarch
 fuel-agent-9.0.0-1.mos277.noarch
 fuel-ui-9.0.0-1.mos2684.noarch
 fuel-setup-9.0.0-1.mos6344.noarch
 nailgun-mcagents-9.0.0-1.mos743.noarch
 fuel-misc-9.0.0-1.mos8362.noarch
 python-packetary-9.0.0-1.mos135.noarch
 fuel-bootstrap-cli-9.0.0-1.mos277.noarch
 fuel-migrate-9.0.0-1.mos8362.noarch

#1. '--force' is omitted, task has skipped status
[root@nailgun ~]# fuel node --node 2 --tasks openstack-network-compute-nova
Started tasks ['openstack-network-compute-nova'] for nodes nodes [2].
[root@nailgun ~]# fuel deployment-tasks --tid 7 | grep nova
openstack-network-compute-nova | 2 | skipped | 2016-05-18T12:39:27.730987 | 2016-05-18T12:39:27.731001
enable_nova_compute_service | 2 | skipped | 2016-05-18T12:39:28.193495 | 2016-05-18T12:39:28.193510

#2. '--force' option is added, task is executed ok
[root@nailgun ~]# fuel node --node 2 --tasks openstack-network-compute-nova --force
Started tasks ['openstack-network-compute-nova'] for nodes nodes [2].
[root@nailgun ~]# date
Wed May 18 12:47:55 UTC 2016
[root@nailgun ~]# fuel deployment-tasks --tid 9 | grep nova
enable_nova_compute_service | 2 | skipped | 2016-05-18T12:47:46.122899 | 2016-05-18T12:47:46.122917
openstack-network-compute-nova | 2 | ready | 2016-05-18T12:47:38.932391 | 2016-05-18T12:47:45.594299
files are re-writed
root@node-2:~# ls -la /var/lib/puppet/state/
total 164
drwxr-xr-t. 3 puppet puppet 4096 May 18 12:47 .
drwxr-x---. 13 puppet puppet 4096 May 17 14:50 ..
-rw-------. 1 root root 83 May 17 14:38 agent_disabled.lock
drwxr-xr-x 2 root root 4096 May 17 14:48 graphs
-rw-r----- 1 root root 48735 May 18 12:47 last_run_report.yaml
-rw-r--r-- 1 root root 618 May 18 12:47 last_run_summary.yaml
-rw-rw---- 1 root root 94229 May 18 12:47 state.yaml

tags: removed: on-verification
Revision history for this message
Ksenia Svechnikova (kdemina) wrote :

New test was added to the test group: reconfigure_ml2_vlan_range_for_suite_of_nodes
Verified on fuel-10.0-256-2016-05-22

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.