can`t delete unreachable baremetal ironic node and port with ironic command
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ironic |
Incomplete
|
Undecided
|
Zhenguo Niu |
Bug Description
* Detailed description of the problem and step-by-step instruction on how to reproduce it.
I have setup an all-in-one stable/juno devstack environment, when I try to delete ironic node and port found that these command may fails occasionally.
* Version: ironic stable/juno with Devstack all-in-one installation
* Output of utilities run:
Delete new node pass and failed:
stack@dl580-5:~$ ironic node-create -d pxe_ipmitool -i pxe_deploy_
+------
| Property | Value |
+------
| uuid | f3f1fdda-
| driver_info | {u'pxe_
| | u'pxe_deploy_
| | u'ipmi_address': u'10.100.2.124', u'ipmi_username': u'admin', |
| | u'ipmi_password': u'12345678'} |
| extra | {} |
| driver | pxe_ipmitool |
| chassis_uuid | None |
| properties | {u'memory_mb': u'1024', u'cpu_arch': u'amd64', u'local_gb': u'300', |
| | u'cpus': u'1'} |
+------
stack@dl580-5:~$ ironic node-delete f3f1fdda-
Deleted node f3f1fdda-
stack@dl580-5:~$ ironic node-create -d pxe_ipmitool -i pxe_deploy_
+------
| Property | Value |
+------
| uuid | d15b919f-
| driver_info | {u'pxe_
| | u'pxe_deploy_
| | u'ipmi_address': u'10.100.2.124', u'ipmi_username': u'admin', |
| | u'ipmi_password': u'12345678'} |
| extra | {} |
| driver | pxe_ipmitool |
| chassis_uuid | None |
| properties | {u'memory_mb': u'1024', u'cpu_arch': u'amd64', u'local_gb': u'300', |
| | u'cpus': u'1'} |
+------
stack@dl580-5:~$ ironic node-delete d15b919f-
'unicode' object has no attribute 'get'
stack@dl580-5:~$ ironic node-delete d15b919f-
'unicode' object has no attribute 'get'
Delete node with a port failed occasionally:
stack@dl580-5:~$ ironic node-list
+------
| UUID | Instance UUID | Power State | Provisioning State | Maintenance |
+------
| 99590a94-
| 7130fa76-
| 87cebaed-
+------
stack@dl580-5:~$ ironic port-create -a 80:c1:6e:78:ac:80 -n 7130fa76-
+------
| Property | Value |
+------
| node_uuid | 7130fa76-
| extra | {} |
| uuid | 3b382567-
| address | 80:c1:6e:78:ac:80 |
+------
stack@dl580-5:~$ ironic node-delete 7130fa76-
'unicode' object has no attribute 'get'
stack@dl580-5:~$ ironic port-delete 3b382567-
'unicode' object has no attribute 'get'
stack@dl580-5:~$ ironic port-list
+------
| UUID | Address |
+------
| 51406b57-
| 3b382567-
+------
stack@dl580-5:~$ ironic port-delete 3b382567-
Deleted port 3b382567-
stack@dl580-5:~$ ironic node-delete 7130fa76-
Deleted node 7130fa76-
Ironic api error logs for deleting new node failed:
2014-11-05 16:29:04.441 WARNING wsme.api [-] Client-side error: Node d15b919f-
Traceback (most recent call last):
File "/usr/local/
return func(*args, **kwargs)
File "/opt/stack/
with task_manager.
File "/opt/stack/
driver_
File "/opt/stack/
self.
File "/usr/local/
six.
File "/opt/stack/
reserve_node()
File "/usr/local/
return Retrying(*dargs, **dkw).call(f, *args, **kw)
File "/usr/local/
raise attempt.get()
File "/usr/local/
six.
File "/usr/local/
attempt = Attempt(fn(*args, **kwargs), attempt_number, False)
File "/opt/stack/
self.node = objects.
File "/opt/stack/
result = fn(cls, context, *args, **kwargs)
File "/opt/stack/
db_node = cls.dbapi.
File "/opt/stack/
host=
NodeLocked: Node d15b919f-
summary: |
- can`t delete ironic node and port with ironic command + can`t delete unreachable baremetal ironic node and port with ironic + command |
Changed in ironic: | |
status: | New → Confirmed |
Changed in ironic: | |
assignee: | nobody → Zhenguo Niu (niu-zglinux) |
Hi. I don't believe this to be a bug.
The driver that *should* be used with devstack is the pxe_ssh driver. You seem to be trying to use the pxe_ipmitool driver. Using that driver with virtual machines acting as bare metal machines will lock the nodes when the periodic task to sync the power states runs in the conductor. The pxe_ipmitool driver will attempt to use ipmitool to perform operations on the nodes, which will not work on VMs and take a while to timeout, which keeps the node locked during this time.