API: Metadata Service Callbacks
New metadata service API to allow guest instances to set (but not overwrite) server metadata.
This allows in-guest services to communicate externally through the Openstack API.
We already allow posts to set-password, this extends it to a more general mechanism.
To ensure its safe and not for high amounts of traffic:
* add a namespace to all keys, "from-server:"
* only set metadata keys that are not already set
* i.e. it is a single write only API
Use case 1:
* add a script in cloud-init to report back to the metadata service when cloud-init has completed
* user can poll server metadata to see when their server setup is complete
Use case 2:
* you want to build an in guest agent to reset networking
* agent can poll server metadata
* when a special key is added to reset networking, the network config can be re-run
* when its complete, the success or error code is returned using the above new API
More discussion from the Icehouse summit here:
https:/
Sample API to add/update metadata through Metadata Service
The metadata keys added will be prefixed with 'from_server_' to avoid accidentally overwriting the keys added by the user through Nova API.
POST http://
Normal Response Code 200
An overLimit(413) fault might be thrown if the operation exceeds quota
JSON Request
{
"meta": {
"key_1": "value1",
"key_2": "value2",
}
}
JSON Response
{
"availabili
"hostname": "test.novalocal",
"launch_index": 0,
"meta": {
"priority": "low",
"role": "webserver",
},
"name": "test",
"public_keys": {
"mykey": "ssh-rsa AAAAB3NzaC1yc2E
},
"uuid": "d8e02d56-
}
Blueprint information
- Status:
- Started
- Approver:
- John Garbutt
- Priority:
- Medium
- Drafter:
- Claxton Correya
- Direction:
- Needs approval
- Assignee:
- Aneesh Puliyedath Udumbath
- Definition:
- Drafting
- Series goal:
- None
- Implementation:
- Needs Code Review
- Milestone target:
- None
- Started by
- Claxton Correya
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Sponsor: johnthetubaguy
added whiteboard into description, this seems to represent what was agreed at the summit, Approved --johnthetubaguy
Gerrit topic: https:/
Addressed by: https:/
Refactoring metadata/base
Addressed by: https:/
Adding update_metadata API to metadata service
Apologies, this missed the deadline for Feature Freeze. Please rebase patches as soon as Juno opens, and we will try to get this in during that period. --johnthetubaguy (5th March 2014)
Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)Sponsor: johnthetubaguy
added whiteboard into description, this seems to represent what was agreed at the summit, Approved --johnthetubaguy
Gerrit topic: https:/
Addressed by: https:/
Refactoring metadata/base
Addressed by: https:/
Adding update_metadata API to metadata service
Apologies, this missed the deadline for Feature Freeze. Please rebase patches as soon as Juno opens, and we will try to get this in during that period. --johnthetubaguy (5th March 2014)
Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)
Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)Sponsor: johnthetubaguy
added whiteboard into description, this seems to represent what was agreed at the summit, Approved --johnthetubaguy
Gerrit topic: https:/
Addressed by: https:/
Refactoring metadata/base
Addressed by: https:/
Adding update_metadata API to metadata service
Apologies, this missed the deadline for Feature Freeze. Please rebase patches as soon as Juno opens, and we will try to get this in during that period. --johnthetubaguy (5th March 2014)
Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)Sponsor: johnthetubaguy
added whiteboard into description, this seems to represent what was agreed at the summit, Approved --johnthetubaguy
Gerrit topic: https:/
Addressed by: https:/
Refactoring metadata/base
Addressed by: https:/
Adding update_metadata API to metadata service
Apologies, this missed the deadline for Feature Freeze. Please rebase patches as soon as Juno opens, and we will try to get this in during that period. --johnthetubaguy (5th March 2014)
Unapproved - please re-submit via nova-spec --johnthetubagy (20th March 2014)
Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)
Marking this blueprint as definition: Drafting. If you are still working on this, please re-submit via nova-specs. If not, please mark as obsolete, and add a quick comment to describe why. --johnthetubaguy (20th April 2014)