[ https://issues.apache.org/jira/browse/CLOUDSTACK-2073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13688846#comment-13688846 ]
Rajesh Battala commented on CLOUDSTACK-2073: -------------------------------------------- when ZWPS is set for maintenance, while retriving the StoragePool only cluster level primary storage case is handled , zone wide is not handled at all. zonewide ps don't have pod id. and its causing the NPE as its accessing the podid to retrieve the storagepool. List<StoragePoolVO> spes = _storagePoolDao.listBy( primaryStorage.getDataCenterId(), primaryStorage.getPodId(), primaryStorage.getClusterId(), ScopeType.CLUSTER); > java.lang.NullPointerException when trying to put a Zone wide primary storage > in maintenance mode. > -------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-2073 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-2073 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the > default.) > Components: Management Server > Affects Versions: 4.2.0 > Environment: Build from master > Reporter: Sangeetha Hariharan > Assignee: Rajesh Battala > Priority: Critical > Fix For: 4.2.0 > > > java.lang.NullPointerException when trying to put a Zone wide primary storage > in maintenance mode. > Steps to reproduce the problem: > Configured a NFS primary storage zone wide. > Tried to put the primary storage in maintenance mode. > It fails with "Command failed due to Internal Server Error". > 2013-04-17 13:39:08,259 INFO [cloud.api.ApiServer] (catalina-exec-1:null) > (userId=2 accountId=2 sessionId=A716D4755FFE21C87D8EA5E2E459AD8C) > 10.217.252.128 -- GET > command=enableStorageMaintenance&id=27f5ddfc-f967-3e4e-91f1-ee19890c9577&response=json&sessionkey=tit%2Bdz%2Fux9eXh3FHUDUxlY6x8vo%3D&_=1366231160791 > 200 { "prepareprimarystorageformaintenanceresponse" : > {"jobid":"ff569d61-2474-4fe1-8eec-2701b26dd2ea"} } > 2013-04-17 13:39:11,306 INFO [cloud.api.ApiServer] (catalina-exec-17:null) > (userId=2 accountId=2 sessionId=A716D4755FFE21C87D8EA5E2E459AD8C) > 10.217.252.128 -- GET > command=queryAsyncJobResult&jobId=ff569d61-2474-4fe1-8eec-2701b26dd2ea&response=json&sessionkey=tit%2Bdz%2Fux9eXh3FHUDUxlY6x8vo%3D&_=1366231163927 > 200 { "queryasyncjobresultresponse" : > {"accountid":"cd06b3dc-a625-11e2-8627-06d4460004b1","userid":"cd07b7e6-a625-11e2-8627-06d4460004b1","cmd":"org.apache.cloudstack.api.command.admin.storage.PreparePrimaryStorageForMaintenanceCmd","jobstatus":2,"jobprocstatus":0,"jobresultcode":530,"jobresulttype":"object","jobresult":{"errorcode":530,"errortext":"Command > failed due to Internal Server > Error"},"created":"2013-04-17T13:39:08-0700","jobid":"ff569d61-2474-4fe1-8eec-2701b26dd2ea"} > } > management server logs: > 2013-04-17 13:39:08,260 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-15:job-64) Executing org.apache.cloudstack.api.command.admin. > storage.PreparePrimaryStorageForMaintenanceCmd for job-64 > 2013-04-17 13:39:08,268 ERROR [cloud.async.AsyncJobManagerImpl] > (Job-Executor-15:job-64) Unexpected exception while executing > org.apache.cloudstack.api.command.admin.storage.PreparePrimaryStorageForMaintenanceCmd > java.lang.NullPointerException > at > com.cloud.storage.StorageManagerImpl.preparePrimaryStorageForMaintenance(StorageManagerImpl.java:1417) > at > com.cloud.utils.component.ComponentInstantiationPostProcessor$InterceptorDispatcher.intercept(ComponentInstantiationPostProcessor.java:125) > at > com.cloud.storage.StorageManagerImpl.preparePrimaryStorageForMaintenance(StorageManagerImpl.java:189) > at > org.apache.cloudstack.api.command.admin.storage.PreparePrimaryStorageForMaintenanceCmd.execute(PreparePrimaryStorageForMaintenanceCmd.java:102) > at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:164) > at > com.cloud.async.AsyncJobManagerImpl$1.run(AsyncJobManagerImpl.java:437) > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) > at java.util.concurrent.FutureTask.run(FutureTask.java:166) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) > at java.lang.Thread.run(Thread.java:679) > 2013-04-17 13:39:08,269 DEBUG [cloud.async.AsyncJobManagerImpl] > (Job-Executor-15:job-64) Complete async job-64, jobStatus: 2, resultCode: > 530, result: Error Code: 530 Error text: null > 2013-04-17 13:39:11,295 DEBUG [cloud.api.ApiServlet] (catalina-exec-17:null) > ===START=== 10.217.252.128 -- GET > command=queryAsyncJobResult&jobId=ff569d61-2474-4fe1-8eec-2701b26dd2ea&response=json&sessionkey=tit%2Bdz%2Fux9eXh3FHUDUxlY6x8vo%3D&_=1366231163927 > 2013-04-17 13:39:11,303 DEBUG [cloud.async.AsyncJobManagerImpl] > (catalina-exec-17:null) Async job-64 completed > 2013-04-17 13:39:11,307 DEBUG [cloud.api.ApiServlet] (catalina-exec-17:null) > ===END=== 10.217.252.128 -- GET > command=queryAsyncJobResult&jobId=ff569d61-2474-4fe1-8eec-2701b26dd2ea&response=json&sessionkey=tit%2Bdz%2Fux9eXh3FHUDUxlY6x8vo%3D&_=1366231163927 > 2013-04-17 13:39:20,127 DEBUG [cloud.server.StatsCollector] > (StatsCollector-3:null) VmStatsCollector is running... > 2013-04-17 13:39:20,138 DEBUG [agent.manager.DirectAgentAttache] > (DirectAgent-368:null) Seq 1-1523844974: Executing request > 2013-04-17 13:39:20,412 DEBUG [xen.resource.CitrixResourceBase] > (DirectAgent-368:null) Vm cpu utilization 0.00453125 -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira