Comment 14 for bug 1259910

Revision history for this message
Max Lobur (max-lobur) wrote :

Hi Lucas,

How about a temporary quick fix until we get a final approach? Just check reservation in the API

ironic/api/controllers/v1/node.py

def power(self, node_uuid, target):
    rpc_node = objects.Node.get_by_uuid(pecan.request.context, node_uuid)
    if rpc_node.reservation:
        raise wsme.exc.ClientSideError(msg, status_code=409) # Conflict
    .....

This require to change only one file and we will be able to quickly pass all the reviews and merge it