guestagent error: datastore_manager configuration missing

Bug #1260726 reported by Ionuț Arțăriși
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Medium
Ionuț Arțăriși

Bug Description

I get the following error when trying to run guestagent.

INFO trove.db.sqlalchemy.session [-] Creating SQLAlchemy engine with args: {'pool_recycle': 3600, 'echo': False}
CRITICAL root [-] cannot concatenate 'str' and 'NoneType' objects
TRACE root Traceback (most recent call last):
TRACE root File "/usr/bin/trove-guestagent", line 56, in <module>
TRACE root CONF.datastore_manager)
TRACE root TypeError: cannot concatenate 'str' and 'NoneType' objects
TRACE root

I can't find the datastore_manager configuration option anywhere. Was this renamed?

Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

can you give more information on what are you trying.
i see everything is fine at my end.

Changed in trove:
status: New → Incomplete
Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

Nevermind. It seems that this bug is fixed in the latest master.

Changed in trove:
status: Incomplete → Invalid
Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

Argh, no. It's still in master.

So CONF.datastore_manager is not set anywhere and it defaults to None[1]. But then trove-guestagent tries to concatenante it (None) with a string[2] which is what throws the above exception.

So there are really two bugs here I think:

1. CONF.datastore_manager should not be concatenated to a string if its value could be None.
2. there should be a default sane value for datastore_manager in the example config, otherwise trying to start guestagent will throw the "Manager class not registered for datastore manager None" error.

I'll submit a commit for the first one, but I don't know how to fix the second one.

[1] https://github.com/openstack/trove/blob/master/trove/common/cfg.py#L121
[2] https://github.com/openstack/trove/blob/master/bin/trove-guestagent#L55

Changed in trove:
status: Invalid → New
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

Fix proposed to branch: master
Review: https://review.openstack.org/62332

Changed in trove:
assignee: nobody → Ionuț Arțăriși (mapleoin)
status: New → In Progress
Revision history for this message
Andrey Shestakov (ashestakov) wrote :

Value of datastore_manager injected by taskmanager to file /etc/guest_info
you should run guestagent with this config, like trove-guestagent --config-file /etc/guest_info /etc/trove-guestagent.conf

Revision history for this message
Ionuț Arțăriși (mapleoin) wrote :

Thanks for the clarification Andrey. Is there any documentation which covers this?

Revision history for this message
Andrey Shestakov (ashestakov) wrote :

Maybe its covered in installation guide, if no ill cover this point in documentation for datastores, since all improvements will accepted

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to trove (master)

Reviewed: https://review.openstack.org/62332
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=6be3bc4651a3f18a24dd7a3953e5f9fd068222a4
Submitter: Jenkins
Branch: master

commit 6be3bc4651a3f18a24dd7a3953e5f9fd068222a4
Author: Ionuț Arțăriși <email address hidden>
Date: Mon Dec 16 11:58:03 2013 +0100

    don't try to concatenate a string with a variable that can be None

    Change-Id: I7226339858b60a0f390389242e63caae5eadb3d8
    Partial-Bug: #1260726

Revision history for this message
Sushil Kumar (sushil-kumar2) wrote :

aah got that, you were trying to manually run guest-agent.

so, you are trying to use trove-guestagent command, without the config parameter.

However, just a better option could be just use "sudo start trove-guest" and "sudo stop trove-guest"

It is configured as like that too. :)

Changed in trove:
status: In Progress → Fix Committed
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in trove:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in trove:
milestone: juno-1 → 2014.2
Revision history for this message
Sailaja (sailajap) wrote :

I configured trove guest-agent on ubuntu 14.04 but the agent fails with an error(trove-guestagent.log):

2015-03-03 14:35:53.755 5268 CRITICAL root [-] Manager class not registered for datastore manager None "

I tried some value e.g datastore_manager = trove.guestagent in the /etc/trove/trove-guestagent.conf file but the issue exists as,

2015-03-03 14:35:53.755 5268 CRITICAL root [-] Manager class not registered for datastore manager trove.guestagent "

The result is with the trove-guestagent failed to start the instance is in 'BUILD' state.

The trove-guestagent conf file:

rabbit_host = host_ip
rabbit_port = 5672
rabbit_password = guest

nova_proxy_admin_user = admin
nova_proxy_admin_pass = admin_pass
nova_proxy_admin_tenant_name = services
trove_auth_url = http://host_ip:5000/v2.0
datastore_registry_ext = mysql:trove.guestagent.datastore.mysql.manager.Manager
datastore_manager = trove.guestagent

Could anyone please let me know the way to fix this issue.

Thanks in advance.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.