Surface minimum allowable partition size over websocket
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Expired
|
Medium
|
Unassigned | ||
3.0 |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
In the angular codebase there are a lot of constants and code used to determine the minimum allowable partition size of a disk, e.g:
// From models/
var INITIAL_
var END_OF_
var PARTITION_
INITIAL_
var PREP_PARTITION_SIZE = 8 * 1024 * 1024;
// From models/partition.py - must be kept in sync.
var PARTITION_
var MIN_PARTITION_SIZE = PARTITION_
$scope.
var space_to_reserve = 0;
if (
!angular.
disk.
) {
// Disk has no partition table, so reserve space for it.
space_
// ppc64el node requires that space be saved for the prep
// partition.
if ($scope.
space_
}
}
return ConverterServic
disk.
PARTITION_
);
};
As far as I can tell, all of this code is just used to determine whether to show the "Add partition" action in the UI. Can we remove this logic from the frontend code, and expose a parameter like `minimum_
Changed in maas: | |
importance: | Undecided → Medium |
status: | New → Triaged |
milestone: | none → 3.0.1 |
Changed in maas: | |
milestone: | 3.0.1 → none |
If that's the only reason, we could also add a boolean flag to disks to report whether partitions can be created on it.