Failed to run ScheduleCreateVolumeTask, No weighed host

asked 2015-06-29 13:38:38 -0600

Vikash Mehta gravatar image

updated 2015-06-29 13:41:05 -0600

Problem: Unable to create a volume using sample cinder driver.

Description: I want to write a cinder driver for block storage array.

As a first step,

  1. Installed openstack using devstack (on ubuntu 14.04).
  2. Made changes in local.conf
  3. Added file lib/cinder_backends/sample, to enable sample driver as cinder_backend
  4. Added sample driver (with logs) at /opt/stack/cinder/cinder/volume/drivers/sample.py

Now, to verify whether or not cinder API call are coming to new sample driver. I have added log to all supported definition e.g "def create_volume" and expecting it to get printed/called with cinder create command.

$ cinder create --display-name sample-vol-3 1

Create volume function in sample driver:

def create_volume(self, volume):
    LOG.debug('Sample - SamplSampleDriver Create_VOl')
    pass

To my disappointment it is not printing the same. Instead I am finding following error in logs:

Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: No valid host was found. No weighed hosts available

Any pointer/help is highly appreciated.

ubuntu:~/openstack/devstack$ cinder service-list +------------------+-----------------------+------+---------+-------+----------------------------+-----------------+ | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | +------------------+-----------------------+------+---------+-------+----------------------------+-----------------+ | cinder-scheduler | ubuntu | nova | enabled | up | 2015-06-29T12:42:51.000000 | - | | cinder-volume | ubuntu@sample-san-vol | nova | enabled | up | 2015-06-29T12:42:46.000000 | - | +------------------+-----------------------+------+---------+-------+----------------------------+-----------------+

ubuntu:~/openstack/devstack$ cinder type-list +--------------------------------------+----------------+-------------+-----------+ | ID | Name | Description | Is_Public | +--------------------------------------+----------------+-------------+-----------+ | 89b1e0b4-12c7-4ef3-9a74-1cbfe51a508e | sample-san-vol | - | True | +--------------------------------------+----------------+-------------+-----------+

ubuntu:~/openstack/devstack$ nova service-list +----+------------------+--------+----------+---------+-------+----------------------------+-----------------+ | Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason | +----+------------------+--------+----------+---------+-------+----------------------------+-----------------+ | 1 | nova-conductor | ubuntu | internal | enabled | up | 2015-06-29T12:43:07.000000 | - | | 2 | nova-cert | ubuntu | internal | enabled | up | 2015-06-29T12:43:10.000000 | - | | 3 | nova-network | ubuntu | internal | enabled | up | 2015-06-29T12:43:15.000000 | - | | 4 | nova-scheduler | ubuntu | internal | enabled | up | 2015-06-29T12:43:09.000000 | - | | 5 | nova-consoleauth | ubuntu | internal | enabled | up | 2015-06-29T12:43:12.000000 | - | | 6 | nova-compute | ubuntu | nova | enabled | up | 2015-06-29T12:43:06.000000 | - | +----+------------------+--------+----------+---------+-------+----------------------------+-----------------+

ubuntu:~/openstack/devstack$ cinder create --display-name sample-vol-1 1 +---------------------------------------+--------------------------------------+ | Property | Value | +---------------------------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2015-06-29T12:43:56.000000 | | description | None | | encrypted | False | | id | 2a1a61f8-e86e-4b18-bff5-7599e148c86d | | metadata | {} | | multiattach | False | | name | sample-vol-1 | | os-vol-host-attr:host | None | | os-vol-mig-status-attr:migstat | None | | os-vol-mig-status-attr:name_id | None | | os-vol-tenant-attr:tenant_id | a89a634caf144fdfabacffd58aa53081 | | os-volume-replication:driver_data | None | | os-volume-replication:extended_status | None | | replication_status | disabled | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | user_id | 8fb75ee79bb044d9ad857a76e362975d | | volume_type | sample-san-vol | +---------------------------------------+--------------------------------------+

ubuntu:~/openstack/devstack$ cinder list +--------------------------------------+--------+--------------+------+----------------+----------+-------------+ | ID | Status | Name | Size | Volume Type | Bootable | Attached to | +--------------------------------------+--------+--------------+------+----------------+----------+-------------+ | 2a1a61f8-e86e-4b18-bff5-7599e148c86d | error | sample-vol-1 | 1 | sample-san-vol | false | | +--------------------------------------+--------+--------------+------+----------------+----------+-------------+

cinder.conf:

[keystone_authtoken] signing_dir = /var/cache/cinder cafile = /opt/stack/data/ca-bundle.pem auth_uri = http://<ip optimized="">:5000 project_domain_id = default project_name = service user_domain_id = default password = * username = cinder auth_url = http://<ip optimized="">:35357 auth_plugin = password

[DEFAULT] os_privileged_user_tenant = service os_privileged_user_password = * os_privileged_user_name = nova glance_api_servers = http://<ip optimized="">:9292 osapi_volume_workers = 2 logging_context_format_string = %(asctime)s.%(msecs)03d %(levelname)s %(name)s [%(request_id)s %(project_name)s] %(resource)s%(message)s volume_clear = zero rpc_backend = rabbit use_syslog = True default_volume_type = sample-san-vol enabled_backends = sample-san-vol os_region_name = RegionOne enable_v1_api = true periodic_interval = 60 state_path = /opt/stack/data/cinder osapi_volume_extension = cinder.api.contrib.standard_extensions rootwrap_config = /etc/cinder/rootwrap.conf api_paste_config = /etc/cinder/api-paste.ini iscsi_helper = tgtadm verbose = True debug = True auth_strategy = keystone nova_catalog_admin_info = compute:nova:adminURL nova_catalog_info = compute:nova:publicURL

[database] connection = mysql+pymysql://root:<*>@127.0.0.1/cinder?charset=utf8

[oslo_concurrency] lock_path = /opt ... (more)

edit retag flag offensive close merge delete