Issues with adding/removing nodes via CLI vs UI
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Fuel for OpenStack |
Fix Released
|
Medium
|
Alexandr Notchenko |
Bug Description
{"build_id": "2013-12-
Steps to reproduce:
- From UI, create 2 environments env1 and env2,
- From UI add 3 nodes to env1 and 3 nodes to env2,
- provision some nodes in envs using CLI:
fuel --env 1 node --provision --node-id x,y,z
fuel --env 2 node --provision --node-id u,v,t
- make nodes in env2 to have an ERROR state, e.g. interrupt deployment of Openstack
- remove all nodes from its envs using CLI:
fuel node remove --node-id x,y,z,u,v,t
issue 1
- Check the nodes in UI: the UI-state is PENDING DELETION and never changes (see screenshot)
- Check the nodes in CLI, the CLI-states would remain as they were before removal. e.g.:
[root@fuel ~]# fuel node list
id | status | name | cluster | mac | roles | pending_roles | online
---|---
1 | provisioned | Untitled (EB:4E) | None | 00:13:72:fa:eb:4c | [] | [] | True
4 | error | mc0n5-msk (56:C8) | None | 00:25:90:94:56:c8 | [] | [] | True
5 | provisioned | Untitled (2E:44) | None | f4:ce:46:c3:2e:44 | [] | [] | True
6 | provisioned | Untitled (7A:D4) | None | f4:ce:46:c3:7a:d4 | [] | [] | True
2 | error | mc0n3-msk (57:7A) | None | 00:25:90:94:57:7a | [] | [] | True
3 | error | mc0n4-msk (5A:38) | None | 00:25:90:94:5a:38 | [] | [] | True
- But, if you re-add the nodes back and delete them again from UI, the states in UI would be correct ('OS installed' and 'error')
issue 2
- From UI & CLI, you are able to add CLI-state "provisioned" nodes to any env, despite its 'pending for deletion' UI-state (see screenshot)
[root@fuel ~]# fuel --env-id=1 node set --node-id=1,5,6 --role=controller
[root@fuel ~]# fuel node list
id | status | name | cluster | mac | roles | pending_roles | online
---|---
6 | provisioned | Untitled (7A:D4) | 1 | f4:ce:46:c3:7a:d4 | [] | [u'controller'] | True
5 | provisioned | Untitled (2E:44) | 1 | f4:ce:46:c3:2e:44 | [] | [u'controller'] | True
1 | provisioned | Untitled (EB:4E) | 1 | 00:13:72:fa:eb:4c | [] | [u'controller'] | True
2 | error | mc0n3-msk (57:7A) | None | 00:25:90:94:57:7a | [] | [] | True
3 | error | mc0n4-msk (5A:38) | None | 00:25:90:94:5a:38 | [] | [] | True
4 | error | mc0n5-msk (56:C8) | None | 00:25:90:94:56:c8 | [] | [] | True
- From UI, you *cannnot* add CLI-state "error" nodes to any env.
- But you still can do it from CLI:
[root@fuel ~]# fuel --env-id=2 node set --node-id=2,3,4 --role=controller
[root@fuel ~]# fuel node list
id | status | name | cluster | mac | roles | pending_roles | online
---|---
3 | error | mc0n4-msk (5A:38) | 2 | 00:25:90:94:5a:38 | [] | [u'controller'] | True
5 | provisioned | Untitled (2E:44) | 1 | f4:ce:46:c3:2e:44 | [] | [u'controller'] | True
6 | provisioned | Untitled (7A:D4) | 1 | f4:ce:46:c3:7a:d4 | [] | [u'controller'] | True
2 | error | mc0n3-msk (57:7A) | 2 | 00:25:90:94:57:7a | [] | [u'controller'] | True
4 | error | mc0n5-msk (56:C8) | 2 | 00:25:90:94:56:c8 | [] | [u'controller'] | True
1 | provisioned | Untitled (EB:4E) | 1 | 00:13:72:fa:eb:4c | [] | [u'controller'] | True
Fix:
- UI-state should be logically equal to CLI-state by its behavior and by possible actions to do with it...
- UI-state should not hang for ever in 'pending deletion'.
- CLI-state should be updated appropriately on every node's removal / addition.
description: | updated |
summary: |
- Issues with removing nodes via CLI + Issues with adding/removing nodes via CLI vs UI |
description: | updated |
Changed in fuel: | |
assignee: | Fuel Python Team (fuel-python) → Alexandr Notchenko (anotchenko) |
status: | Triaged → In Progress |
Changed in fuel: | |
importance: | High → Medium |
Changed in fuel: | |
status: | Fix Committed → New |
Changed in fuel: | |
milestone: | 4.1 → 4.1.1 |
status: | New → Confirmed |
tags: | added: release-notes |
>> - Check the nodes in UI: the UI-state is PENDING DELETION and never changes (see screenshot)
It should be in PENDING DELETION state unless you run deployment.
>> - Check the nodes in CLI, the CLI-states would remain as they were before removal. e.g.:
Here need to show pending_deletion flag in CLI
So, in my opinion the main problem of this ticket is that we delete deployed nodes from cluster via CLI directly without erasing and rebooting nodes.
https:/ /github. com/stackforge/ fuel-web/ blob/master/ fuelclient/ fuel#L504- L512
It should be resolved on nailgun side (api refactoring is required i.e. changes in ui and cli required too).
- create new handler for nodes deletion, this handler should accept nodes ids
- if nodes weren't provisioned then just delete them from cluster
- if nodes were provisioned then set up pending_deletion flag and nodes with such flags will be deleted after deployment