-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
NPE during host rolling maintenance when host has VMs with custom constrained/unconstrained service offering
ISSUE TYPE
- Bug Report
COMPONENT NAME
Host
CLOUDSTACK VERSION
4.19.1.2
OS / ENVIRONMENT
MS + KVM Hosts (OL8)
SUMMARY
NPE after start rolling maintenance when host has VMs with custom constrained/unconstrained service offering.
STEPS TO REPRODUCE
- Set host tag (tag1) to host, say Host1
- Set host tag (tag1) to any other host, say Host2, in the same cluster as Host1
- Create custom constrained/unconstrained service offering with host tag tag1
- Create VM on the Host1, using the above service offering
- Start rolling maintenance on Host1
Logs:
2024-10-22 07:33:59,845 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-39:ctx-8b239b3a job-58) (logid:dae9839e) Executing AsyncJobVO: {id:58, userId: 2, accountId: 2, instanceType: Host, instanceId: 1, cmd: org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"5KjTYbzLXZBM2G0YP4VX1m0ImKo","httpmethod":"GET","ctxStartEventId":"141","hostids":"3ebaf579-7343-463b-9f85-8d7672f23dff","ctxDetails":"{\"interface com.cloud.host.Host\":\"3ebaf579-7343-463b-9f85-8d7672f23dff\"}","ctxAccountId":"2","cmdEventType":"HOST.ROLLING.MAINTENANCE"}, cmdVersion: 0, status: IN_PROGRESS, processStatus: 0, resultCode: 0, result: null, initMsid: 32989593469185, completeMsid: null, lastUpdated: null, lastPolled: null, created: null, removed: null}
2024-10-22 07:33:59,857 DEBUG [c.c.r.RollingMaintenanceManagerImpl] (API-Job-Executor-39:ctx-8b239b3a job-58 ctx-46d77a1d) (logid:dae9839e) State checks on the hosts in the cluster
2024-10-22 07:33:59,857 DEBUG [c.c.r.RollingMaintenanceManagerImpl] (API-Job-Executor-39:ctx-8b239b3a job-58 ctx-46d77a1d) (logid:dae9839e) Checking hosts capacity before attempting rolling maintenance
2024-10-22 07:33:59,865 DEBUG [c.c.c.CapacityManagerImpl] (API-Job-Executor-39:ctx-8b239b3a job-58 ctx-46d77a1d) (logid:dae9839e) Host {id: 1, name: ol8.localdomain, uuid: 3ebaf579-7343-463b-9f85-8d7672f23dff} is KVM hypervisor type, no max guest limit check needed
2024-10-22 07:33:59,876 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-39:ctx-8b239b3a job-58) (logid:dae9839e) Unexpected exception while executing org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd
java.lang.NullPointerException
at com.cloud.capacity.CapacityManagerImpl.checkIfHostHasCpuCapability(CapacityManagerImpl.java:415)
at com.cloud.resource.RollingMaintenanceManagerImpl.performCapacityChecksBeforeHostInMaintenance(RollingMaintenanceManagerImpl.java:641)
at com.cloud.resource.RollingMaintenanceManagerImpl.performCapacityChecks(RollingMaintenanceManagerImpl.java:593)
at com.cloud.resource.RollingMaintenanceManagerImpl.startRollingMaintenance(RollingMaintenanceManagerImpl.java:200)
at org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd.execute(StartRollingMaintenanceCmd.java:131)
at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:172)
at com.cloud.api.ApiAsyncJobDispatcher.runJob(ApiAsyncJobDispatcher.java:112)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.runInContext(AsyncJobManagerImpl.java:654)
at org.apache.cloudstack.managed.context.ManagedContextRunnable$1.run(ManagedContextRunnable.java:48)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext$1.call(DefaultManagedContext.java:55)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.callWithContext(DefaultManagedContext.java:102)
at org.apache.cloudstack.managed.context.impl.DefaultManagedContext.runWithContext(DefaultManagedContext.java:52)
at org.apache.cloudstack.managed.context.ManagedContextRunnable.run(ManagedContextRunnable.java:45)
at org.apache.cloudstack.framework.jobs.impl.AsyncJobManagerImpl$5.run(AsyncJobManagerImpl.java:602)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
2024-10-22 07:33:59,879 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-39:ctx-8b239b3a job-58) (logid:dae9839e) Complete async job-58, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"530"}
EXPECTED RESULTS
Rolling maintenance of host should be performed without any issues.
ACTUAL RESULTS
Rolling maintenance of host fails with error, when host has VMs with custom constrained/unconstrained service offering.
Metadata
Metadata
Assignees
Labels
No labels