Merge ~raharper/curtin:fix/schema-add-raid-metadata into curtin:master

Proposed by Ryan Harper
Status: Merged
Approved by: Dan Watkins
Approved revision: 8ad14f0933606644020e08740fd63d436176013a
Merge reported by: Server Team CI bot
Merged at revision: not available
Proposed branch: ~raharper/curtin:fix/schema-add-raid-metadata
Merge into: curtin:master
Diff against target: 13 lines (+2/-0)
1 file modified
curtin/block/schemas.py (+2/-0)
Reviewer Review Type Date Requested Status
Dan Watkins (community) we did it Approve
Server Team CI bot continuous-integration Approve
Review via email: mp+373782@code.launchpad.net

Commit message

block-schema: update raid schema for preserve and metadata

Curtin can now accept type: raid storage config which sets the
'preserve' boolean to 'true' which informs curtin that it does
not need to create a new raid device.

We also accept a 'metadata' version hint in the schema as curtin
passes this value along as info to users of block-discover.

To post a comment you must log in.
Revision history for this message
Server Team CI bot (server-team-bot) wrote :
review: Approve (continuous-integration)
Revision history for this message
Dan Watkins (oddbloke) wrote :

Should this be adding a wipe property too?

review: Needs Information
Revision history for this message
Ryan Harper (raharper) wrote :

Yes. Yes it should. I'll fix.

Revision history for this message
Ryan Harper (raharper) wrote :

Actually, we don't yet support that; I've a separate task for preserve composed devices and wiping them; which is a variant of the keep this raid around and mount it at a specific location use-case that uses the preserve and metadata keys.

I'll reword the commit.

Revision history for this message
Dan Watkins (oddbloke) :
review: Approve (we did it)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/curtin/block/schemas.py b/curtin/block/schemas.py
2index 3d36026..07e4143 100644
3--- a/curtin/block/schemas.py
4+++ b/curtin/block/schemas.py
5@@ -298,6 +298,8 @@ RAID = {
6 'devices': {'$ref': '#/definitions/devices'},
7 'name': {'$ref': '#/definitions/name'},
8 'mdname': {'$ref': '#/definitions/name'}, # XXX: Docs need updating
9+ 'metadata': {'type': ['string', 'number']},
10+ 'preserve': {'$ref': '#/definitions/preserve'},
11 'ptable': {'$ref': '#/definitions/ptable'},
12 'spare_devices': {'$ref': '#/definitions/devices'},
13 'type': {'const': 'raid'},

Subscribers

People subscribed via source and target branches