Ask Your Question
0

Nova instance create failing

asked 2016-03-03 06:00:33 -0500

parash_hallur gravatar image

updated 2016-03-03 08:42:58 -0500

Hello, I have setup devstack on RHEL physical node. I'm trying to create instance, however getting following error.

"RescheduledException: Build of instance d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa was re-scheduled: **Cannot access storage file '/opt/stack/data/nova/instances/d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa/disk' (as uid:107, gid:107): Permission denied**\n

**NoValidHost: No valid host was found. There are not enough hosts available.**

Logs below

   2016-03-03 01:40:27.170 ^[[01;31mERROR nova.scheduler.utils [^[[01;36mreq-020eb25e-eba1-42ce-8749-0d9fb1ed33fe ^[[00;36madmin admin^[[01;31m] ^[[01;35m[instance: d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa] ^[[01;31mError from last host: XXXXX (node xxxx.lss.xxx.com): [u'Traceback (most recent call last):\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 2248, in _do_build_and_run_instance\n    filter_properties)\n', u'  File "/opt/stack/nova/nova/compute/manager.py", line 2393, in _build_and_run_instance\n    instance_uuid=instance.uuid, reason=six.text_type(e))\n', u"RescheduledException: Build of instance d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa was re-scheduled: Cannot access storage file '/opt/stack/data/nova/instances/d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa/disk' (as uid:107, gid:107): Permission denied\n"]^[[00m
2016-03-03 01:40:27.173 ^[[00;36mINFO oslo_messaging._drivers.impl_rabbit [^[[01;36mreq-020eb25e-eba1-42ce-8749-0d9fb1ed33fe ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mConnecting to AMQP server on 10.247.15.109:5672^[[00m
2016-03-03 01:40:27.188 ^[[00;36mINFO oslo_messaging._drivers.impl_rabbit [^[[01;36mreq-020eb25e-eba1-42ce-8749-0d9fb1ed33fe ^[[00;36madmin admin^[[00;36m] ^[[01;35m^[[00;36mConnected to AMQP server on 10.247.15.109:5672^[[00m
2016-03-03 01:40:27.215 ^[[01;33mWARNING nova.scheduler.utils [^[[01;36mreq-020eb25e-eba1-42ce-8749-0d9fb1ed33fe ^[[00;36madmin admin^[[01;33m] ^[[01;35m^[[01;33mFailed to compute_task_build_instances: No valid host was found. There are not enough hosts available.
Traceback (most recent call last):

  File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 142, in inner
    return func(*args, **kwargs)

  File "/opt/stack/nova/nova/scheduler/manager.py", line 86, in select_destinations
    filter_properties)

  File "/opt/stack/nova/nova/scheduler/filter_scheduler.py", line 80, in select_destinations
    raise exception.NoValidHost(reason=reason)

NoValidHost: No valid host was found. There are not enough hosts available.
^[[00m
2016-03-03 01:40:27.215 ^[[01;33mWARNING nova.scheduler.utils [^[[01;36mreq-020eb25e-eba1-42ce-8749-0d9fb1ed33fe ^[[00;36madmin admin^[[01;33m] ^[[01;35m[instance: d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa] ^[[01;33mSetting instance to ERROR state.^[[00m

UPDATE:

Hi Thank you for the response. I suspected that could be the issue, I tried changing the permissions after I have posted the question here.

Originally the permision tree was as below

  > [stack@Node devstack]$ namei -l /opt/stack/data/nova/instances/_base
f: /opt/stack/data/nova/instances/_base
dr-xr-xr-x root  root     /
drwxr-xr-x root  root     opt
drwxr-xr-x stack root     stack
drwxr-x--- stack stack    data
drwxr-xr-x stack root     nova
drwxr-xr-x stack root     instances
drwxrwxr-x stack libvirtd _base

I changed it as below

[stack@Node devstack]$ sudo chown stack:libvirtd /opt/stack/data/nova/instances
[stack@Node devstack]$ namei -l /opt/stack/data/nova/instances/_base
f: /opt/stack/data/nova/instances/_base
dr-xr-xr-x root  root     /
drwxr-xr-x root  root     opt
drwxr-xr-x stack root     stack
drwxr-x--- stack stack    data
drwxr-xr-x stack root     nova
drwxr-xr-x stack libvirtd instances
drwxrwxr-x stack libvirtd _base

I saw the same issue. Then ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-03-03 06:23:49 -0500

Hi,

Check permission under /opt/stack/data/nova/instances/ and /opt/stack/data/nova/instances/d93f5a1c-0165-4aeb-b7a6-bc33061d1aaa/disk. Probably they don't have the correct owner and proper permissions.

As an example, check how i got a running environment.

[root@fellacompqrr ~]# ls -lsrt /var/lib/nova/
total 0
0 drwxr-xr-x. 2 nova nova  6 ago 21  2015 tmp
0 drwxr-xr-x. 2 nova nova  6 ago 21  2015 networks
0 drwxr-xr-x. 2 nova nova  6 ago 21  2015 keys
0 drwxr-xr-x. 2 nova nova  6 ago 21  2015 buckets
0 drwxr-xr-x. 5 nova nova 93 mar  3 11:32 instances

[root@fellacompqrr ~]# ls -lsrt /var/lib/nova/instances/4a8ef360-2f5a-47b3-9df8-2de4c18017a0/
total 1568
   4 -rw-r--r--. 1 nova nova      79 mar  3 11:32 disk.info
   4 -rw-r--r--. 1 nova nova    2609 mar  3 11:32 libvirt.xml
  20 -rw-rw----. 1 qemu qemu   19588 mar  3 11:33 console.log
1540 -rw-r--r--. 1 qemu qemu 1572864 mar  3 11:34 disk

Regards

edit flag offensive delete link more

Comments

Hello I hit the same error but i checked all folder have nova;nova also my /etc/sudeors account i put nova user ? but i still i get this error but not permissions. i get error Build of instance 4c24c6a7-9d0e-4744-a182-2857cc99b899 aborted: Failed to allocate the network(s), not rescheduling

rushi gravatar imagerushi ( 2016-05-05 19:11:18 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2016-03-03 06:00:33 -0500

Seen: 849 times

Last updated: Mar 03 '16