Fix null value for updated time

Bug #1254980 reported by huangtianhua
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Expired
Undecided
Unassigned

Bug Description

Updated time is null value in response body while updating "availability_zone" for aggregate only.

There are two tables "aggregates" and "aggregate_metadata",if you call the update_aggregate api to update the "availability_zone" for aggregate, the tables "aggregates" hasn't been updated, so the updated_time is null value in response body which get from tables "aggregates" .But for user, the aggregate is updated, why the updated_time is null?

Also, get and list has the same problem.

I think it's a bug.

Tags: api
Changed in nova:
assignee: nobody → huangtianhua (huangtianhua)
tags: added: api
Revision history for this message
Russell Bryant (russellb) wrote :

This is another case where we're returning these timestamps directly from the db, but they don't always make sense in the API. As you describe, there's multiple tables on the backend, but from the user perspective, the aggregate was updated, and the APi should reflect that, IMO.

Changed in nova:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
huangtianhua (huangtianhua) wrote :

Thanks.
I will modify this.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/72859

Changed in nova:
status: Confirmed → In Progress
Revision history for this message
huangtianhua (huangtianhua) wrote :

Hi Russell Bryant:

Would you please to review this patch.
Thanks very much.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Huangtianhua,

The associated patch for this has been abandoned. Do you still plan to continue work on this? If not, please unassign yourself on the bug and set the status back to Confirmed, please! Thanks!

-jay

Changed in nova:
assignee: huangtianhua (huangtianhua) → nobody
status: In Progress → Confirmed
Revision history for this message
Neetu Jain (nutshi) wrote :

I can work on it .. might need some pointers

Neetu Jain (nutshi)
Changed in nova:
assignee: nobody → Neetu Jain (nutshi)
Revision history for this message
Neetu Jain (nutshi) wrote :
Download full text (8.3 KiB)

What should be steps of reproduction for this ?

i tried :-

1) nova aggregate-create new 1
2) nova --debug aggregate-update new1 new2 4

and the response i get is this ( i can see the updates_at correclty its not NULL) :-

REQ: curl -i 'http://172.30.178.143:5000/v2.0/tokens' -X POST -H "Accept: application/json" -H "Content-Type: application/json" -H "User-Agent: python-novaclient" -d '{"auth": {"tenantName": "admin", "passwordCredentials": {"username": "admin", "password": "{SHA1}3ebccd10704df17bc0dfd839372586ec9f1812c0"}}}'
INFO (connectionpool:258) Starting new HTTP connection (1): 172.30.178.143
DEBUG (connectionpool:375) Setting read timeout to 600.0
DEBUG (connectionpool:415) "POST /v2.0/tokens HTTP/1.1" 200 3963
RESP: [200] CaseInsensitiveDict({'date': 'Wed, 21 Jan 2015 20:55:49 GMT', 'vary': 'X-Auth-Token', 'content-length': '3963', 'content-type': 'application/json', 'server': 'Apache/2.4.7 (Ubuntu)'})
RESP BODY: {"access": {"token": {"issued_at": "2015-01-21T20:55:49.672336", "expires": "2015-01-21T21:55:49Z", "id": "{SHA1}886b8bdac63d3fe3d5a6c5c9c409dcd1beb39137", "tenant": {"parent_id": null, "enabled": true, "description": null, "name": "admin", "id": "2602402def694ba182612e6bca999494"}, "audit_ids": ["sYsaIc7YT0WXTDQf-elREg"]}, "serviceCatalog": [{"endpoints_links": [], "endpoints": [{"adminURL": "http://172.30.178.143:8774/v2/2602402def694ba182612e6bca999494", "region": "RegionOne", "publicURL": "http://172.30.178.143:8774/v2/2602402def694ba182612e6bca999494", "internalURL": "http://172.30.178.143:8774/v2/2602402def694ba182612e6bca999494", "id": "5228d5d3b1284a41bb6f4ca7850c6c69"}], "type": "compute", "name": "nova"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.30.178.143:8004/v1/2602402def694ba182612e6bca999494", "region": "RegionOne", "publicURL": "http://172.30.178.143:8004/v1/2602402def694ba182612e6bca999494", "internalURL": "http://172.30.178.143:8004/v1/2602402def694ba182612e6bca999494", "id": "4da68614b8a5462397f94fd5744512ae"}], "type": "orchestration", "name": "heat"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.30.178.143:8776/v2/2602402def694ba182612e6bca999494", "region": "RegionOne", "publicURL": "http://172.30.178.143:8776/v2/2602402def694ba182612e6bca999494", "internalURL": "http://172.30.178.143:8776/v2/2602402def694ba182612e6bca999494", "id": "445ac8827aef435d8de4f381fd1f51a3"}], "type": "volumev2", "name": "cinderv2"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.30.178.143:3333", "region": "RegionOne", "publicURL": "http://172.30.178.143:3333", "internalURL": "http://172.30.178.143:3333", "id": "3cebf810143b440d9044bd511d66c95a"}], "type": "s3", "name": "s3"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.30.178.143:9292", "region": "RegionOne", "publicURL": "http://172.30.178.143:9292", "internalURL": "http://172.30.178.143:9292", "id": "2b5740ee72f24191aa23e158ffd71b7f"}], "type": "image", "name": "glance"}, {"endpoints_links": [], "endpoints": [{"adminURL": "http://172.30.178.143:8000/v1", "region": "RegionOne", "publicURL": "http://172.30.178.143:8000/v1", "internalURL": "http://172.30.178.143:8000/v1", "id": "041cb95b2dd2...

Read more...

Revision history for this message
Neetu Jain (nutshi) wrote :

i meant

What should be steps of reproduction for this ?

i tried :-

1) nova aggregate-create new 1
2) nova --debug aggregate-update new1 new2 4

and in the response (when i use --debug) i can see the updates_at set correclty its not NULL) :-

RESP: [200] CaseInsensitiveDict({'date': 'Wed, 21 Jan 2015 20:55:50 GMT', 'content-length': '273', 'content-type': 'application/json', 'x-compute-request-id': 'req-7406663f-6f95-4d6a-8f47-e24857000467'})
RESP BODY: {"aggregate": {"name": "new2", "availability_zone": "4", "deleted": false, "created_at": "2015-01-21T20:20:43.000000", "updated_at": "2015-01-21T20:55:49.000000", "hosts": [], "deleted_at": null, "id": 1, "metadata": {"key1": "my2", "key": "my", "availability_zone": "4"}}}

Aggregate 1 has been successfully updated.
+----+------+-------------------+-------+---------------------------------------------+
| Id | Name | Availability Zone | Hosts | Metadata |
+----+------+-------------------+-------+---------------------------------------------+
| 1 | new2 | 4 | | 'availability_zone=4', 'key=my', 'key1=my2' |
+----+------+-------------------+-------+---------------------------------------------+

Neetu Jain (nutshi)
Changed in nova:
assignee: Neetu Jain (nutshi) → nobody
Revision history for this message
Sean Dague (sdague) wrote :

There is no longer a reproduce for this, marking as incomplete

Changed in nova:
status: Confirmed → Incomplete
Revision history for this message
yuntongjin (yuntongjin) wrote :

This is bug is still there, steps to reproduce:

$ nova aggregate-create fast-mem

$ nova aggregate-list
+----+----------+-------------------+
| Id | Name | Availability Zone |
+----+----------+-------------------+
| 2 | fast-io | nova |
| 3 | fast-mem | - |
+----+----------+-------------------+

$ nova --debug aggregate-set-metadata fast-mem availability_zone=nova
DEBUG (session:198) REQ: curl -g -i -X POST http://192.168.2.19:8774/v2.1/2bf6e5aebee849d7a374e732c1c0038a/os-aggregates/3/action -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-OpenStack-Nova-API-Version: 2.6" -H "X-Auth-Token: {SHA1}c099aea4aa1adeab284853da4a3d1d76af474f34" -d '{"set_metadata": {"metadata": {"availability_zone": "nova"}}}'
DEBUG (connectionpool:387) "POST /v2.1/2bf6e5aebee849d7a374e732c1c0038a/os-aggregates/3/action HTTP/1.1" 200 231
DEBUG (session:216) RESP: [200] Content-Length: 231 X-Compute-Request-Id: req-aa455149-48ae-4b87-85ff-e1c9e70a2ad4 Vary: X-OpenStack-Nova-API-Version Connection: keep-alive X-Openstack-Nova-Api-Version: 2.6 Date: Thu, 25 Feb 2016 02:34:09 GMT Content-Type: application/json
RESP BODY: {"aggregate": {"name": "fast-mem", "availability_zone": "nova", "deleted": false, "created_at": "2016-02-25T02:32:08.000000", "updated_at": null, "hosts": [], "deleted_at": null, "id": 3, "metadata": {"availability_zone": "nova"}}}

yuntongjin (yuntongjin)
Changed in nova:
status: Incomplete → Confirmed
yuntongjin (yuntongjin)
Changed in nova:
assignee: nobody → yuntongjin (yuntongjin)
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

This bug report has an assignee for over 1 month and there is no patch
for that. It looks like that the chance of getting a patch is low.
I'm going to remove the assignee to signal to others that they can take
over if they like.

If you want to work on this, please:
* add yourself as assignee AND
* set the status to "In Progress" AND
* provide a (WIP) patch within the next 2 weeks after that.

If you need assistance, reach out on the IRC channel #openstack-nova or
use the mailing list.

Changed in nova:
assignee: yuntongjin (yuntongjin) → nobody
Changed in nova:
importance: Medium → Low
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup EOL bug report

This is an automated cleanup. This bug report has been closed because it
is older than 18 months and there is no open code change to fix this.
After this time it is unlikely that the circumstances which lead to
the observed issue can be reproduced.

If you can reproduce the bug, please:
* reopen the bug report (set to status "New")
* AND add the detailed steps to reproduce the issue (if applicable)
* AND leave a comment "CONFIRMED FOR: <RELEASE_NAME>"
  Only still supported release names are valid (LIBERTY, MITAKA, OCATA, NEWTON).
  Valid example: CONFIRMED FOR: LIBERTY

Changed in nova:
importance: Low → Undecided
status: Confirmed → Expired
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.