~ubuntu-branches/ubuntu/vivid/openstack-trove/vivid

« back to all changes in this revision

Viewing changes to trove/guestagent/datastore/experimental/mongodb/service.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short, Chuck Short, James Page
  • Date: 2015-04-15 14:03:27 UTC
  • mfrom: (1.1.16)
  • Revision ID: package-import@ubuntu.com-20150415140327-wwtye76elw9uu6ku
Tags: 2015.1~rc1-0ubuntu1
[ Chuck Short ]
* New upstream release.
  - d/control: Align with upstream dependencies.
  - d/p/fix-requirements.patch: Dropped
  - d/p/patch-default-config-file.patch: Rebased

[ James Page ]
* d/rules,control: Tweak unit test execution, add subunit to BD's.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
import re
18
18
 
19
19
import os
 
20
from oslo_utils import netutils
20
21
from trove.common import cfg
21
22
from trove.common import utils as utils
22
23
from trove.common import exception
255
256
        utils.execute_with_timeout(cmd, shell=True)
256
257
 
257
258
    def do_mongo(self, db_cmd):
258
 
        cmd = ('mongo --host ' + operating_system.get_ip_address() +
 
259
        cmd = ('mongo --host ' + netutils.get_my_ipv4() +
259
260
               ' --quiet --eval \'printjson(%s)\'' % db_cmd)
260
261
        # TODO(ramashri) see if hardcoded values can be removed
261
262
        out, err = utils.execute_with_timeout(cmd, shell=True, timeout=100)
362
363
        try:
363
364
            if self._is_config_server() is True:
364
365
                status_check = (system.CMD_STATUS %
365
 
                                (operating_system.get_ip_address() +
 
366
                                (netutils.get_my_ipv4() +
366
367
                                ' --port 27019'))
367
368
            else:
368
369
                status_check = (system.CMD_STATUS %
369
 
                                operating_system.get_ip_address())
 
370
                                netutils.get_my_ipv4())
370
371
 
371
372
            out, err = utils.execute_with_timeout(status_check, shell=True)
372
373
            if not err and "connected to:" in out: