[feature] clearing storage and network config requires many slow api calls
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Low
|
Lee Trager |
Bug Description
When doing FCE deploys, we clear the existing storage and network config from a machine before applying our config, so that we have a good starting point.
It can take a long time to do this, since it's basically making all the API calls we use to setup storage and networking in reverse. We grab lists of bcache devices, block devices, volume groups, raids, partitions, etc, and go through and delete them all in the proper order, until all that is left for storage is the raw physical block devices, and all that's left for networking are unconfigured physical network interfaces.
It would be a lot cleaner and faster if we had a single API call for storage and for networking to reset a machine to this bare, completely unconfigured state.
Related branches
- Andres Rodriguez (community): Approve
- Blake Rouse (community): Approve
-
Diff: 120 lines (+50/-2)3 files modifiedsrc/maasserver/storage_layouts.py (+15/-0)
src/maasserver/testing/sampledata.py (+5/-2)
src/maasserver/tests/test_storage_layouts.py (+30/-0)
tags: | added: cdo-qa |
Changed in maas: | |
milestone: | none → next |
status: | New → Triaged |
summary: |
- clearing storage and network config requires many slow api calls + [feature] clearing storage and network config requires many slow api + calls |
tags: | added: storage-templates |
Changed in maas: | |
status: | Triaged → In Progress |
importance: | Undecided → Low |
assignee: | nobody → Lee Trager (ltrager) |
milestone: | next → 2.6.0beta1 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
The machine API has calls to do this:
maas $PROFILE machine restore- networking- configuration $SYSTEM_ID storage- configuration $SYSTEM_ID default- configuration $SYSTEM_ID
maas $PROFILE machine restore-
# Restores both network and storage configuration with one call
maas $PROFILE machine restore-