Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Can't fetch the device UUID when deploying the baremetal node

I used nova-baremetal to deploy a node, and it worked. But it's just a ubuntu node.

But when I used the diskimage-builder to create a image with openstack, the deployment failed.

I got the error message from nova-baremetal-deploy-helper:

2014-02-28 12:29:45.905 ERROR nova.virt.baremetal.deploy_helper [req-dc56aa91-019b-491e-9093-0cf9a4bd39ed None None] deployment to node 1 failed
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Traceback (most recent call last):
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 292, in run
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     deploy(*params)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 257, in deploy
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     LOG.error(_("StdErr  : %r"), err.stderr)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     six.reraise(self.type_, self.value, self.tb)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 251, in deploy
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     image_path, preserve_ephemeral)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 231, in work_on_disk
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     LOG.error(_("Failed to detect root device UUID."))
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     six.reraise(self.type_, self.value, self.tb)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 228, in work_on_disk
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     root_uuid = block_uuid(root_part)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 146, in block_uuid
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     check_exit_code=[0])
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/utils.py", line 165, in execute
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     return processutils.execute(cmd, **kwargs)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/processutils.py", line 193, in execute
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     cmd=' '.join(cmd))
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper ProcessExecutionError: Unexpected error while running command.
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Command: sudo nova-rootwrap /etc/nova/rootwrap.conf blkid -s UUID -o value /dev/disk/by-path/ip-192.168.100.11:3260-iscsi-iqn-0f715f00-0e49-4fea-aed6-896bfc60fb9e-lun-1-part1
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Exit code: 2
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Stdout: ''
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Stderr: ''

We can see with this command 'sudo nova-rootwrap /etc/nova/rootwrap.conf blkid -s UUID -o value /dev/disk/by-path/ip-192.168.100.11:3260-iscsi-iqn-0f715f00-0e49-4fea-aed6-896bfc60fb9e-lun-1-part1', we can't get the UUID.

I also investigated how to use 'blkid', and it seems 'blkid' can't fetch UUID from the device.

Can anyone give some advice?

Can't fetch the device UUID when deploying the baremetal node

I used nova-baremetal to deploy a node, and it worked. But it's just a ubuntu node.

But when I used the diskimage-builder to create a image with openstack, the deployment failed.

I got the error message from nova-baremetal-deploy-helper:

2014-02-28 12:29:45.905 ERROR nova.virt.baremetal.deploy_helper [req-dc56aa91-019b-491e-9093-0cf9a4bd39ed None None] deployment to node 1 failed
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Traceback (most recent call last):
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 292, in run
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     deploy(*params)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 257, in deploy
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     LOG.error(_("StdErr  : %r"), err.stderr)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     six.reraise(self.type_, self.value, self.tb)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 251, in deploy
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     image_path, preserve_ephemeral)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 231, in work_on_disk
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     LOG.error(_("Failed to detect root device UUID."))
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     six.reraise(self.type_, self.value, self.tb)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 228, in work_on_disk
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     root_uuid = block_uuid(root_part)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 146, in block_uuid
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     check_exit_code=[0])
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/utils.py", line 165, in execute
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     return processutils.execute(cmd, **kwargs)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/processutils.py", line 193, in execute
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     cmd=' '.join(cmd))
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper ProcessExecutionError: Unexpected error while running command.
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Command: sudo nova-rootwrap /etc/nova/rootwrap.conf blkid -s UUID -o value /dev/disk/by-path/ip-192.168.100.11:3260-iscsi-iqn-0f715f00-0e49-4fea-aed6-896bfc60fb9e-lun-1-part1
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Exit code: 2
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Stdout: ''
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Stderr: ''

We can see with this command 'sudo nova-rootwrap /etc/nova/rootwrap.conf blkid -s UUID -o value /dev/disk/by-path/ip-192.168.100.11:3260-iscsi-iqn-0f715f00-0e49-4fea-aed6-896bfc60fb9e-lun-1-part1', we can't get the UUID.

I also investigated how to use 'blkid', and it seems 'blkid' found:

$ ls -l
合計 0
lrwxrwxrwx 1 root root  9  2月 28 14:28 ip-192.168.100.11:3260-iscsi-iqn-3b4aba50-277b-4b28-95d9-5675de95030c-lun-1 -> ../../sdb
lrwxrwxrwx 1 root root 10  2月 28 14:28 ip-192.168.100.11:3260-iscsi-iqn-3b4aba50-277b-4b28-95d9-5675de95030c-lun-1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10  2月 28 14:28 ip-192.168.100.11:3260-iscsi-iqn-3b4aba50-277b-4b28-95d9-5675de95030c-lun-1-part2 -> ../../sdb2

$ ls -la /dev/sdb*
brw-rw---- 1 root disk 8, 16  2月 28 14:28 /dev/sdb
brw-rw---- 1 root disk 8, 17  2月 28 14:31 /dev/sdb1
brw-rw---- 1 root disk 8, 18  2月 28 14:28 /dev/sdb2

$ sudo blkid
/dev/sda1: UUID="3da45df2-d642-4be0-b593-4b2cf29e5b3c" TYPE="ext2"
/dev/sda5: UUID="SU4FDr-TItP-V1cZ-EbFc-KfB1-m9i8-jq6n2T" TYPE="LVM2_member"
/dev/mapper/controller--02-root: UUID="d97632c5-7a2f-4a3f-b260-a2665b27e808" TYPE="ext4"
/dev/mapper/controller--02-swap_1: UUID="b8f63207-409f-44ea-8a40-a4edef9f0d12" TYPE="swap"
/dev/loop0: UUID="8pM5g5-Gb17-nsdC-RmKS-LOX1-h4el-hgX1tT" TYPE="LVM2_member"
/dev/disk/by-path/pci-0000:07:00.0-scsi-0:2:0:0-part1: UUID="3da45df2-d642-4be0-b593-4b2cf29e5b3c" TYPE="ext2"
/dev/disk/by-path/pci-0000:07:00.0-scsi-0:2:0:0-part5: UUID="SU4FDr-TItP-V1cZ-EbFc-KfB1-m9i8-jq6n2T" TYPE="LVM2_member"
/dev/sdb2: LABEL="swap1" UUID="dfc913f2-0e4e-45ac-b618-2e3b9d6f2641" TYPE="swap"

we can see when 'sudo blkid' is executed, '/dev/sdb2' is output, but '/dev/sdb1' is none. So the command can't fetch UUID from the device.get the UUID.

Can anyone give some advice?

Can't fetch the device UUID when deploying the baremetal node

I used nova-baremetal to deploy a node, and it worked. But it's just a ubuntu node.

But when I used the diskimage-builder to create a image with openstack, the deployment failed.

I got the error message from nova-baremetal-deploy-helper:

2014-02-28 12:29:45.905 ERROR nova.virt.baremetal.deploy_helper [req-dc56aa91-019b-491e-9093-0cf9a4bd39ed None None] deployment to node 1 failed
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Traceback (most recent call last):
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 292, in run
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     deploy(*params)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 257, in deploy
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     LOG.error(_("StdErr  : %r"), err.stderr)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     six.reraise(self.type_, self.value, self.tb)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 251, in deploy
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     image_path, preserve_ephemeral)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 231, in work_on_disk
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     LOG.error(_("Failed to detect root device UUID."))
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/excutils.py", line 68, in __exit__
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     six.reraise(self.type_, self.value, self.tb)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 228, in work_on_disk
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     root_uuid = block_uuid(root_part)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/cmd/baremetal_deploy_helper.py", line 146, in block_uuid
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     check_exit_code=[0])
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/utils.py", line 165, in execute
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     return processutils.execute(cmd, **kwargs)
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper   File "/opt/stack/nova/nova/openstack/common/processutils.py", line 193, in execute
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper     cmd=' '.join(cmd))
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper ProcessExecutionError: Unexpected error while running command.
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Command: sudo nova-rootwrap /etc/nova/rootwrap.conf blkid -s UUID -o value /dev/disk/by-path/ip-192.168.100.11:3260-iscsi-iqn-0f715f00-0e49-4fea-aed6-896bfc60fb9e-lun-1-part1
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Exit code: 2
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Stdout: ''
2014-02-28 12:29:45.905 TRACE nova.virt.baremetal.deploy_helper Stderr: ''

We can see with this command 'sudo nova-rootwrap /etc/nova/rootwrap.conf blkid -s UUID -o value /dev/disk/by-path/ip-192.168.100.11:3260-iscsi-iqn-0f715f00-0e49-4fea-aed6-896bfc60fb9e-lun-1-part1', we can't get the UUID.

I also found:

$ ls -l
合計 0
lrwxrwxrwx 1 root root  9  2月 28 14:28 ip-192.168.100.11:3260-iscsi-iqn-3b4aba50-277b-4b28-95d9-5675de95030c-lun-1 -> ../../sdb
lrwxrwxrwx 1 root root 10  2月 28 14:28 ip-192.168.100.11:3260-iscsi-iqn-3b4aba50-277b-4b28-95d9-5675de95030c-lun-1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10  2月 28 14:28 ip-192.168.100.11:3260-iscsi-iqn-3b4aba50-277b-4b28-95d9-5675de95030c-lun-1-part2 -> ../../sdb2

$ ls -la /dev/sdb*
brw-rw---- 1 root disk 8, 16  2月 28 14:28 /dev/sdb
brw-rw---- 1 root disk 8, 17  2月 28 14:31 /dev/sdb1
brw-rw---- 1 root disk 8, 18  2月 28 14:28 /dev/sdb2

$ sudo blkid
/dev/sda1: UUID="3da45df2-d642-4be0-b593-4b2cf29e5b3c" TYPE="ext2"
/dev/sda5: UUID="SU4FDr-TItP-V1cZ-EbFc-KfB1-m9i8-jq6n2T" TYPE="LVM2_member"
/dev/mapper/controller--02-root: UUID="d97632c5-7a2f-4a3f-b260-a2665b27e808" TYPE="ext4"
/dev/mapper/controller--02-swap_1: UUID="b8f63207-409f-44ea-8a40-a4edef9f0d12" TYPE="swap"
/dev/loop0: UUID="8pM5g5-Gb17-nsdC-RmKS-LOX1-h4el-hgX1tT" TYPE="LVM2_member"
/dev/disk/by-path/pci-0000:07:00.0-scsi-0:2:0:0-part1: UUID="3da45df2-d642-4be0-b593-4b2cf29e5b3c" TYPE="ext2"
/dev/disk/by-path/pci-0000:07:00.0-scsi-0:2:0:0-part5: UUID="SU4FDr-TItP-V1cZ-EbFc-KfB1-m9i8-jq6n2T" TYPE="LVM2_member"
/dev/sdb2: LABEL="swap1" UUID="dfc913f2-0e4e-45ac-b618-2e3b9d6f2641" TYPE="swap"

we can see when 'sudo blkid' is executed, '/dev/sdb2' is output, but '/dev/sdb1' is none. So the command can't get the UUID.

Can anyone give some advice?