No changes while terminating.
This commit is contained in:
parent
b76e5b1da9
commit
3a0da6cb70
2 changed files with 8 additions and 0 deletions
|
|
@ -69,7 +69,11 @@ public class CdMediaController extends Component {
|
|||
@SuppressWarnings({ "PMD.AvoidLiteralsInIfCondition",
|
||||
"PMD.AvoidInstantiatingObjectsInLoops" })
|
||||
public void onConfigureQemu(ConfigureQemu event) {
|
||||
if (event.state() == State.TERMINATING) {
|
||||
return;
|
||||
}
|
||||
|
||||
// Compare known and desired images.
|
||||
int cdCounter = 0;
|
||||
var drives = event.configuration().vm.drives;
|
||||
for (int i = 0; i < drives.length; i++) {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ import org.jdrupes.vmoperator.runner.qemu.events.CpuAdded;
|
|||
import org.jdrupes.vmoperator.runner.qemu.events.CpuDeleted;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.HotpluggableCpuStatus;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.MonitorCommand;
|
||||
import org.jdrupes.vmoperator.runner.qemu.events.RunnerStateChange.State;
|
||||
import org.jgrapes.core.Channel;
|
||||
import org.jgrapes.core.Component;
|
||||
import org.jgrapes.core.annotation.Handler;
|
||||
|
|
@ -62,6 +63,9 @@ public class CpuController extends Component {
|
|||
*/
|
||||
@Handler
|
||||
public void onConfigureQemu(ConfigureQemu event) {
|
||||
if (event.state() == State.TERMINATING) {
|
||||
return;
|
||||
}
|
||||
Optional.ofNullable(event.configuration().vm.currentCpus)
|
||||
.ifPresent(cpus -> {
|
||||
if (desiredCpus != null && desiredCpus.equals(cpus)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue