New deployments do not take into account the new configurations (ephemeral_deployments, hw_sync etc..))
Bug #2033632 reported by
Jacopo Rota
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Alessandro Marcolini | ||
3.3 |
Fix Released
|
High
|
Christian Grabowski | ||
3.4 |
Fix Released
|
High
|
Christian Grabowski | ||
3.5 |
Fix Released
|
High
|
Alessandro Marcolini |
Bug Description
As per title, the steps to reproduce are:
1) deploy a machine with `ephemeral_deploy` enabled (or `hw_sync` and other properties) using the CLI or the HTTP calls
2) Release the machine
3) deploy again the machine, this time with `ephemeral_deploy` disabled
The machine will use the ephemeral_
This is happening only in the HTTP handlers, not in the websocket handlers.
Related branches
~cgrabowski/maas:backport_lp2033632_fix_3.3
- MAAS Lander: Approve
- Christian Grabowski: Approve
-
Diff: 183 lines (+118/-11)3 files modifiedsrc/maasserver/api/machines.py (+8/-11)
src/maasserver/api/tests/test_enlistment.py (+4/-0)
src/maasserver/api/tests/test_machine.py (+106/-0)
~cgrabowski/maas:backport_lp2033632_fix_3.4
- MAAS Lander: Approve
- Christian Grabowski: Approve
-
Diff: 180 lines (+115/-11)3 files modifiedsrc/maasserver/api/machines.py (+7/-11)
src/maasserver/api/tests/test_enlistment.py (+2/-0)
src/maasserver/api/tests/test_machine.py (+106/-0)
~troyanov/maas:backport-147ce84-3.5
- MAAS Lander: Approve
- Anton Troyanov: Approve
-
Diff: 147 lines (+110/-7)2 files modifiedsrc/maasserver/api/machines.py (+5/-7)
src/maasserver/api/tests/test_machine.py (+105/-0)
~alemar99/maas:MAASENG-2872-fix-deployment-config-problems
- Jacopo Rota: Approve
- MAAS Lander: Approve
-
Diff: 147 lines (+110/-7)2 files modifiedsrc/maasserver/api/machines.py (+5/-7)
src/maasserver/api/tests/test_machine.py (+105/-0)
no longer affects: | maas/3.5 |
Changed in maas: | |
milestone: | none → 3.5.0 |
importance: | Medium → High |
Changed in maas: | |
assignee: | nobody → Björn Tillenius (bjornt) |
Changed in maas: | |
milestone: | 3.5.0 → 3.6.0 |
Changed in maas: | |
status: | Triaged → Fix Committed |
To post a comment you must log in.
The root cause is at src/maasserver/ api/machines. py.
In particular
``` edit_form( request. user) machine, data={})
form. set_distro_ series( series= series)
form. set_license_ key(license_ key=license_ key)
form. set_hwe_ kernel( hwe_kernel= hwe_kernel) install_ rackd:
form. set_install_ rackd(install_ rackd=options. install_ rackd) ephemeral_ deploy:
form. set_ephemeral_ deploy(
ephemeral_ deploy= options. ephemeral_ deploy enable_ hw_sync:
form. set_enable_ hw_sync( enable_ hw_sync= options. enable_ hw_sync)
form. save()
Form = get_machine_
form = Form(instance=
if series is not None:
if license_key is not None:
if hwe_kernel is not None:
if options.
if options.
)
if options.
if form.is_valid():
```
is wrong because in case the new deployment has these options set to False, they are not stored and the previous ones are used