Ask Your Question
0

Unable to attach volumes to instances

asked 2015-11-29 20:24:05 -0500

nag gravatar image

updated 2015-11-29 20:37:35 -0500

Hi,

I have a problem in attaching cinder volume to instance.

environment: Openstack multi-node deployement -- kilo --centos

[root@block1 ~]# cd /etc/cinder/ [root@block1 cinder]# ls api-paste.ini cinder.conf policy.json rootwrap.conf volumes (rootwrap.d dir is missing which has volume filter -- i suspect this is error . what is it's role ? (In both controller & cinder nodes))

[root@block1 cinder]# vim /var/log/cinder/volume.log

2015-11-29 03:15:06.926 23359 INFO cinder.volume.manager [req-9a3fc5f4-0fc9-46f2-bf6c-73c263b28bd4 - - - - -] Updating volume status 2015-11-29 03:16:06.927 23359 INFO cinder.volume.manager [req-9c983c1b-23dd-44a4-83b4-d9b26a7b43d4 - - - - -] Updating volume status 2015-11-29 03:17:06.927 23359 INFO cinder.volume.manager [req-a0fe6b63-607e-450b-9732-602b9cd0b86d - - - - -] Updating volume status

[root@controller ~]# tail -f /var/log/cinder/cinder-manage.log 2015-11-25 12:50:40.708 7290 TRACE cinder File "/usr/lib/python2.7/site-packages/cinder/cmd/manage.py", line 230, in sync 2015-11-25 12:50:40.708 7290 TRACE cinder return db_migration.db_sync(version) 2015-11-25 12:50:40.708 7290 TRACE cinder File "/usr/lib/python2.7/site-packages/cinder/db/migration.py", line 61, in db_sync 2015-11-25 12:50:40.708 7290 TRACE cinder init_version=init_version) 2015-11-25 12:50:40.708 7290 TRACE cinder File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration.py", line 74, in db_sync 2015-11-25 12:50:40.708 7290 TRACE cinder current_version = db_version(engine, abs_path, init_version) 2015-11-25 12:50:40.708 7290 TRACE cinder File "/usr/lib/python2.7/site-packages/oslo_db/sqlalchemy/migration.py", line 133, in db_version 2015-11-25 12:50:40.708 7290 TRACE cinder "The database is not under version control, but has " 2015-11-25 12:50:40.708

The lock_path directory is also not created in both cinder and controller.

[oslo_concurrency] lock_path = /var/lock/cinder

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-11-30 01:44:47 -0500

Prateek K gravatar image

OpenStack services generally run under a specific, unprivileged user. However, sometimes they need to run a command as root. Instead of just calling sudo make me a sandwich and have a blanket sudoers permission to always escalate rights from their unprivileged users to root, those services can call sudo nova-rootwrap /etc/nova/rootwrap.conf make me a sandwich.

If this issue is comming in case of cinder then I guess cinder.rootwrap is not configured properly. What i suggest is to check manually if rootwarap itself is working fine. We can perform the following to get more closer to the issue.

  1. Enable the debug logs(If already enabled, ignore).

  2. Try to attach volumes and then collect the logs.

  3. The command which cinder is trying to execute using rootwrap will be displayed in the logs.

  4. Copy that command and try to run that manually in the terminal.

This will give you the cause why rootwrap itself is failing and in case its not failing it might be the command that is executed is causing an issue.

In case if it doesn't helps, paste the output of the rootwrap command.

edit flag offensive delete link more

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: 2015-11-29 20:24:05 -0500

Seen: 62 times

Last updated: Nov 30 '15