Re: [openstack-dev] [DIB] Adding GPT support

2016-06-14 Thread Andre Florath
Hello Tony,

it's already implemented twice :-)

[1] is mostly exactly what your propose (except of the removal of
sfdisk).  The problems with this kind of patches:
* If you want to do it somewhat general (i.e. allow more than
  one disk partition) the changes are getting (too) big.
* It is not possible to add things like LVM, MD or encryption -
  because of some basic problems handling parameters with
  dib-run-parts.

[2] is the more general approach: it is completely independent
of the used tool, but describes the partition table as a JSON
structure. An example can be found in [3]: to use GPT you just
need to change 'msdos' to 'gpt' in line 26 (already tested this).

A proposal how to handle block device setup can be found in [4].

Because also [2] is a somewhat big change, we currently try to
split off some general usable things first, like python logging [5],
move hook generation to python [6], or introduce exit phase [7].

As soon as these patches get merged, the original patch needs to
be rebased (and reworked). Maybe there is the need to extract
additional things, so that in the end, it's small and does
exactly one thing.

Would be great if you'd support this refactoring / migration
phase: it's some work.

Kind regards

Andre


[1] https://review.openstack.org/#/c/313938/
[2] https://review.openstack.org/#/c/322671/
[3] 
https://review.openstack.org/#/c/322671/6/elements/block-device/environment.d/07-block-device-config
[4] https://etherpad.openstack.org/p/C80jjsAs4x
[5] https://review.openstack.org/325409
[6] https://review.openstack.org/271139
[7] https://review.openstack.org/324811


__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


Re: [openstack-dev] [DIB] Adding GPT support

2016-06-14 Thread Gregory Haynes
On Tue, Jun 14, 2016, at 07:36 PM, Tony Breeds wrote:
> Hi All,
> I'd like to add GPT partitioning supporg to DIB.  My current
> understanding is that the only partitioning in DIB currently is
> provided by partitioning-sfdisk, which will not support GPT.
> 

This isn't made very clear by looking at the elements, but there are
actually two ways to partition images. There is the partitioning-sfdisk
element (which I am guessing is what you found) that partitions with
sfdisk. There is also the vm element which is the way most users
partition / create a bootloader for their images. The vm element uses
parted. There is also a patch up which adds GPT/UEFI support[1].

> My proposed solution is:
> 
> 1. Create a new element called partitioning-parted  that (surprise
> surprise)
>uses parted to create the disk labal and partitions.  This would like
>along
>side partitioning-sfdisk but provide a somewhat compatible way

I'd still like to see this - it would be great to break the partitioning
bits out of the vm element and in to a partitioning-parted element which
the vm element depends on.

> 2. Teach partitioning-parted how to parse DIB_PARTITIONING_SFDISK_SCHEMA
> and
>use parted to produce msdos disklabeled partition tables
> 3. Deprecate partitioning-sfdisk
> 4. Remove partitioning-sfdisk in line with thew std. deprecation process.

>From my cursory reading it seems like parted is the thing to use for
this and there's really no reason to chose sfdisk over parted? I don't
have a ton of knowledge about this, but if that is the case then I like
this plan. I definitely want to make sure that there's no reason a user
would prefer to use sfdisk over parted, though...

> 
> Does this sound like a reasonable plan?
> Yours Tony.

Something else worth mentioning is that Andreas has been working on some
refactoring of our block-device.d phase[2]. I think the changes your
looking for are mostly addressed in[1] but if you're hoping to do
something larger its probably good to make sure they align with Andreas'
goals.

1:
https://review.openstack.org/#/c/287784/22/elements/vm/block-device.d/10-partition
2: https://review.openstack.org/#/c/319591/

__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev


[openstack-dev] [DIB] Adding GPT support

2016-06-14 Thread Tony Breeds
Hi All,
I'd like to add GPT partitioning supporg to DIB.  My current understanding 
is that the only partitioning in DIB currently is provided by 
partitioning-sfdisk, which will not support GPT.

My proposed solution is:

1. Create a new element called partitioning-parted  that (surprise surprise)
   uses parted to create the disk labal and partitions.  This would like along
   side partitioning-sfdisk but provide a somewhat compatible way
2. Teach partitioning-parted how to parse DIB_PARTITIONING_SFDISK_SCHEMA and
   use parted to produce msdos disklabeled partition tables
3. Deprecate partitioning-sfdisk
4. Remove partitioning-sfdisk in line with thew std. deprecation process.

Does this sound like a reasonable plan?
Yours Tony.


signature.asc
Description: PGP signature
__
OpenStack Development Mailing List (not for usage questions)
Unsubscribe: openstack-dev-requ...@lists.openstack.org?subject:unsubscribe
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev