[Openstack] Is it possible to start Trove instance without volume?
Mark Kirkwood
mark.kirkwood at catalyst.net.nz
Fri Jun 6 10:29:39 UTC 2014
On 06/06/14 16:13, Heinonen, Johanna (NSN - FI/Espoo) wrote:
> Hi,
>
> I tried the option b mentioned below. Device_path = None seemed to have no effect but the exception.LocalStorageNotSpecified(flavor=flavor_id) was raised (/usr/lib/python2.7/dist-packages/trove/instance/models.py). The same effect was with value False. The only way I could proceed was to explicitly replace ephemeral_support to False in the code (models.py. line 630->):
>
>
> # if ephemeral_support and flavor.ephemeral == 0:
> if False and flavor.ephemeral == 0:
> raise exception.LocalStorageNotSpecified(flavor=flavor_id)
>
>
> Now I am able to start trove instance - almost. I am using custom made image (no cloudinit) where I have installed trove-guestagent and database.
> Nova starts the VM and I am able to log in to it. I see that the guest-agent process is started and connected to AMQP server. However, the trove instance stays forever in the BUILD state. I guess that the reason is that the instance does not send the instance id in the heartbeat message (Instance ID is None in the log trace below). What is the way that guest-agent could learn the instance uuid of its own? Should it be injected to the instance somehow?
>
>
>
> 2014-06-05 23:10:07.155 14445 DEBUG trove.openstack.common.rpc.amqp [-] received {u'_context_domain': None, u'_context_request_id': u'req-22f10ab2-98cc-4932-b533-68c9d0633a18', u'args': {u'instance_id': None, u'payload': {u'service_status': u'running'}, u'sent': 1401988196.1104}, u'_context_read_only': False, u'_unique_id': u'f082fab2d9c241cea5b776a84eeb7320', u'_context_user_identity': u'admin - - - -', u'_context_show_deleted': False, u'_context_tenant': None, u'_context_auth_token': '<SANITIZED>', u'_context_project_domain': None, u'_context_is_admin': False, u'version': u'1.0', u'_context_marker': None, u'_context_instance_uuid': None, u'_context_user': u'admin', u'_context_user_domain': None, u'namespace': None, u'method': u'heartbeat', u'_context_limit': None} _safe_log /usr/lib/python2.7/dist-packages/trove/openstack/common/rpc/common.py:280
> 2014-06-05 23:10:07.156 14445 DEBUG trove.openstack.common.rpc.amqp [-] unpacked context: {'instance_uuid': None, 'read_only': False, 'domain': None, 'show_deleted': False, 'user_identity': u'admin - - - -', 'project_domain': None, 'auth_token': '<SANITIZED>', 'is_admin': False, 'user': u'admin', 'request_id': u'req-22f10ab2-98cc-4932-b533-68c9d0633a18', 'marker': None, 'limit': None, 'user_domain': None, 'tenant': None} _safe_log /usr/lib/python2.7/dist-packages/trove/openstack/common/rpc/common.py:280
> 2014-06-05 23:10:07.157 14445 DEBUG trove.conductor.manager [req-22f10ab2-98cc-4932-b533-68c9d0633a18 admin - - - -] Instance ID: None heartbeat /usr/lib/python2.7/dist-packages/trove/conductor/manager.py:76
> 2014-06-05 23:10:07.158 14445 DEBUG trove.conductor.manager [req-22f10ab2-98cc-4932-b533-68c9d0633a18 admin - - - -] Payload: {u'service_status': u'running'} heartbeat /usr/lib/python2.7/dist-packages/trove/conductor/manager.py:77
> 2014-06-05 23:10:07.161 14445 ERROR trove.openstack.common.rpc.amqp [req-22f10ab2-98cc-4932-b533-68c9d0633a18 admin - - - -] Exception during message handling
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp Traceback (most recent call last):
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/trove/openstack/common/rpc/amqp.py", line 440, in _process_data
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp **args)
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/trove/openstack/common/rpc/dispatcher.py", line 172, in dispatch
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp result = getattr(proxyobj, method)(ctxt, **kwargs)
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/trove/conductor/manager.py", line 79, in heartbeat
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp instance_id=instance_id)
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp File "/usr/lib/python2.7/dist-packages/trove/db/models.py", line 99, in find_by
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp cls.__name__)
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp ModelNotFoundError: InstanceServiceStatus Not Found
> 2014-06-05 23:10:07.161 14445 TRACE trove.openstack.common.rpc.amqp
>
> I am using the ubuntu1404 trove packages.
>
Yeah - just tried this out myself with similar results. Looks like
things are setup to require cinder support.
Now with regard to the ModelNotFoundError: InstanceServiceStatus you are
seeing - this is probably because the file injection of /etc/guest_info
is failing. This is vital as typical contents of this file are:
[DEFAULT]
guest_id=ddd97300-5976-4c41-89b8-1d886cc4b531in
datastore_manager=mysql
tenant_id=a9d3f1c6c7984856985b99a8185ece12
i.e in particular the guest uuid.
I struggled with making sure that this file was injected successfully,
and it seems that requiring a config drive in Nova is essential - e.g:
$ sudo vi /etc/nova/nova-compute.conf
[DEFAULT]
compute_driver = libvirt.LibvirtDriver
force_config_drive = always
Also you need to check that the guest init for guestagent looks at this
file e.g:
(guest) $ cat /etc/init/trove-guestagent.conf
description "Trove Guest Agent"
author "Thomas Goirand <zigo at debian.org>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
exec start-stop-daemon --start --chuid trove:trove \
--chdir /var/lib/trove --name trove-guestagent \
--exec /usr/bin/trove-guestagent --
--config-file=/etc/guest_info
--config-file=/etc/trove/trove-guestagent.conf --log-dir=/var/log/trove
--logfile=guestagent.log
Best wishes
Mark
More information about the Openstack
mailing list