Trivial: log which state the node is in

Change-Id: I87326585896cae9df717e9d19b2ea441d92d3b1a
This commit is contained in:
Dmitry Tantsur 2022-07-06 16:51:43 +02:00
parent a4bf31de61
commit 0f16273886

View File

@ -2338,13 +2338,15 @@ class ConductorManager(base_manager.BaseConductorManager):
action = _("Port %(port)s can not have any connectivity "
"attributes (%(connect)s) updated unless "
"node %(node)s is in a %(allowed)s state "
"or in maintenance mode.")
"or in maintenance mode. The current state is "
"%(state)s.")
raise exception.InvalidState(
action % {'port': port_uuid,
'node': node.uuid,
'connect': ', '.join(connectivity_attr),
'allowed': ', '.join(allowed_update_states)})
'allowed': ', '.join(allowed_update_states),
'state': node.provision_state})
utils.validate_port_physnet(task, port_obj)
task.driver.network.validate(task)