Failed to deploy. Error: Cannot call save on orphaned Node object

asked 2014-12-23 23:33:44 -0500

teju gravatar image

updated 2014-12-23 23:34:33 -0500

I've implemented a simple ironic driver.

The driver works fine if I run provision command once. But, the command fails to run more than once with the error "Node is already deployed or decommissioned".

So, I've added the below code at the end of my 'deploy' method.

    node.provision_state = states.NOSTATE
    node.target_provision_state = states.NOSTATE
    node.save()

Now, when I run provision command, I see the below error message in the output of the command "ironic node-show $NODE" "Failed to deploy. Error: Cannot call save on orphaned Node object".

How to fix this?

edit retag flag offensive close merge delete