| Thread Previous • Date Previous • Date Next • Thread Next |
On 02/14/2014 04:00 AM, Julian Edwards wrote:
Got this back when doing destroy-env:
409 CONFLICT (Node cannot be released in its current state
('Commissioning').)
To recreate:
- Have one node in Declared, one node Ready.
- juju boostrap
- accept delcared node in UI so it goes Commissioning
- juju destroy-env
Boom.
I've not looked into why yet.
This is bug https://bugs.launchpad.net/maas/+bug/1237159. I looked into it this morning. The problem is two-fold:- There is wrong and redundant code in src/maasserver/api.py:[NodeHandler/NodesHandler].release() to check that the node about to be released has a "releasable" status. It's redundant because we already have a generic mechanism in place to check that a node status change is valid (see src/maasserver/node.py:Node.clean_status). It's wrong because all the nodes (meaning nodes of any status) should be "releasable" at the API level: `juju destroy-environment` calls release on every node present in the environment.
- The model code in src/maasserver/node.py:Node.release() is too strict: it won't allow a commissioning node to be released.
I'm fixing this. R.
| Thread Previous • Date Previous • Date Next • Thread Next |