Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE during host rolling maintenance when host has tag and service offering doesn't have host tag #9834

Open
sureshanaparti opened this issue Oct 22, 2024 · 0 comments · May be fixed by #9844
Milestone

Comments

@sureshanaparti
Copy link
Contributor

NPE during host rolling maintenance when host has tag and service offering doesn't have host tag.

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 tag and service offering doesn't have host tag. Other host(s) in cluster has tag.

STEPS TO REPRODUCE
  • Set host tag to host, say Host1
  • Set host tag to any other host, say Host2, in the same cluster as Host1
  • Create VM on the Host1, using service offering with no host tag
  • Start rolling maintenance on Host1

Logs:

2024-10-22 05:40:25,689 INFO  [o.a.c.f.j.i.AsyncJobMonitor] (API-Job-Executor-32:ctx-6b9edab0 job-41) (logid:c9c074cb) Add job-41 into job monitoring
2024-10-22 05:40:25,691 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (qtp660017404-20:ctx-f60bd7f6 ctx-8a09649a) (logid:2c81de00) submit async job-41, details: AsyncJobVO: {id:41, userId: 2, accountId: 2, instanceType: Host, instanceId: 2, cmd: org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"5KjTYbzLXZBM2G0YP4VX1m0ImKo","httpmethod":"GET","ctxStartEventId":"115","hostids":"00016127-58a3-4cd4-95e6-f7279db0574c","ctxDetails":"{\"interface com.cloud.host.Host\":\"00016127-58a3-4cd4-95e6-f7279db0574c\"}","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 05:40:25,693 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-32:ctx-6b9edab0 job-41) (logid:2df29f6c) Executing AsyncJobVO: {id:41, userId: 2, accountId: 2, instanceType: Host, instanceId: 2, cmd: org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd, cmdInfo: {"response":"json","ctxUserId":"2","sessionkey":"5KjTYbzLXZBM2G0YP4VX1m0ImKo","httpmethod":"GET","ctxStartEventId":"115","hostids":"00016127-58a3-4cd4-95e6-f7279db0574c","ctxDetails":"{\"interface com.cloud.host.Host\":\"00016127-58a3-4cd4-95e6-f7279db0574c\"}","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 05:40:25,695 DEBUG [c.c.a.ApiServlet] (qtp660017404-20:ctx-f60bd7f6 ctx-8a09649a) (logid:2c81de00) ===END===  10.0.3.251 -- GET  hostids=00016127-58a3-4cd4-95e6-f7279db0574c&command=startRollingMaintenance&response=json&sessionkey=5KjTYbzLXZBM2G0YP4VX1m0ImKo
2024-10-22 05:40:25,709 DEBUG [c.c.r.RollingMaintenanceManagerImpl] (API-Job-Executor-32:ctx-6b9edab0 job-41 ctx-d4ae806d) (logid:2df29f6c) State checks on the hosts in the cluster
2024-10-22 05:40:25,709 DEBUG [c.c.r.RollingMaintenanceManagerImpl] (API-Job-Executor-32:ctx-6b9edab0 job-41 ctx-d4ae806d) (logid:2df29f6c) Checking hosts capacity before attempting rolling maintenance
2024-10-22 05:40:25,733 ERROR [c.c.a.ApiAsyncJobDispatcher] (API-Job-Executor-32:ctx-6b9edab0 job-41) (logid:2df29f6c) Unexpected exception while executing org.apache.cloudstack.api.command.admin.resource.StartRollingMaintenanceCmd
java.lang.NullPointerException
	at com.cloud.resource.RollingMaintenanceManagerImpl.lambda$checkHostTags$1(RollingMaintenanceManagerImpl.java:679)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
	at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1632)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
	at java.base/java.util.stream.MatchOps$MatchTask.doLeaf(MatchOps.java:306)
	at java.base/java.util.stream.MatchOps$MatchTask.doLeaf(MatchOps.java:277)
	at java.base/java.util.stream.AbstractShortCircuitTask.compute(AbstractShortCircuitTask.java:115)
	at java.base/java.util.concurrent.CountedCompleter.exec(CountedCompleter.java:746)
	at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
	at java.base/java.util.concurrent.ForkJoinTask.doInvoke(ForkJoinTask.java:408)
	at java.base/java.util.concurrent.ForkJoinTask.invoke(ForkJoinTask.java:736)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateParallel(MatchOps.java:242)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateParallel(MatchOps.java:196)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:233)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:528)
	at com.cloud.resource.RollingMaintenanceManagerImpl.checkHostTags(RollingMaintenanceManagerImpl.java:679)
	at com.cloud.resource.RollingMaintenanceManagerImpl.performCapacityChecksBeforeHostInMaintenance(RollingMaintenanceManagerImpl.java:626)
	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 05:40:25,738 DEBUG [o.a.c.f.j.i.AsyncJobManagerImpl] (API-Job-Executor-32:ctx-6b9edab0 job-41) (logid:2df29f6c) Complete async job-41, jobStatus: FAILED, resultCode: 530, result: org.apache.cloudstack.api.response.ExceptionResponse/null/{"uuidList":[],"errorcode":"530"}
Host_RollingMaintenance_Issue
EXPECTED RESULTS
Rolling maintenance of host should be performed without any issues.
ACTUAL RESULTS
Rolling maintenance of host fails with error.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant