Github user dmytro-shevchenko commented on the pull request:
https://github.com/apache/cloudstack/pull/1230#issuecomment-214497874
Rebase with Master done, pom.xml file updated.
Also I perform a small modification in code, during testing I found one
issue: in 'snapshot_store_ref' table all snapshots from one volume was linked
between each other as Parent->Child using field 'parent_snapshot_id'. If you
removing one of previous snapshot and wait for 'storage.cleanup.interval'
period, it lead to NullPointerException when you creating new snapshot,
because Cloudstack trying to build all this snapshot relations before. Before
this patch this field was always set to '0' (no parent). From Cloudstack point
of view all snapshots on Ceph not connected (Ceph care about this on his own
level).
So, in file
engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/XenserverSnapshotStrategy.java:
I moved this block:
`SnapshotDataStoreVO snapshotDataStoreVO =
snapshotStoreDao.findByStoreSnapshot(primaryStore.getRole(),
primaryStore.getId(), snapshot.getId());
if (snapshotDataStoreVO != null) {
snapshotDataStoreVO.setParentSnapshotId(0L);
snapshotStoreDao.update(snapshotDataStoreVO.getId(),
snapshotDataStoreVO);
}`
from the condition: ...primaryStore).getPoolType() != StoragePoolType.RBD
and it will be executed in any way, as previously. Please review this part
of code, if this is good solution.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---