slavkap opened a new issue #5775:
URL: https://github.com/apache/cloudstack/issues/5775
##### ISSUE TYPE
<!-- Pick one below and delete the rest -->
* Bug Report
##### COMPONENT NAME
<!--
Categorize the issue, e.g., API, VR, VPN, UI, etc.
-->
~~~
Primary storage - excluding Ceph/non managed NFS
~~~
##### CLOUDSTACK VERSION
<!--
New line separated list of affected versions, commit ID for issues on main
branch.
-->
~~~
main and older versions
~~~
##### CONFIGURATION
<!--
Information about the configuration if relevant, e.g. basic network,
advanced networking, etc. N/A otherwise
-->
##### OS / ENVIRONMENT
<!--
Information about the environment if relevant, N/A otherwise
-->
OS - CentOS7
hypervisor - KVM
mgmt/agent version - 4.16.0.0
##### SUMMARY
<!-- Explain the problem/feature briefly -->
When you put the primary storage on Maintenance mode and restart the agent,
the storage will be removed from the storage adaptor's map. This causes
NullPointerException when collecting the storage statistics. Probably the
problem is for all storage pools which don't use `LibvirtStorageAdaptor` - e.g.
Linstor, PowerFlex, StorPool
This does not affect Ceph and non managed NFS
##### 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.
-->
<!-- Paste example playbooks or commands between quotes below -->
~~~
set storage.stats.interval on short interval
enable storage maintenance mode
restart the agents
~~~
<!-- You can also paste gist.github.com links for larger files -->
##### EXPECTED RESULTS
<!-- What did you expect to happen when running the steps above? -->
~~~
collect or don't the storage stats on pools on Maintenance mode
~~~
##### ACTUAL RESULTS
<!-- What actually happened? -->
<!-- Paste verbatim command output between quotes below -->
~~~
2021-12-15 08:31:03,586 DEBUG [cloud.agent.Agent]
(agentRequest-Handler-3:null) (logid:552801e3) Processing command:
com.cloud.agent.api.GetStorageStatsCommand
2021-12-15 08:31:03,586 WARN [cloud.agent.Agent]
(agentRequest-Handler-3:null) (logid:552801e3) Caught:
java.lang.NullPointerException
at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtGetStorageStatsCommandWrapper.execute(LibvirtGetStorageStatsCommandWrapper.java:40)
at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtGetStorageStatsCommandWrapper.execute(LibvirtGetStorageStatsCommandWrapper.java:32)
at
com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
at
com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1768)
at com.cloud.agent.Agent.processRequest(Agent.java:661)
at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1079)
at com.cloud.utils.nio.Task.call(Task.java:83)
at com.cloud.utils.nio.Task.call(Task.java:29)
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:834)
2021-12-15 08:31:03,588 DEBUG [cloud.agent.Agent]
(agentRequest-Handler-3:null) (logid:552801e3) Seq 60-4602115869219225621: {
Ans: , MgmtId: 2199191159196, via: 60, Ver: v1, Flags: 10,
[{"com.cloud.agent.api.Answer":{"result":"false","details":"java.lang.NullPointerException
~~~
--
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]