ProcessExecutionError when running parted command. "sudo: no tty present..."

asked 2011-11-12 20:03:54 -0600

iz-o gravatar image

Hi -

I ran into an issue when trying to boot an instance via the "nova boot" command. I followed the instructions here: http://wiki.openstack.org/XenServerDevelopment (http://wiki.openstack.org/XenServerDe...)

Below is the log of running the following command: ~$nova boot lucid --flavor 2 --image <some_id>

start log

2011-11-12 11:48:55,119 DEBUG nova.virt.xenapi.vm_utils [-] Writing partition table 63 1024062 to /dev/xvdb... from (pid=917) _write_partition /usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py:1028 2011-11-12 11:48:55,119 DEBUG nova.utils [-] Running cmd (subprocess): sudo parted --script /dev/xvdb mklabel msdos from (pid=917) execute /usr/lib/pymodules/python2.6/nova/utils.py:150 2011-11-12 11:48:55,279 DEBUG nova.utils [-] Result was 1 from (pid=917) execute /usr/lib/pymodules/python2.6/nova/utils.py:166 2011-11-12 11:48:55,279 DEBUG nova.virt.xenapi.vm_utils [-] Destroying VBD for VDI OpaqueRef:ec785c26-1de1-bde4-9801-61fbc051d977 ... from (pid=917) with_vdi_attached_here /usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py:946 2011-11-12 11:48:56,327 DEBUG nova.virt.xenapi.vm_utils [-] VBD.unplug successful first time. from (pid=917) vbd_unplug_with_retry /usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py:961 2011-11-12 11:48:56,376 DEBUG nova.virt.xenapi.vm_utils [-] Destroying VBD for VDI OpaqueRef:ec785c26-1de1-bde4-9801-61fbc051d977 done. from (pid=917) with_vdi_attached_here /usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py:949 2011-11-12 11:48:56,377 ERROR nova.compute.manager [K1Z20MMQXU-UJSI9-LVT user myproject] Instance '11' failed to spawn. Is virtualization enabled in the BIOS? (nova.compute.manager): TRACE: Traceback (most recent call last): (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/compute/manager.py", line 234, in run_instance (nova.compute.manager): TRACE: self.driver.spawn(instance_ref) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi_conn.py", line 188, in spawn (nova.compute.manager): TRACE: self._vmops.spawn(instance) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 117, in spawn (nova.compute.manager): TRACE: vdi_uuid = self._create_disk(instance) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vmops.py", line 113, in _create_disk (nova.compute.manager): TRACE: instance.image_id, user, project, disk_image_type) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py", line 386, in fetch_image (nova.compute.manager): TRACE: access, image_type) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py", line 541, in _fetch_image_glance (nova.compute.manager): TRACE: session, instance_id, image, access, image_type) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py", line 456, in _fetch_image_glance_disk (nova.compute.manager): TRACE: lambda dev: (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py", line 944, in with_vdi_attached_here (nova.compute.manager): TRACE: return f(dev) (nova.compute.manager): TRACE: File "/usr/lib/pymodules/python2.6/nova/virt/xenapi/vm_utils.py", line 458, in <lambda> (nova.compute.manager): TRACE: virtual_size, image_file)) (nova ... (more)

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2011-11-12 20:17:37 -0600

It looks like you need to set up /etc/sudo.conf to allow your nova user to run 'parted' without asking for a password.

edit flag offensive delete link more
0

answered 2011-11-14 19:15:02 -0600

iz-o gravatar image

Thanks for the prompt response, Chris. I just went ahead and modified the sudoers file directly to allow this. I also found this forum post relevant: http://forums.openstack.org/viewtopic.php?f=10&t=126 (http://forums.openstack.org/viewtopic...)

However, the first time around, I screwed something up and hosed the sudoers file, so I'd warn anyone else who tries the approach given in the link to be careful.

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2011-11-12 20:03:54 -0600

Seen: 44 times

Last updated: Nov 14 '11