← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1692893] [NEW] 'nova usage' returns 500 when deleted row in instance_extra is archived

 

Public bug reported:

Description
===========

In Newton and earlier, 'nova usage' returns 500 as soon as the first row
in instance_extra that's marked deleted is archived by 'nova-manage db
archive_deleted_rows'.

Steps to reproduce
==================

1. Create a few VMs:

   $ for i in `seq 1 5`;
     do openstack server create --image 4553c79a-e5c8-4dbe-894b-f0704bff6a15 --flavor 1 test$i;
     done

2. Delete them:

   $ for i in `seq 1 5`; do nova delete test$i; done

3. Archive deleted rows one by one until the first row of instance_extra
is archived:

   $ sudo nova-manage db archive_deleted_rows --max_rows 1 --verbose
     +----------------+-------------------------+
     | Table          | Number of Rows Archived |
     +----------------+-------------------------+
     | instance_extra | 1                       |
     +----------------+-------------------------+

4. Run 'nova usage'

Expected result
===============

'nova usage' shows usage, for example:

$ nova usage
  Usage from 2017-04-21 to 2017-05-20:
  +---------+--------------+-----------+---------------+
  | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
  +---------+--------------+-----------+---------------+
  | 5       | 48.92        | 0.10      | 0.10          |
  +---------+--------------+-----------+---------------+

Actual result
=============

'nova usage' returns 500

$ nova usage
  ERROR (ClientException): Unexpected API Error. Please report this at
  http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

Additional information
======================

This is really a duplicate of bug 1643444, but explained in terms of
user impact as opposed to results of a Tempest test. It also happens
with 'nova list --deleted'.

Environment
===========

This only happens in Newton and earlier, as it's been fixed with [1] in
Ocata.

[1] https://review.openstack.org/#/c/400763/

** Affects: nova
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1692893

Title:
  'nova usage' returns 500 when deleted row in instance_extra is
  archived

Status in OpenStack Compute (nova):
  New

Bug description:
  Description
  ===========

  In Newton and earlier, 'nova usage' returns 500 as soon as the first
  row in instance_extra that's marked deleted is archived by 'nova-
  manage db archive_deleted_rows'.

  Steps to reproduce
  ==================

  1. Create a few VMs:

     $ for i in `seq 1 5`;
       do openstack server create --image 4553c79a-e5c8-4dbe-894b-f0704bff6a15 --flavor 1 test$i;
       done

  2. Delete them:

     $ for i in `seq 1 5`; do nova delete test$i; done

  3. Archive deleted rows one by one until the first row of
  instance_extra is archived:

     $ sudo nova-manage db archive_deleted_rows --max_rows 1 --verbose
       +----------------+-------------------------+
       | Table          | Number of Rows Archived |
       +----------------+-------------------------+
       | instance_extra | 1                       |
       +----------------+-------------------------+

  4. Run 'nova usage'

  Expected result
  ===============

  'nova usage' shows usage, for example:

  $ nova usage
    Usage from 2017-04-21 to 2017-05-20:
    +---------+--------------+-----------+---------------+
    | Servers | RAM MB-Hours | CPU Hours | Disk GB-Hours |
    +---------+--------------+-----------+---------------+
    | 5       | 48.92        | 0.10      | 0.10          |
    +---------+--------------+-----------+---------------+

  Actual result
  =============

  'nova usage' returns 500

  $ nova usage
    ERROR (ClientException): Unexpected API Error. Please report this at
    http://bugs.launchpad.net/nova/ and attach the Nova API log if possible.

  Additional information
  ======================

  This is really a duplicate of bug 1643444, but explained in terms of
  user impact as opposed to results of a Tempest test. It also happens
  with 'nova list --deleted'.

  Environment
  ===========

  This only happens in Newton and earlier, as it's been fixed with [1]
  in Ocata.

  [1] https://review.openstack.org/#/c/400763/

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1692893/+subscriptions


Follow ups