← Back to team overview

openstack-qa-team team mailing list archive

Re: deleted flavor failure

 

Guess our emails crossed :-) . I don't have your change in nova and I will need to figure out why since I used a fresh devstack. But we do need to make sure the tempest test does not assume a deleted server/flavor is in the database unless we know there is a live instance using it. I really don't understand why the database is never purged of old stuff since it will just grow and grow. But I am told that is correct behavior.

 -David

On 5/31/2012 4:43 PM, Dan Prince wrote:

----- Original Message -----
From: "David Kranz"<david.kranz@xxxxxxxxxx>
To: openstack-qa-team@xxxxxxxxxxxxxxxxxxx
Sent: Thursday, May 31, 2012 4:10:05 PM
Subject: [Openstack-qa-team] deleted flavor failure

I am still seeing the below error with the latest versions of
everything. Is this test passing for any of you? It seems to pass in
jenkins so I don't know what the problem could be. Also, that code
says:

          # Delete the flavor
          resp, _ =
          self.admin_client.delete_flavor(self.new_flavor_id)
          self.assertEqual(resp.status, 202)

???        # Deleted flavors can be seen via detailed GET
          resp, flavor =
self.admin_client.get_flavor_details(self.new_flavor_id)
          self.assertEqual(resp.status, 200)
          self.assertEqual(flavor['name'], self.flavor_name)

          # Deleted flavors should not show up in a list however
          resp, flavors = self.admin_client.list_flavors_with_detail()


David,

This test case is working for me.

Can you see if your Nova deployment has this line in it:

   https://github.com/openstack/nova/blob/master/nova/compute/instance_types.py#L147


Is it really part of the spec that deleted flavors are never purged
from
the system?

There is no contract keeping a deployer from purging 'deleted' records from the database. Nova however will keep them by default unless you manually write a SQL cleanup script to purge things. Ditto for servers and images (in Glance).





======================================================================
ERROR: Delete a flavor and ensure it is not listed
----------------------------------------------------------------------
Traceback (most recent call last):
    File
    "C:\source\tempest\tempest\tests\compute\admin\test_flavors.py",
line 110, in test_get_flavor_details_for_deleted_flavor
      resp, flavor =
      self.admin_client.get_flavor_details(self.new_flavor_id)
    File
"C:\source\tempest\tempest\services\nova\json\flavors_client.py",
line
39, in get_flavor_details
      resp, body = self.get("flavors/%s" % str(flavor_id))
    File "C:\source\tempest\tempest\common\rest_client.py", line 155,
    in get
      return self.request('GET', url)
    File "C:\source\tempest\tempest\common\rest_client.py", line 189,
    in
request
      raise exceptions.NotFound(resp_body)
NotFound: Object not found
Details: Object not found
Details: {"itemNotFound": {"message": "The resource could not be
found.", "code": 404}}
-------------------->>  begin captured logging<<
--------------------
tempest.common.rest_client: ERROR: Request URL:
http://172.18.0.156:8774/v2/6b12f7a923c04f89bffb95bff997c3ef/flavors/1234
tempest.common.rest_client: ERROR: Request Body: None
tempest.common.rest_client: ERROR: Response Headers: {'date': 'Thu,
31
May 2012 19:57:42 GMT', 'status': '404', 'content-length': '78',
'content-type': 'application/json; charset=UTF-8',
'x-compute-request-id': 'req-b62a1f74-9919-4f8f-9d81-1006932894c9'}
tempest.common.rest_client: ERROR: Response Body: {"itemNotFound":
{"message": "The resource could not be found.", "code": 404}}
--------------------->>  end captured logging<<
---------------------


--
Mailing list: https://launchpad.net/~openstack-qa-team
Post to     : openstack-qa-team@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack-qa-team
More help   : https://help.launchpad.net/ListHelp




References