can't create volume with cinder create successfully

Asked by allen_chou on 2015-05-26

Hi All,

Well I have installed openstack juno on my Ubuntu 14.04.2 servers followed the official document
I installed cinder-volume and controller on same host.. everthing is looks fine untile I tried to crate volume

root@openstack01:~# cinder service-list
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
| Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+------------------+-------------+------+---------+-------+----------------------------+-----------------+
| cinder-scheduler | openstack01 | nova | enabled | up | 2015-05-26T09:25:59.000000 | None |
| cinder-volume | openstack01 | nova | enabled | up | 2015-05-26T09:26:06.000000 | None |
+------------------+-------------+------+---------+-------+----------------------------+-----------------+

root@openstack01:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/root-root / ext4 errors=remount-ro 0 1
/dev/mapper/root-swap none swap sw 0 0

root@openstack01:~# vgdisplay
  --- Volume group ---
  VG Name cinder-volumes
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 1
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 0
  Open LV 0
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 862.77 GiB
  PE Size 4.00 MiB
  Total PE 220870
  Alloc PE / Size 0 / 0
  Free PE / Size 220870 / 862.77 GiB
  VG UUID WA2bTf-1bZv-v0zU-Qf81-sbaf-8yMQ-8jDxQ2

  --- Volume group ---
  VG Name root
  System ID
  Format lvm2
  Metadata Areas 1
  Metadata Sequence No 3
  VG Access read/write
  VG Status resizable
  MAX LV 0
  Cur LV 2
  Open LV 2
  Max PV 0
  Cur PV 1
  Act PV 1
  VG Size 1000.00 GiB
  PE Size 4.00 MiB
  Total PE 255999
  Alloc PE / Size 255999 / 1000.00 GiB
  Free PE / Size 0 / 0
  VG UUID rSKFRr-1hWy-4Wgv-cWlR-VtAP-44rU-6HFG8X

root@openstack01:~# cat /etc/cinder/cinder.conf
[DEFAULT]
verbose = True
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%
volume_group = cinder-volumes
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = xxxxxxxxx
my_ip = 10.0.1.200
glance_host = controller
[database]
connection = mysql://cinder:globalroam@controller/cinder

[keystone_authtoken]
auth_uri = http://controller:5000/v2.0
identity_uri = http://controller:35357
admin_tenant_name = service
admin_user = cinder
admin_password = xxxxxxxx

after lunched below command
root@openstack01:~# cinder create --display-name demo-volume1 1

tail -f /var/log/cinder/cinder-scheduler.log
2015-05-26 17:29:25.711 1029 ERROR cinder.scheduler.filter_scheduler [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Error scheduling None from last vol-service: openstack01#LVM_iSCSI : [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 34, in _execute_task\n result = task.execute(**arguments)\n', u' File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 216, in execute\n volume_name = volume_ref[\'name\']\n', u' File "/usr/lib/python2.7/dist-packages/oslo/db/sqlalchemy/models.py", line 54, in __getitem__\n return getattr(self, key)\n', u' File "/usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/models.py", line 121, in name\n return CONF.volume_name_template % self.name_id\n', u'ValueError: incomplete format\n']
2015-05-26 17:29:25.777 1029 ERROR cinder.scheduler.filter_scheduler [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Error scheduling None from last vol-service: openstack01#LVM_iSCSI : [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 34, in _execute_task\n result = task.execute(**arguments)\n', u' File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 216, in execute\n volume_name = volume_ref[\'name\']\n', u' File "/usr/lib/python2.7/dist-packages/oslo/db/sqlalchemy/models.py", line 54, in __getitem__\n return getattr(self, key)\n', u' File "/usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/models.py", line 121, in name\n return CONF.volume_name_template % self.name_id\n', u'ValueError: incomplete format\n']
2015-05-26 17:29:25.857 1029 ERROR cinder.scheduler.filter_scheduler [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Error scheduling None from last vol-service: openstack01#LVM_iSCSI : [u'Traceback (most recent call last):\n', u' File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 34, in _execute_task\n result = task.execute(**arguments)\n', u' File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 216, in execute\n volume_name = volume_ref[\'name\']\n', u' File "/usr/lib/python2.7/dist-packages/oslo/db/sqlalchemy/models.py", line 54, in __getitem__\n return getattr(self, key)\n', u' File "/usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/models.py", line 121, in name\n return CONF.volume_name_template % self.name_id\n', u'ValueError: incomplete format\n']
2015-05-26 17:29:25.858 1029 ERROR cinder.scheduler.flows.create_volume [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. Exceeded max scheduling attempts 3 for volume None

tail -f /var/log/cinder/cinder-volume.log
2015-05-26 17:29:25.689 4855 WARNING cinder.volume.manager [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Task 'cinder.volume.flows.manager.create_volume.ExtractVolumeSpecTask;volume:create' (f156746c-81c8-43e8-9e02-775d0469428a) transitioned into state 'FAILURE'
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager Traceback (most recent call last):
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 34, in _execute_task
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager result = task.execute(**arguments)
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 216, in execute
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager volume_name = volume_ref['name']
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/oslo/db/sqlalchemy/models.py", line 54, in __getitem__
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager return getattr(self, key)
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager File "/usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/models.py", line 121, in name
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager return CONF.volume_name_template % self.name_id
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager ValueError: incomplete format
2015-05-26 17:29:25.689 4855 TRACE cinder.volume.manager
2015-05-26 17:29:25.689 4855 WARNING cinder.volume.manager [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Task 'cinder.volume.flows.manager.create_volume.ExtractVolumeSpecTask;volume:create' (f156746c-81c8-43e8-9e02-775d0469428a) transitioned into state 'REVERTING'
2015-05-26 17:29:25.690 4855 WARNING cinder.volume.manager [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Task 'cinder.volume.flows.manager.create_volume.OnFailureRescheduleTask;volume:create' (da6909a7-7eef-4822-93f0-7c29100a04c7) transitioned into state 'REVERTING'
2015-05-26 17:29:25.709 4855 WARNING cinder.volume.manager [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Task 'cinder.volume.flows.manager.create_volume.ExtractVolumeRefTask;volume:create' (8b6f7649-bd2c-4b2a-81a3-981b2a450dbf) transitioned into state 'REVERTING'
2015-05-26 17:29:25.729 4855 ERROR cinder.volume.flows.manager.create_volume [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Volume c56c7f07-b0cb-4698-82bc-31f020f07bee: create failed
2015-05-26 17:29:25.729 4855 WARNING cinder.volume.manager [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Flow 'volume_create_manager' (a0b82a3b-500c-4d06-85db-69fad9a98172) transitioned into state 'REVERTED' from state 'RUNNING'
2015-05-26 17:29:25.730 4855 ERROR oslo.messaging.rpc.dispatcher [req-f8e3d469-fe8b-4bc9-b19a-2bba0c35eb89 86b56459980743b5bfd5318584df7158 299706589674435fbdafb790a5580a7c - - -] Exception during message handling: incomplete format
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher Traceback (most recent call last):
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 134, in _dispatch_and_reply
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher incoming.message))
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 177, in _dispatch
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher return self._do_dispatch(endpoint, method, ctxt, args)
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/messaging/rpc/dispatcher.py", line 123, in _do_dispatch
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher result = getattr(endpoint, method)(ctxt, **new_args)
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/osprofiler/profiler.py", line 105, in wrapper
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher return f(*args, **kwargs)
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 381, in create_volume
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher _run_flow()
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/manager.py", line 374, in _run_flow
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher flow_engine.run()
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 89, in run
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher for _state in self.run_iter():
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/engine.py", line 137, in run_iter
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher misc.Failure.reraise_if_any(failures.values())
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/utils/misc.py", line 797, in reraise_if_any
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher failures[0].reraise()
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/utils/misc.py", line 804, in reraise
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher six.reraise(*self._exc_info)
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/taskflow/engines/action_engine/executor.py", line 34, in _execute_task
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher result = task.execute(**arguments)
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/volume/flows/manager/create_volume.py", line 216, in execute
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher volume_name = volume_ref['name']
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/oslo/db/sqlalchemy/models.py", line 54, in __getitem__
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher return getattr(self, key)
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher File "/usr/lib/python2.7/dist-packages/cinder/db/sqlalchemy/models.py", line 121, in name
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher return CONF.volume_name_template % self.name_id
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher ValueError: incomplete format
2015-05-26 17:29:25.730 4855 TRACE oslo.messaging.rpc.dispatcher

Pls help..

Thanks

B&R
Allen,

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu cinder Edit question
Assignee:
No assignee Edit question
Solved by:
allen_chou
Solved:
2015-06-11
Last query:
2015-06-11
Last reply:
allen_chou (liuyang-x) said : #1

Hi Guys,

just for the one who may face same issue
the configuration was wrong in above example
volume_name_template = volume-%

the correct one should be
volume_name_template = volume-%s

B&R
Allen,