Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review25387 --- Commit 42e4b74402ec5aa254a5bdc714f1446894aff3af in branch refs/heads/4.2 from Edison Su [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=42e4b74 ] CLOUDSTACK-2729: another try to solve libvirt storage pool missing issue: if the storage pool is missing, then recreate it - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review25389 --- Commit 9cfd434640cf51bbd591ef4f34f90163ebb255df in branch refs/heads/4.2-forward from Edison Su [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=9cfd434 ] CLOUDSTACK-2729: another try to solve libvirt storage pool missing issue: if the storage pool is missing, then recreate it - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review25134 --- Commit ba90fa91d3da56d4b63a0850d58add34cc5a7a2c in branch refs/heads/4.1 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=ba90fa9 ] CLOUDSTACK-2729: minor change on deleteVol in LibvirtStorageAdaptor.java - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24902 --- Commit 6d86af85baa57bb20ec9642cbd1cd82c002dcfef in branch refs/heads/master from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=6d86af8 ] CLOUDSTACK-2729: increase waiting timeout for global file lock to 300 seconds - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24903 --- Commit dacc4e1a4f7dc3763f16acc2cddd936fdc2fbd42 in branch refs/heads/4.2 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=dacc4e1 ] CLOUDSTACK-2729: increase waiting timeout for global file lock to 300 seconds (cherry picked from commit 6d86af85baa57bb20ec9642cbd1cd82c002dcfef) - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24904 --- Commit 64bb7007053d004fe7a8ac3b610e20df69f16bab in branch refs/heads/4.1 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=64bb700 ] CLOUDSTACK-2729: increase waiting timeout for global file lock to 300 seconds (cherry picked from commit 6d86af85baa57bb20ec9642cbd1cd82c002dcfef) - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24880 --- Commit b2ed632396fb57fedd7f88d36408299167f963c0 in branch refs/heads/master from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=b2ed632 ] CLOUDSTACK-2729: use spd.getTargetPath instead of mount path to fix issue on local storage - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24881 --- Commit ea50c6663fcff4b166fc43cb652638e3c1080c64 in branch refs/heads/4.2 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=ea50c66 ] CLOUDSTACK-2729: use spd.getTargetPath instead of mount path to fix issue on local storage (cherry picked from commit b2ed632396fb57fedd7f88d36408299167f963c0) - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24882 --- Commit 630d2561d2b13882892799507613823bcc04b4ac in branch refs/heads/4.1 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=630d256 ] CLOUDSTACK-2729: use spd.getTargetPath instead of mount path to fix issue on local storage (cherry picked from commit b2ed632396fb57fedd7f88d36408299167f963c0) - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24778 --- Commit 9ec8d48945f465b74284034b94f12efdd319bd0f in branch refs/heads/4.2 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=9ec8d48 ] Revert CLOUDSTACK-2729: don't refresh storage pool when accessing libvirt storage pool This reverts commit b50060be0cfb5e8fb4334ff4dbcbab3d2ee3b417. Signed-off-by: Wei Zhou w.z...@leaseweb.com - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24711 --- Commit 5cb090ed40816950d0c9dbb62135240a7c8b1e3d in branch refs/heads/master from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=5cb090e ] CLOUDSTACK-2729: move unlock to finally block to handle failed libvirt operations - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24712 --- Commit c229244dabb5c5685fbb1aab84de9afdf199820b in branch refs/heads/4.2 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=c229244 ] CLOUDSTACK-2729: move unlock to finally block to handle failed libvirt operations (cherry picked from commit 5cb090ed40816950d0c9dbb62135240a7c8b1e3d) - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 10:38 a.m.) Review request for cloudstack, edison su and Wido den Hollander. Changes --- use atom semantics lock and unlock. Thank Edison! Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs (updated) - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java a9baa52 Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24650 --- plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java https://reviews.apache.org/r/13223/#comment48751 if (!lockFile.exists()) { lockFile.createNewFile(); Above stanza is not atomic. If two threads coming into this code at the same time, both will succeed. Maybe just if (lockFile.createNewFile()) is good enough? - edison su On Aug. 5, 2013, 10:38 a.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 10:38 a.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java a9baa52 Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs (updated) - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24657 --- Ship it! Ship It! - edison su On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24656 --- Commit 0f539b4ce1b07c672a776ffa806dabb70c528afe in branch refs/heads/4.2 from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=0f539b4 ] CLOUDSTACK-2729: use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool Signed-off-by: Edison Su sudi...@gmail.com - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24659 --- Commit 1e4ff7f4532a39355ef5e5bfaa8dbfbc1f1c27e4 in branch refs/heads/master from Wei Zhou [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=1e4ff7f ] CLOUDSTACK-2729: use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool Signed-off-by: Edison Su sudi...@gmail.com - ASF Subversion and Git Services On Aug. 5, 2013, 6:07 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 5, 2013, 6:07 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java b8a9f0f Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java dae25ae Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24511 --- Review 13223 failed the build test : FAILURE The url of build cloudstack-master-with-patch #104 is : http://jenkins.cloudstack.org/job/cloudstack-master-with-patch/104/ - Jenkins Cloudstack.org On Aug. 2, 2013, 6:39 a.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 2, 2013, 6:39 a.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java dae25ae Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24520 --- I haven't tested the patch, but I'm missing some comments. Can we add clear comments as to WHY this is in the code? Otherwise I'm afraid this will become legacy and in 6 months new committer won't have the slightest idea of why this is in there. - Wido den Hollander On Aug. 2, 2013, 6:39 a.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 2, 2013, 6:39 a.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java dae25ae Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
On Aug. 2, 2013, 11:09 a.m., Wido den Hollander wrote: I haven't tested the patch, but I'm missing some comments. Can we add clear comments as to WHY this is in the code? Otherwise I'm afraid this will become legacy and in 6 months new committer won't have the slightest idea of why this is in there. Wido, Make sense. I will add some comments later. - Wei --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24520 --- On Aug. 2, 2013, 6:39 a.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 2, 2013, 6:39 a.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java dae25ae Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 2, 2013, 1:03 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Changes --- add some comments Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs (updated) - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java a9baa52 Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou
Re: Review Request 13223: (CLOUDSTACK-2729) use file lock to prevent concurrent refreshPool/deleteVolume on KVM shared storage pool
--- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/#review24589 --- plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java https://reviews.apache.org/r/13223/#comment48610 How about use the atomic semantics provided by createNewFile to coordinate between processes? For example: lock(int wait) { File lockFile = new File(lock-file-path); while(wait) { boolean havelock = false; if (lockFile.createNewFile()) { haveLock = true; break; } Time.sleep(1000); wait--; } return haveLock; } unlock() { File lockFile = new File(path-of-lock-file); lockFile.delete(); } It's simpler version of lockfile: https://github.com/spearce/jgit/blob/master/org.eclipse.jgit/src/org/eclipse/jgit/storage/file/LockFile.java - edison su On Aug. 2, 2013, 1:03 p.m., Wei Zhou wrote: --- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/13223/ --- (Updated Aug. 2, 2013, 1:03 p.m.) Review request for cloudstack, edison su and Wido den Hollander. Bugs: CLOUDSTACK-2729 Repository: cloudstack-git Description --- The storage pool issue (CLOUDSTACK-2729) is because of a bug in libvirt (https://bugzilla.redhat.com/show_bug.cgi?id=977706) We need to prevent deleting a volume when refreshing the pool. This patch use a simple file lock to implement it. PS: I have tested another file lock similar to Read/Write file lock, but it was very unstable. Diffs - plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/storage/LibvirtStorageAdaptor.java a9baa52 Diff: https://reviews.apache.org/r/13223/diff/ Testing --- Applied on 4.0.2 and 4.0.1 Testing On 4.0.1 From 20,June 3 nodes, create a VM on each node every 15 minutes. Destroy the VMs 5 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Testing On 4.0.2 From 01,July 2 nodes, create two VMs on each node every 5 minutes. Destroy the VMs 4 minutes later. expunge.inteval = 600 (10 minutes), expunge.worker = 2 Thanks, Wei Zhou