Comment 0 for bug 1265036

Revision history for this message
Bogdan Dobrelya (bogdando) wrote : Issues with removing nodes via CLI

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

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 ist behavior and by possible actions to do with it...