Config drive Ironic support

Registered by Cosmin Poieana on 2015-08-04

Currently, cloudbase-init looks for config-drive files under raw physical disks (vfat + ISO) and cdrom drives, but this is not enough if we're going to support Ironic (because it's not using a hypervisor and usually creates a partition for that at the end of the disk: ext2 by default which is not recognized by windows).

1. Implement:

I. A new option in configdrive metadata service for iterating through volumes and partitions

II. Refactor code under windows part of the configdrive for:
    a. decoupling disk/partition metrics logic
    b. common ISO size computation and writing

III. Refactor disk management utilities and add raw partition support

IV. Add method for listing volumes in osutils

V. Add method for listing partitions in osutils

2. Possible bugs:

I. https://github.com/stackforge/cloudbase-init/blob/master/cloudbaseinit/metadata/services/osconfigdrive/windows.py#L88-L96
Due to a variable size of bytes per sector, the ISO magic string or size values could be outside the read buffer and an offset constant greater than the buffer capacity will lead to index errors. But this will not happen according to current search offsets and usual bytes per sector values (512 -> 4096; only powers of 2).

!BUT! https://github.com/stackforge/cloudbase-init/blob/master/cloudbaseinit/metadata/services/osconfigdrive/windows.py#L105 - could this indicate a possible "unusual" bytes per sector value (because I don't see its purpose if it wouldn't)?

3. A light uml:

https://www.gliffy.com/go/publish/image/8651345/L.png

Blueprint information

Status:
Not started
Approver:
Alessandro Pilotti
Priority:
Undefined
Drafter:
Cosmin Poieana
Direction:
Needs approval
Assignee:
Cosmin Poieana
Definition:
Pending Approval
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

I don't think the potential bug belongs into this blueprint, it should be separated.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.