[2.3+] Unable to disk erase if machine is deployed with a non-lts kernel
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Lee Trager | ||
2.3 |
In Progress
|
High
|
Unassigned |
Bug Description
I have asked maas 2.2.2 to erase disks as they are released. This works great for xenial but fails on machines deployed with artful. Here is what happens.
1) In maasserver/
2) The machine is rebooted and requests its grub.cfg which results in a function call to get_config in maasserver/
3) Since the boot purpose is commissioning we decide to overwrite the system and series but we do not modify the architecture or hwe_kernel.
4) Still in get_config we validate this combination of artful kernel with a xenial series and promptly throw the following error and give up on erasing the disk.
maas.node: [error] hostname: Marking node failed: Missing boot image ubuntu/
My hack/workaround is as follows in case you are interested.
diff --git a/maasserver/
index 5ec41bb..83d58d3 100644
--- a/maasserver/
+++ b/maasserver/
@@ -199,6 +199,9 @@ def get_config(
if purpose == "commissioning":
series = Config.
+ subarch = "generic"
+ machine.
+ machine.hwe_kernel = None
else:
series = machine.
Related branches
- MAAS Lander: Needs Fixing
- Blake Rouse (community): Approve
- Lee Trager (community): Approve
-
Diff: 184 lines (+82/-34)2 files modifiedsrc/maasserver/rpc/boot.py (+27/-31)
src/maasserver/rpc/tests/test_boot.py (+55/-3)
- Blake Rouse (community): Approve
- MAAS Lander: Needs Fixing
- Andres Rodriguez (community): Needs Information
-
Diff: 175 lines (+94/-48)2 files modifiedsrc/maasserver/rpc/boot.py (+80/-48)
src/maasserver/rpc/tests/test_boot.py (+14/-0)
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in maas: | |
status: | Fix Released → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To reproduce:
1. Deploy Artful
2. Release with disk erasing
3. The machine will attempt to boot the artful kernel with a Xenial image:
ubuntu/ amd64/ga- 17.10/xenial
We need to determine whether:
1. Since it was deployed with artful, boot the kernel/image same as the deployment
2. Use the default commissioning kernel/image.