Duplicate deploy task from CLI
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://
VERSION:
feature_groups:
- mirantis
production: "docker"
release: "8.0"
api: "1.0"
build_number: "478"
build_id: "478"
fuel-nailgun_sha: "ae949905142507
python-
fuel-agent_sha: "481ed135de2cb5
fuel-
astute_sha: "b81577a5b7857c
fuel-library_sha: "420c6fa5f8cb51
fuel-ostf_sha: "ab5fd151fc6c1a
fuel-mirror_sha: "b62f3cce5321fd
fuelmenu_sha: "fac143f4dfa757
shotgun_sha: "63645dea384a37
network-
fuel-upgrade_sha: "616a7490ec7199
fuelmain_sha: "6c6b088a3d52dd
Changed in fuel: | |
status: | New → Confirmed |
Changed in fuel: | |
assignee: | Fuel Python Team (fuel-python) → Artem Roma (aroma-x) |
Changed in fuel: | |
assignee: | Fuel Python (Deprecated) (fuel-python) → Fuel Sustaining (fuel-sustaining-team) |
Nailgun process' separate provisioning/ deploying of particular nodes and 'bulky' operation of deploy-changes differently. That means different task managers are involved, particularly DeploymentTaskM anager [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 /blueprints. launchpad. net/fuel/ +spec/progress- bar-based- on-tasks
[2]: https:/