Commit fa8c83f
authored
CA-311475: do not change a domain's memory allocation while it is being… (#6890)
… built
When a domain takes a long time to be built (e.g. >1TiB) then squeezed
might run and attempt to change maxmem, causing the domain build to fail
to complete.
```
2026-02-04T13:59:12.915844+00:00 orca squeezed: [debug||9 ||squeeze_xen] Xenctrl.domain_setmaxmem domid=717 max=6370254848 (was=0)
2026-02-04T13:59:22.878301+00:00 orca squeezed: [debug||3 ||squeeze_xen] Xenctrl.domain_setmaxmem domid=717 max=2075287552 (was=6370254848)
```
Squeezed shouldn't change the maxmem setting on domains that have never
been run (other than to initialize it if 0). In fact another module in
Squeezed had code to detect whether a domain has ever been run, which
has been replaced with checking whether it has an active balloon driver
(if it hasn't reported a balloon driver it is still not very safe to
change it too early).
But that check missed one place that was still setting maxmem, ignoring
the balloon driver's presence. Fix this (hopefully last!) place: if
there is no balloon driver and we attempt to decrease maxmem then just
log a message instead.
Fixes: 9819bdb ("CA-32810: prevent the memory ballooning daemon
capping a domain's memory usage before it has written feature-balloon.")1 file changed
Lines changed: 9 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
794 | 794 | | |
795 | 795 | | |
796 | 796 | | |
797 | | - | |
| 797 | + | |
| 798 | + | |
798 | 799 | | |
799 | 800 | | |
800 | 801 | | |
| |||
828 | 829 | | |
829 | 830 | | |
830 | 831 | | |
831 | | - | |
832 | | - | |
833 | | - | |
834 | | - | |
835 | | - | |
836 | | - | |
837 | | - | |
838 | | - | |
| 832 | + | |
| 833 | + | |
839 | 834 | | |
840 | | - | |
| 835 | + | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
841 | 840 | | |
842 | 841 | | |
843 | 842 | | |
| |||
0 commit comments