[feature] clearing storage and network config requires many slow api calls

Bug #1813019 reported by Jason Hobbs
6
This bug affects 1 person
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

Revision history for this message
Lee Trager (ltrager) wrote :

The machine API has calls to do this:

maas $PROFILE machine restore-networking-configuration $SYSTEM_ID
maas $PROFILE machine restore-storage-configuration $SYSTEM_ID
# Restores both network and storage configuration with one call
maas $PROFILE machine restore-default-configuration $SYSTEM_ID

Changed in maas:
status: New → Incomplete
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Thanks, that's definitely helpful but not exactly what I'm asking for. Restoring default storage config through that command leaves partitions and mounts setup, based on whatever the default storage config is. I want bare physical storage and network devices and that's it.

Changed in maas:
status: Incomplete → New
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
Lee Trager (ltrager)
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
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.