andrijapanicsb edited a comment on issue #3264: Volume snapshot listing failing when originating primary pool removed URL: https://github.com/apache/cloudstack/issues/3264#issuecomment-583536016 Alright, a bit more digging tells me this is NOT a bug - but a consequence of bad DB hacking As follows: Tested on 4.11.2 (and master) - this exception happens when the pool is marked as removed (has "removed" date set) AND when there is at least one reference in the snapshots_store_ref table that says a "snapshot exists on this primary storage". Similar error would probably be raised if there are volume references but pool was marked as removed. This is "when" this issue/exception happens> BUT When you go and delete a storage via ACS GUI/API (i.e. before that manually remove any volumes/VMs from this storage via ACS) - then if there are snapshots references in the snapshots_store_ref table, those references will be properly removed (i.e. whole records are deleted where store_role="Primary" and store_id=<primary-store-id>) so the user can not even get into this situation that he is left with orphaned references in snapshot_store_ref table. A proposed workaround for anyone facing these issues (i.e. have DB inconsistency or has hacked DB in a wrong way) is to simply remove any references from the snapshot_store_ref table `delete from snapshot_store_ref table where store_role="Primary" and store_id=<id-of-removed-store>` @shwstppr @rhtyd - I would propose closing this issue altogether.
---------------------------------------------------------------- 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: [email protected] With regards, Apache Git Services
