Can't override built in partitioning

Bug #1571563 reported by Jacek Nykis
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Andres Rodriguez
1.9
Fix Released
High
Andres Rodriguez
curtin
Invalid
Undecided
Unassigned

Bug Description

In MAAS 1.7 it was possible to override partitioning command. For example we could configure encryption using snippet like this:

partitioning_commands:
    builtin: []
    01_partition: ['sh', '-c', *curtin_partition]

After upgrade to 1.9 above no longer works. When I retrieve preseed like this:
maas <user> node get-curtin-config <node>

My snippet is not there

I also tried configuring encryption using "storage" stanzas as per example here:
http://bazaar.launchpad.net/~curtin-dev/curtin/trunk/view/head:/examples/partitioning-demos/custom-partitioning-demo-dmcrypt.yaml

But my config also never makes it to the rendered preseed.

I made non-storage changes to the same preseed file and they do work so I think MAAS just ignores storage config from local files.

I am using MAAS 1.9.1+bzr4543-0ubuntu1~trusty1 from the stable PPA

Related branches

Revision history for this message
Jacek Nykis (jacekn) wrote :

I prepared a fix which worked in my environment, see lp:~jacekn/maas/lp1571563

Revision history for this message
Andres Rodriguez (andreserl) wrote :

Hi Jacek,

In 1.9 we've moved to a model where you can customize your partitioning layout from MAAS itself. MAAS now sends the custom layout to curtin. My guess here is that curtin no longer supports the overriding of the buil-tin partitioning. As such, I'm moving this bug from MAAS to curtin!

Thanks!

Changed in maas:
status: New → Won't Fix
Revision history for this message
Ryan Harper (raharper) wrote :

curtin certainly supports using encrypted partitioning as mention in the dmcrypt snippet.

Curtin executes what maas sends. If you're not seeing the desired configuration in the output
of maas <user> node get-curtin-config <node> there isn't anything that curtin can do about that.

Can you describe your use-case in detail so we can determine if there is any MAAS UX needed to enable that,
like-wise, that will also let us understand if there is anything missing in curtin to render your storage use-case.

Changed in curtin:
status: New → Incomplete
Revision history for this message
Jacek Nykis (jacekn) wrote :

My use case is full-disk encryption. MAAS 1.9 does not have support for it but it's a hard requirement for my deployment. I filed this as separate bug LP1570391

There is nothing missing from curtin, it already supports full-disk encryption there is just no way to get MAAS to do genearate preseed with full disk stanzas.

I managed to do what I need to do by writing custom preseed and applying small patch to maas (see linked branch).

In any case I think it's beneficial to allow users to override preseed generated by MAAS in case there are configurations not supported by MAAS but supported by curtin

Changed in curtin:
status: Incomplete → New
Changed in maas:
status: Won't Fix → Confirmed
milestone: none → 2.0.0
status: Confirmed → Triaged
Revision history for this message
Ryan Harper (raharper) wrote :

Per comment, nothing needed in curtin.

Changed in curtin:
status: New → Invalid
Changed in maas:
assignee: nobody → Andres Rodriguez (andreserl)
importance: Undecided → High
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Revision history for this message
Jacek Nykis (jacekn) wrote :

I've just checked this MP:
https://code.launchpad.net/~andreserl/maas/lp1571563/+merge/292188

And while it fixes this particular bug it does not fix many other potential problems (not reported yet).

Your MP only allows admins to override storage config which is not enough and also confusing. It's confusing because when admins write custom preseed MAAS will honour storage parts but silently ignore network, swap and others.

This branch fixes the bug in fully:
lp:~jacekn/maas/lp1571563

Revision history for this message
Andres Rodriguez (andreserl) wrote : Re: [Bug 1571563] [NEW] Can't override built in partitioning

Hi Jacek,

We discussed this internally and decided not to allow the override of ther
things such as networking or swap. Swap variable there can be toggled via
MAAS API itself, hence overriding via the pressed is not something we want
to allow. As far as networking,it is still possible to override network
configuration by using post install hooks, same as everything else, and
this is done exactly the same way how it used to be done in the past (post
install hooks).

The only thing that wouldn't have been possible to override was storage and
as such we only allow to override this part specifically.

On Tuesday, April 19, 2016, Jacek Nykis <email address hidden> wrote:

> I've just checked this MP:
> https://code.launchpad.net/~andreserl/maas/lp1571563/+merge/292188
>
> And while it fixes this particular bug it does not fix many other
> potential problems (not reported yet).
>
> Your MP only allows admins to override storage config which is not
> enough and also confusing. It's confusing because when admins write
> custom preseed MAAS will honour storage parts but silently ignore
> network, swap and others.
>
> This branch fixes the bug in fully:
> lp:~jacekn/maas/lp1571563
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1571563
>
> Title:
> Can't override built in partitioning
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/curtin/+bug/1571563/+subscriptions
>

--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer

Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.