nvazquez edited a comment on issue #3264: Volume snapshot listing failing when 
originating primary pool removed
URL: https://github.com/apache/cloudstack/issues/3264#issuecomment-480329760
 
 
   Error is NullPointerException on `StorageSubsystemSnapshotStrategy`, as the 
pool is removed, this line returns an empty pool: 
https://github.com/apache/cloudstack/blob/4.11.2.0/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/StorageSystemSnapshotStrategy.java#L976
   
   ````
   2019-04-05 13:48:39,507 ERROR [c.c.a.ApiServer] 
(qtp788117692-12:ctx-817b96c3 ctx-5c399d14) (logid:9277d33d) unhandled 
exception executing api command: [Ljava.lang.String;@2829384
   java.lang.NullPointerException
           at 
org.apache.cloudstack.storage.snapshot.StorageSystemSnapshotStrategy.canHandle(StorageSystemSnapshotStrategy.java:978)
           at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl$3.canHandle(StorageStrategyFactoryImpl.java:72)
           at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl$3.canHandle(StorageStrategyFactoryImpl.java:69)
           at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl.bestMatch(StorageStrategyFactoryImpl.java:95)
           at 
org.apache.cloudstack.storage.helper.StorageStrategyFactoryImpl.getSnapshotStrategy(StorageStrategyFactoryImpl.java:69)
           at 
org.apache.cloudstack.storage.snapshot.SnapshotObject.isRevertable(SnapshotObject.java:134)
           at 
com.cloud.api.ApiResponseHelper.createSnapshotResponse(ApiResponseHelper.java:536)
           at 
org.apache.cloudstack.api.command.user.snapshot.ListSnapshotsCmd.execute(ListSnapshotsCmd.java:117)
           at com.cloud.api.ApiDispatcher.dispatch(ApiDispatcher.java:150)
           at com.cloud.api.ApiServer.queueCommand(ApiServer.java:732)
   ````
   
   Possible workarounds without deleting the snapshot:
   - Remove the entry on `snapshot_store_ref` with store_role = Primary for 
conflicting snapshot.
   - Update the pool_id column on `snapshot_store_ref` for conflicting snapshot 
to a non-removed pool id.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to