sureshanaparti opened a new issue, #9836:
URL: https://github.com/apache/cloudstack/issues/9836
<!--
Verify first that your issue/request is not already reported on GitHub.
Also test if the latest release and main branch are affected too.
Always add information AFTER of these HTML comments, but no need to delete
the comments.
-->
NPE during host rolling maintenance when host has VMs with custom
constrained/unconstrained service offering
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g. API, VR, VPN, UI, etc.
-->
~~~
Host
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
4.19.1.2
~~~
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
MS + KVM Hosts (OL8)
##### SUMMARY
<!-- Explain the problem/feature briefly -->
NPE after start rolling maintenance when host has VMs with custom
constrained/unconstrained service offering.
##### STEPS TO REPRODUCE
<!--
For bugs, show exactly how to reproduce the problem, using a minimal
test-case. Use Screenshots if accurate.
For new features, show how the feature would be used.
-->
- 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
<!-- What did you expect to happen when running the steps above? -->
~~~
Rolling maintenance of host should be performed without any issues.
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
Rolling maintenance of host fails with error, when host has VMs with custom
constrained/unconstrained service offering.
~~~
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]