Deprecate Disk Config(Auto/Manual) in API v3

Registered by Christopher Lefelhocz

With the implementation of cloud-init, using OS-DCF:diskConfig attribute in the API is no longer needed. We would like to deprecate this feature to reduce complexity and user confusion. This proposal examines removing the disk config support in v3 of the API with eventual deprecation when v2 of the API support is removed.

Currently on a boot we can specify the disk be auto resized/configured by specifying OS-DCF:diskConfig to be AUTO or MANUAL. An example v2 curl is the following:

curl -i http://192.168.46.144:8774/v2/6e96f875b5af4894b59264484ce5d589/servers -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ..." -d '{"server": {"name": "foo", "imageRef": "ff88ace3-26fb-4899-af5d-f676277ad337", "key_name": "key1", "flavorRef": "1", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1}}'

This returns a 202 Accepted response when succeeding. The v2 functionality will remain in place until v2 is removed. v2 will be modified to include a log message to indicate this attribute will no longer exist in v3.

For v3 this option will not exist. An example command which tries to use the v2 extension with v3 is the following:
curl -i http://192.168.46.144:8774/v3/6e96f875b5af4894b59264484ce5d589/servers -X POST -H "X-Auth-Project-Id: admin" -H "User-Agent: python-novaclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: ..." -d '{"server": {"name": "foo", "imageRef": "ff88ace3-26fb-4899-af5d-f676277ad337", "key_name": "key1", "flavorRef": "1", "OS-DCF:diskConfig": "AUTO", "max_count": 1, "min_count": 1}}'

The response will be a 400 (Bad Request) or normal error when an invalid attribute is included in the v3 parse.

This will allow existing calls with no attribute (ie. selecting default) to continue working by simply changing to v3 support. This only affects calls where OS-DCF:diskConfig is explicitly set.

DocImpact: As part of v2 API documentation we should note this attribute and feature are going to go away eventually. As part of v3 API documentation we should include a "deprecated" statement with the expected mapping section of v2->v3. This will be noted in the commit for removing v3 code related to this attribute/feature.

Blueprint information

Status:
Complete
Approver:
Andrew Laski
Priority:
Low
Drafter:
Christopher Lefelhocz
Direction:
Approved
Assignee:
Alex Xu
Definition:
Approved
Series goal:
Accepted for icehouse
Implementation:
Implemented
Milestone target:
milestone icon 2014.1
Started by
Alex Xu
Completed by
Russell Bryant

Related branches

Sprints

Whiteboard

Yeah, we have been discussing some of this in email threads with Christopher Yeoh. A few notes:
- v3 actually doesn't have OS-DCF:diskConfig (they use os-disk-config:disk_config) as they are changing name form.
- Input validation work for v3 pretty much removes need for specific error request coming back.
- John had a log message v2 which he's already added to work list I see.

+1 we should only error out if we get all the input validation stuff sorted, it seems silly to special case it. First step is just to remove the V3 stuff, let me update the work items... --johnthetubaguy

I'm not too keen on having v3 return an error if diskConfig is passed in. I think we can just leave it out of the API and document it in the v2->v3 notes. We don't error on invalid input in general so I don't think we should special case this parameter. --alaski

I am happy to see this code go away, but I agree with alaski, for V3 we don't need to deprecate we can just remove it and document in V2->V3 notes, so the BP needs some tweaking first, re-targeting to icehouse-3. --jogo

IceHouse summit etherpad: https://etherpad.openstack.org/p/AutoDiskConfigRemoval

gerrit Topic: https://review.openstack.org/#/q/project:openstack/nova+branch:master+topic:bp/api-v3-remove-disk-config,n,z

Gerrit topic: https://review.openstack.org/#q,topic:bp/api-v3-remove-disk-config,n,z

Addressed by: https://review.openstack.org/62227
    Remove disk-config extension from v3 api

(?)

Work Items

Work items:
Remove the v3 extension (noting DocImpact): TODO
Add a log message when the v2 extension is loaded to say its deprecated in v3, and the functionality will be removed when the v2 API is removed: TODO
??Create unit test to verify failure when attempting with v3 API: TODO
Open a blueprint for removing attribute and feature when v2 API is removed from Openstack: TODO

This blueprint contains Public information 
Everyone can see this information.