Duplicate deploy task from CLI

Bug #1538559 reported by Mikhail Samoylov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Fuel for OpenStack
Triaged
Medium
Fuel Sustaining

Bug Description

We need to check that deploying process already was started if we execute the same deploy command through CLI.
Test Scenario:
1. Create new environment
2. Choose , Neutron, Vlan
3. Add 3 controllers
4. Provision 3 controllers
(fuel node --node-id x,x,x --provision --env x)
5. Start netconfig on second controller
(fuel node --node 2 --end netconfig --env x)
6. Start the deploy
(fuel node --node 2 --deploy --env-id x)
7. Start deploy again with the same parameters
(fuel node --node 2 --deploy --env-id x)
8. Execute fuel task command

Expected result:
If we execute the second command for deploying nodes, that are already in deploying status we must get Error, not new task creation.
Actual result:
http://paste.openstack.org/show/485141/ - for each command was created new task

VERSION:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "478"
  build_id: "478"
  fuel-nailgun_sha: "ae949905142507f2cb446071783731468f34a572"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "481ed135de2cb5060cac3795428625befdd1d814"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "420c6fa5f8cb51f3322d95113f783967bde9836e"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "b62f3cce5321fd570c6589bc2684eab994c3f3f2"
  fuelmenu_sha: "fac143f4dfa75785758e72afbdc029693e94ff2b"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "9f0ba4577915ce1e77f5dc9c639a5ef66ca45896"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "6c6b088a3d52dd0eaf43d59f3a3a149c93a07e7e"

Changed in fuel:
status: New → Confirmed
Artem Roma (aroma-x)
Changed in fuel:
assignee: Fuel Python Team (fuel-python) → Artem Roma (aroma-x)
Revision history for this message
Artem Roma (aroma-x) wrote :

Nailgun process' separate provisioning/deploying of particular nodes and 'bulky' operation of deploy-changes differently. That means different task managers are involved, particularly DeploymentTaskManager [1] in case described here.

As you may see there is no any check for already created deployment task in the manager and not without good reasons - currently we cannot by any way relate to task via nodes and vice versa as there is simply no connection between these two entities (please, note that the information could be acquired after all - via cluster object link; but it is not suitable for the case on the table as we need to operate on task in context of nodes not the whole cluster).

With that being said the only way to know whether deployment task is being performed on particular node is to check status of this node in nailgun db. But I consider this way as hacky and unreliable as this data may not fully correlates with reality.

AFAIK the link will be introduced in the scope of this blueprint [2]. Hence I propose to use it then in creating checks for task managers responsible for managing of actions for separate nodes.

[1]:https://github.com/openstack/fuel-web/blob/master/nailgun/nailgun/task/manager.py#l623-l665
[2]: https://blueprints.launchpad.net/fuel/+spec/progress-bar-based-on-tasks

Changed in fuel:
status: Confirmed → Triaged
assignee: Artem Roma (aroma-x) → Fuel Python Team (fuel-python)
Revision history for this message
Dmitry Pyzhov (dpyzhov) wrote :

The bug cannot be fixed without refactoring. Adding 'need-bp' tag and moving to the 10.0 release.

tags: added: need-bp
Changed in fuel:
milestone: 9.0 → 10.0
Dmitry Pyzhov (dpyzhov)
Changed in fuel:
assignee: Fuel Python (Deprecated) (fuel-python) → Fuel Sustaining (fuel-sustaining-team)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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