← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1433404] Re: CLI 'nova host-meta' delete some meta failed

 

>From following logs,looks to me nova is right ,it raise the exception ,maybe novaclient should take care about that 
(whether report the exception), that's  another story 

Also, I noticed that even if the one failed, previous instances are all
updated which makes me think Eric is right ,we need handle this


REQ: curl -i 'http://9.114.194.88:8774/v2/cf50e8febdf144c79c834d10321f8f6e/os-hypervisors/opnstk2/servers' -X GET -H "Accept: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: admin" -H "X-Auth-Token: {SHA1}e34b2fc0fa14d071d901755413a23bdf608305cb"
INFO (connectionpool:187) Starting new HTTP connection (1): 9.114.194.88
DEBUG (connectionpool:357) "GET /v2/cf50e8febdf144c79c834d10321f8f6e/os-hypervisors/opnstk2/servers HTTP/1.1" 200 251
RESP: [200] {'date': 'Thu, 19 Mar 2015 12:27:59 GMT', 'content-length': '251', 'content-type': 'application/json', 'x-compute-request-id': 'req-77e25911-94f7-4801-a6ff-91ec0d584bec'}
RESP BODY: {"hypervisors": [{"status": "enabled", "state": "up", "id": 1, "hypervisor_hostname": "OPNSTK2", "servers": [{"uuid": "5dca73c3-73bd-422b-87a0-b3ad3a35b67f", "name": "JID0000f"}, {"uuid": "6930fcc4-10fb-4288-a9a3-2e158873da10", "name": "JID00010"}]}]}

REQ: curl -i 'http://9.114.194.88:8774/v2/cf50e8febdf144c79c834d10321f8f6e/servers/5dca73c3-73bd-422b-87a0-b3ad3a35b67f/metadata' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-Id: admin" -H "X-Auth-Token: {SHA1}e34b2fc0fa14d071d901755413a23bdf608305cb" -d '{"metadata": {"dsmode": "2"}}'
INFO (connectionpool:187) Starting new HTTP connection (1): 9.114.194.88
DEBUG (connectionpool:357) "POST /v2/cf50e8febdf144c79c834d10321f8f6e/servers/5dca73c3-73bd-422b-87a0-b3ad3a35b67f/metadata HTTP/1.1" 200 29
RESP: [200] {'date': 'Thu, 19 Mar 2015 12:27:59 GMT', 'content-length': '29', 'content-type': 'application/json', 'x-compute-request-id': 'req-0431ee1a-3022-442f-98d9-88fd69f26c37'}
RESP BODY: {"metadata": {"dsmode": "2"}}

REQ: curl -i
'http://9.114.194.88:8774/v2/cf50e8febdf144c79c834d10321f8f6e/servers/6930fcc4-10fb-4288-a9a3-2e158873da10/metadata'
-X POST -H "Accept: application/json" -H "Content-Type:
application/json" -H "User-Agent: python-novaclient" -H "X-Auth-Project-
Id: admin" -H "X-Auth-Token:
{SHA1}e34b2fc0fa14d071d901755413a23bdf608305cb" -d '{"metadata":
{"dsmode": "2"}}'

** Project changed: nova => python-novaclient

** Changed in: python-novaclient
       Status: New => Confirmed

-- 
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/1433404

Title:
  CLI 'nova host-meta' delete some meta failed

Status in Python client library for Nova:
  Confirmed

Bug description:
  On one host, some instances have some metas, but the others do not
  have.

  When delete the 'some metas', got an error:
  ERROR: Metadata item was not found (HTTP 404) (Request-ID: req-c85f5212-82ee-4b30-ad0e-48d0e62186c7)

  My environment is following:
  1 controller node, 1 compute node
  nova - 2014.1, stable-icehouse
  novaclient - 2.17.0

  Reproduce:
  1. Launch instance A with meta 'color=true' and 'foo=bar';
  2. Launch instance B with meta 'foo=bar';
  3. Use 'nova host-meta' to delete meta 'foo', and it worked.
  #nova host-meta 2C514_1_10_SBCJ delete foo
  4. Use 'nova host-meta' to delete meta 'color', and it did not work.

  IMHO, 'host-meta' CLI should ignore that instance B did not have 'color' meta, and delete meta which any instances
  on this host has. It is very cumbersome that use 'nova meta' every instance.

To manage notifications about this bug go to:
https://bugs.launchpad.net/python-novaclient/+bug/1433404/+subscriptions


References