Ask Your Question
0

Trove guest agent fails to get database status

asked 2016-01-25 10:14:24 -0500

Cpt. Flint gravatar image

When trying to instanciate a MySQL database instance with Trove, the guest agent fails to get the database status leaving the instance in an error state.

Here's the trove-guestagent.log:

stdout: 
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base [-] Failed to get database status.
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base Traceback (most recent call last):
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base   File "/usr/lib/python2.7/dist-packages/trove/guestagent/datastore/mysql/service_base.py", line 148, in _get_actual_db_status
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base     log_output_on_error=True)
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base   File "/usr/lib/python2.7/dist-packages/trove/common/utils.py", line 226, in execute_with_timeout
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base     return execute(*args, **kwargs)
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base   File "/usr/lib/python2.7/dist-packages/oslo_concurrency/processutils.py", line 275, in execute
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base     cmd=sanitized_cmd)
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base ProcessExecutionError: Unexpected error while running command.
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base Command: sudo /usr/bin/mysqladmin ping
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base Exit code: 1
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base Stdout: u''
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base Stderr: u'sudo: unable to resolve host trove-test\nsudo: no tty present and no askpass program specified\n'
2016-01-25 15:47:47.936 1079 ERROR trove.guestagent.datastore.mysql.service_base 
2016-01-25 15:47:47.968 1079 INFO trove.guestagent.datastore.mysql.service_base [-] MySQL Service Status 1157 is BLOCKED.
2016-01-25 15:48:47.934 1079 ERROR trove.common.utils [-] Command 'sudo /usr/bin/mysqladmin ping' failed.  Exit code: 1
stderr: sudo: unable to resolve host trove-test
sudo: no tty present and no askpass program specified

I've have tried the following things:

  • I checked the init-script for the guest agent. The start-stop-deamon is correctly invoked with trove as chuid parameter
  • I have added the user trove to the sudo users, which does not change the result
  • Since I suspected the error might not be an issue with sudo, but with the mysqladmin command wanting to prompt for a password, I supplied username and password in the releavant line of the service_base.py, I still got the same result

I'm running an Openstack Liberty install on Ubuntu 14.04.

Can anyone point me in the right direction to what is wrong here? If you any additional helpful info, let me know.

edit retag flag offensive close merge delete

2 answers

Sort by » oldest newest most voted
0

answered 2016-04-05 16:19:36 -0500

amrith gravatar image

Please stop by #openstack-trove for quicker assistance.

What guest image are you using in this case? It looks like you created your own, maybe?

edit flag offensive delete link more
0

answered 2016-06-02 03:30:33 -0500

Lili Zhang gravatar image

As the last 'ERROR' says in the trove-guestagent.log you posted, command 'sudo /usr/bin/mysqladmin ping' failed. And there are two issues that have caused that error.

  1. stderr: sudo: unable to resolve host trove-test
  2. sudo: no tty present and no askpass program specified

To fix the above two issues, follow the links below.

Error message when I run sudo: unable to resolve host (none)

How to fix 'sudo: no tty present and no askpass program specified' error?

Hope this is helpful.

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-01-25 10:14:24 -0500

Seen: 476 times

Last updated: Jun 02 '16