Community

Discussions  |  Feature Requests  |  Tips and Tricks

No such file or directory: '/dev/urandom' on nimbula-bundle

#1June 19, 2012 22:14:54

Yuriy Kogun
Registered: 2011-12-12
Posts: 1

No such file or directory: '/dev/urandom' on nimbula-bundle

We upgraded our CentOS VMs kernel version from 2.6.32-220.4.2.el6.x86_64 to 2.6.32-220.23.1.el6.x86_64 and modified the grub.conf file to be able to boot. However since the upgrade we are no longer able to create a bundle using:

nimbula-bundle -r 10000 -s 1024 -p image_take1 / -v

which fails with the following error. It looks like the /dev/XXX devices are not available in the chroot'd environment. Any suggestions on how I can get around this problem ?

/usr/lib/python2.6/site-packages/nimbula/bundle/utils.py:6: DeprecationWarning: The popen2 module is deprecated. Use the subprocess module.
from popen2 import Popen3
2012-06-20 06:15:40 INFO nimbula.bundle.inputters.directory: Copying source into temporary directory.
2012-06-20 06:15:40 DEBUG nimbula.bundle.utils: Running rsync --version
2012-06-20 06:15:40 DEBUG nimbula.bundle.utils: Running rsync -avHxAX --exclude /tmp/bundlen52thy // /tmp/bundlen52thy/
2012-06-20 06:16:20 DEBUG nimbula.bundle.adapters.redhat: Adapting for Red Hat
2012-06-20 06:16:20 DEBUG nimbula.bundle.utils: Running chroot /tmp/bundlen52thy rpm -qa glibc --qf %{arch}
2012-06-20 06:16:21 DEBUG nimbula.bundle.adapters.redhat: Detected installed architecture as x86_64.
2012-06-20 06:16:21 INFO nimbula.bundle.adapters.base: Writing /etc/fstab.
2012-06-20 06:16:21 DEBUG nimbula.bundle.adapters.redhat: Configuring mkinitrd to include virtio drivers using /tmp/bundlen52thy/etc/sysconfig/mkinitrd.
2012-06-20 06:16:21 INFO nimbula.bundle.adapters.redhat: Installing kernel.
2012-06-20 06:16:21 DEBUG nimbula.bundle.utils: Running chroot /tmp/bundlen52thy yum --verbose -y install kernel
2012-06-20 06:16:21 ERROR nimbula.bundle.bundle: Error while bundling image.
Traceback (most recent call last):
File "/usr/lib/python2.6/site-packages/nimbula/bundle/bundle.py", line 61, in run
adapter.adapt()
File "/usr/lib/python2.6/site-packages/nimbula/bundle/adapters/redhat.py", line 25, in adapt
self._install_kernel()
File "/usr/lib/python2.6/site-packages/nimbula/bundle/adapters/redhat.py", line 56, in _install_kernel
self._yum(('install', 'kernel'))
File "/usr/lib/python2.6/site-packages/nimbula/bundle/adapters/redhat.py", line 95, in _yum
return self._chroot(yum)
File "/usr/lib/python2.6/site-packages/nimbula/bundle/adapters/base.py", line 44, in _chroot
return run(chroot, *args, **kwargs)
File "/usr/lib/python2.6/site-packages/nimbula/bundle/utils.py", line 55, in run
raise ProcessException(u'%s exited with code %s: %s' % (command[0], code, error.getvalue()))
ProcessException: chroot exited with code 256: Traceback (most recent call last):
File "/usr/bin/yum", line 4, in <module>
import yum
File "/usr/lib/python2.6/site-packages/yum/__init__.py", line 46, in <module>
import tempfile
File "/usr/lib64/python2.6/tempfile.py", line 34, in <module>
from random import Random as _Random
File "/usr/lib64/python2.6/random.py", line 873, in <module>
_inst = Random()
File "/usr/lib64/python2.6/random.py", line 96, in __init__
self.seed(x)
File "/usr/lib64/python2.6/random.py", line 110, in seed
a = long(_hexlify(_urandom(16)), 16)
OSError: [Errno 2] No such file or directory: '/dev/urandom'

2012-06-20 06:16:21 INFO nimbula.bundle.inputters.directory: Cleaning up temporary directory.
2012-06-20 06:16:21 DEBUG nimbula.bundle.utils: Running rm -rfv /tmp/bundlen52thy
 

#2June 25, 2012 05:47:21

Jacqui Latimer
Registered: 2010-09-13
Posts: 13

No such file or directory: '/dev/urandom' on nimbula-bundle

HI Yuri

This issue will be resolved in out next point release. In the interim, the patch was attached to the support ticket you logged for this issue.

Jacqui