Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

scheduler_hints ignored due to incorrect json tag in create request #231

Closed
datwiz opened this issue May 30, 2015 · 0 comments · Fixed by #232
Closed

scheduler_hints ignored due to incorrect json tag in create request #231

datwiz opened this issue May 30, 2015 · 0 comments · Fixed by #232
Labels
Milestone

Comments

@datwiz
Copy link
Contributor

datwiz commented May 30, 2015

It appears that scheduler_hints are getting ignored during server create due to incorrect json tag being used in the create request. Currently the tag being used is "scheduler_hints":{"group":"perf-same-host"}
Checking OpenStack API documentation for Kilo and Juno, the tag should be "os:scheduler_hints":{"group":"perf-same-host"}
API reference. http://developer.openstack.org/api-ref-compute-v2-ext.html#os-scheduler-hints

Fix requires changing the hash key in client/nova.rb along with the corresponding client/nova_spec.rb "all options specified" test case.

excerpt from debug log below, using v0.6.0.

2015-05-30 21:44 | DEBUG | create_server - start
2015-05-30 21:44 | DEBUG | request  => method  : POST
2015-05-30 21:44 | DEBUG | request  => url     : http://openstack:8774/v2/827ce29792c94e4b9d94d5515aebd852/servers
2015-05-30 21:44 | DEBUG | request  => headers : {"X-Auth-Token"=>"fdfef5f269b24925af2f68dd9d188a98", :accept=>:json, :content_type=>:json}
2015-05-30 21:44 | DEBUG | request  => body    : {"server":{"name":"perf-a-01","imageRef":"63118138-add1-4277-9934-14e9402cae93","flavorRef":"f71e4891-c37f-4b90-9ffe-f3e8319fa273","key_name":"vagrant-generated-jv5tzchf","security_groups":[{"name":"petnet-secgroup"}],"networks":[{"uuid":"61e932a6-d19d-40d9-8c3f-08d9663c5ae7"}]},"scheduler_hints":{"group":"perf-same-host"}}
2015-05-30 21:44 | DEBUG | response => code    : 202
2015-05-30 21:44 | DEBUG | response => headers : {:location=>"http://openstack:8774/v2/827ce29792c94e4b9d94d5515aebd852/servers/b7d430ad-cb94-4aae-bea9-b9cde226349d", :content_type=>"application/json", :content_length=>"442", :x_compute_request_id=>"req-13672300-582d-426b-9684-571759066c4c", :date=>"Sat, 30 May 2015 11:44:25 GMT"}
2015-05-30 21:44 | DEBUG | response => body    : {"server": {"security_groups": [{"name": "petnet-secgroup"}], "OS-DCF:diskConfig": "MANUAL", "id": "b7d430ad-cb94-4aae-bea9-b9cde226349d", "links": [{"href": "http://openstack:8774/v2/827ce29792c94e4b9d94d5515aebd852/servers/b7d430ad-cb94-4aae-bea9-b9cde226349d", "rel": "self"}, {"href": "http://openstack:8774/827ce29792c94e4b9d94d5515aebd852/servers/b7d430ad-cb94-4aae-bea9-b9cde226349d", "rel": "bookmark"}], "adminPass": "Hbf7h6SdSzTP"}}
2015-05-30 21:44 | DEBUG | create_server - end
@ggiamarchi ggiamarchi added the bug label May 30, 2015
@ggiamarchi ggiamarchi added this to the 0.7 milestone May 30, 2015
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jan 18, 2016
Sharpie pushed a commit to Sharpie/vagrant-openstack-provider that referenced this issue Jul 31, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants