Ask Your Question
0

Cinder LVM Volume local to Instance ?

asked 2016-05-08 14:08:02 -0600

kyomster gravatar image

Hi,

I have a setup where Compute and Cinder (using LVM) is on the same machine in a multi node environment (multiple Compute+Cinder LVM).

I would like to know if there is anyway to force a Cinder LVM volume to be on the same node as the instance ?

The goal would be to avoid using the network for the instance to use the volume.

Thanks,

Guillaume.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2017-03-10 16:10:12 -0600

karthikprabhu gravatar image

updated 2017-03-10 16:20:56 -0600

yes Of course you can. it is called the InstanceLocalityFilter for the cinder scheduler.

In order for this to work: -

  1. At least one physical host should run both nova-compute and cinder-volume services. The Extended Server Attributes extension needs to be active in Nova (this is by default), so that the 'OS-EXT-SRV-ATTR:host' property is returned when requesting instance info.

  2. The user making the call needs to have sufficient rights for the property to be returned by Nova. This can be achieved either by changing Nova's policy.json (the 'extended_server_attributes' option), or by setting an account with privileged rights in Cinder conf.

$nova list

You need to create a volume of size 1 like

$cinder create --hint local_to_instance=<instance-id> 1

For more information, you can follow bug: https://bugs.launchpad.net/openstack-manuals/+bug/1408387 (https://bugs.launchpad.net/openstack-...)

Let me know if this helps.

Regards, Karthik Prabhu

edit flag offensive delete link more
0

answered 2017-07-06 22:21:17 -0600

I have never been able to create a volume. always gives me 'error'. In log of cinder-scheduler, it shows: cinder-scheduler.log:2017-07-07 02:16:35.643 7 DEBUG cinder.compute.nova [req-75709aa3-36e0-4cbf-8d25-94e31a280091 f45cbc984a074893a0e046fbeb587009 3c0e496821944050ac3df191540317ed - default defau lt] Nova client connection created using URL: http://10.18.2.234:8774/v2.1/3c0e496821944050ac3df191540317ed (http://10.18.2.234:8774/v2.1/3c0e4968...) novaclient /var/lib/kolla/venv/lib/python2.7/site-packages/cinder/compute/nova.py:205 cinder-scheduler.log:2017-07-07 02:16:35.646 7 WARNING novaclient.v2.client [req-75709aa3-36e0-4cbf-8d25-94e31a280091 f45cbc984a074893a0e046fbeb587009 3c0e496821944050ac3df191540317ed - default de fault] Property management_url is deprecated for SessionClient. It should be set via endpoint_override variable while class initialization. cinder-scheduler.log:2017-07-07 02:16:35.654 7 WARNING keystoneauth.identity.generic.base [req-75709aa3-36e0-4cbf-8d25-94e31a280091 f45cbc984a074893a0e046fbeb587009 3c0e496821944050ac3df191540317e d - default default] Discovering versions from the identity service failed when creating the password plugin. Attempting to determine version from URL. cinder-scheduler.log:2017-07-07 02:16:35.655 7 ERROR cinder.scheduler.flows.create_volume [req-75709aa3-36e0-4cbf-8d25-94e31a280091 f45cbc984a074893a0e046fbeb587009 3c0e496821944050ac3df191540317e d - default default] Failed to run task cinder.scheduler.flows.create_volume.ScheduleCreateVolumeTask;volume:create: Could not determine a suitable URL for the plugin cinder-scheduler.log:2017-07-07 02:16:35.655 7 DEBUG cinder.volume.flows.common [req-75709aa3-36e0-4cbf-8d25-94e31a280091 f45cbc984a074893a0e046fbeb587009 3c0e496821944050ac3df191540317ed - defaul t default] Setting Volume ba059fc3-ca5f-4ea3-ae2c-630ea0fa22df to error due to: Could not determine a suitable URL for the plugin error_out /var/lib/kolla/venv/lib/python2.7/site-packages/cinder/v olume/flows/common.py:85 cinder-scheduler.log:2017-07-07 02:16:35.673 7 ERROR cinder.scheduler.manager resp, body = self.api.client.get(url) cinder-scheduler.log:2017-07-07 02:16:35.673 7 ERROR cinder.scheduler.manager return self.request(url, 'GET', *kwargs) cinder-scheduler.log:2017-07-07 02:16:35.673 7 ERROR cinder.scheduler.manager return self.session.request(url, method, *kwargs) cinder-scheduler.log:2017-07-07 02:16:35.673 7 ERROR cinder.scheduler.manager raise exceptions.DiscoveryFailure('Could not determine a suitable URL ' cinder-scheduler.log:2017-07-07 02:16:35.673 7 ERROR cinder.scheduler.manager DiscoveryFailure: Could not determine a suitable URL for the plugin

I would like to know version/release of cinder/nova/keystone and the client side python modules version.

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: 2016-05-08 14:08:02 -0600

Seen: 714 times

Last updated: Jul 06 '17