FAIL: tempest.cli.simple_read_only.test_compute_manage.SimpleReadOnlyNovaManageTest

Bug #1217265 reported by ChangBo Guo(gcb)
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Invalid
Undecided
Unassigned
tempest
Invalid
Undecided
Unassigned

Bug Description

I got the error from http://logs.openstack.org/56/43056/9/check/gate-tempest-devstack-vm-full/483c05f/console.html

2013-08-27 06:16:16.103 | ======================================================================
2013-08-27 06:16:16.103 | FAIL: tempest.cli.simple_read_only.test_compute_manage.SimpleReadOnlyNovaManageTest.test_db_archive_deleted_rows
2013-08-27 06:16:16.104 | tempest.cli.simple_read_only.test_compute_manage.SimpleReadOnlyNovaManageTest.test_db_archive_deleted_rows
2013-08-27 06:16:16.104 | ----------------------------------------------------------------------
2013-08-27 06:16:16.105 | _StringException: Empty attachments:
2013-08-27 06:16:16.105 | stderr
2013-08-27 06:16:16.105 | stdout
2013-08-27 06:16:16.105 |
2013-08-27 06:16:16.105 | Traceback (most recent call last):
2013-08-27 06:16:16.106 | File "tempest/cli/simple_read_only/test_compute_manage.py", line 76, in test_db_archive_deleted_rows
2013-08-27 06:16:16.106 | self.nova_manage('db archive_deleted_rows 50')
2013-08-27 06:16:16.106 | File "tempest/cli/__init__.py", line 71, in nova_manage
2013-08-27 06:16:16.106 | 'nova-manage', action, flags, params, fail_ok, merge_stderr)
2013-08-27 06:16:16.106 | File "tempest/cli/__init__.py", line 125, in cmd
2013-08-27 06:16:16.106 | result = self.check_output(cmd, stderr=devnull)
2013-08-27 06:16:16.106 | File "tempest/cli/__init__.py", line 110, in check_output
2013-08-27 06:16:16.107 | raise CommandFailed(proc.returncode, cmd, output)
2013-08-27 06:16:16.107 | CommandFailed: Command '['/usr/local/bin/nova-manage', 'db', 'archive_deleted_rows', '50']' returned non-zero exit status 1

Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

I test my change and passed the Jekins unitest test . but failed in tempest.

Revision history for this message
David Lyle (david-lyle) wrote :

Multiple Horizon gate checks are failing with this error as well.

Changed in tempest:
importance: Undecided → Critical
milestone: none → havana-3
status: New → Confirmed
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

I extract the code from tempest.cli.simple_read_only.test_compute_manage.SimpleReadOnlyNovaManageTest.test_db_archive_deleted_rows:

It runs successfully. Not sure why this failed in tempest . this block my patch https://review.openstack.org/#/c/43056/
[root@10-1-0-61 gcb]# ./test.py
[root@10-1-0-61 gcb]# echo $?
0

#!/usr/bin/env python

import subprocess
import logging
import os
import shlex

LOG = logging.getLogger(__name__)

class CommandFailed(subprocess.CalledProcessError):
    # adds output attribute for python2.6
    def __init__(self, returncode, cmd, output):
        super(CommandFailed, self).__init__(returncode, cmd)
        self.output = output

def cmd(cmd, action, flags='', params='', fail_ok=False,
        merge_stderr=False):
    """Executes specified command for the given action."""
    cmd = ' '.join([os.path.join('/usr/bin/', cmd),
                        flags, action, params])
    LOG.info("running: '%s'" % cmd)
    cmd = shlex.split(cmd)
    try:
        if merge_stderr:
            result = self.check_output(cmd, stderr=subprocess.STDOUT)
        else:
            #with open('/dev/null', 'w') as devnull:
            with open('/home/gcb/log.txt', 'w') as devnull:
                result = check_output(cmd, stderr=devnull)
    except subprocess.CalledProcessError as e:
        LOG.error("command output:\n%s" % e.output)
        raise
    return result

def check_output(cmd, **kwargs):
    # substitutes subprocess.check_output which is not in python2.6
    kwargs['stdout'] = subprocess.PIPE
    proc = subprocess.Popen(cmd, **kwargs)
    output = proc.communicate()[0]
    if proc.returncode != 0:
        raise CommandFailed(proc.returncode, cmd, output)
    return output

def nova_manage(action, flags='', params='', fail_ok=False,
                merge_stderr=False):
    """Executes nova-manage command for the given action."""
    return cmd(
        'nova-manage', action, flags, params, fail_ok, merge_stderr)

nova_manage('db archive_deleted_rows 50')

Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

Got error message after the tempest patch https://review.openstack.org/#/c/43923/ was merged.

Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

So I think we can close this bug .

Revision history for this message
Attila Fazekas (afazekas) wrote :
Changed in tempest:
status: Confirmed → Invalid
importance: Critical → Undecided
Changed in nova:
status: New → Incomplete
Changed in nova:
status: Incomplete → Invalid
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.