mirror of https://github.com/apache/cloudstack.git
bug 9503: race condition in taking ownership of a Host when a Management server is restarted
status 9503: resolved fixed
This commit is contained in:
parent
a99f925de1
commit
48eebe8e7a
|
|
@ -91,7 +91,7 @@ public class ClusteredAgentManagerImpl extends AgentManagerImpl implements Clust
|
|||
}
|
||||
|
||||
private void runDirectAgentScanTimerTask() {
|
||||
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
|
||||
GlobalLock scanLock = GlobalLock.getInternLock("clustermgr.scan");
|
||||
try {
|
||||
if(scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1804,7 +1804,7 @@ public class StorageManagerImpl implements StorageManager, StorageService, Manag
|
|||
|
||||
@Override
|
||||
public void cleanupStorage(boolean recurring) {
|
||||
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
|
||||
GlobalLock scanLock = GlobalLock.getInternLock("storagemgr.cleanup");
|
||||
|
||||
try {
|
||||
if (scanLock.lock(3)) {
|
||||
|
|
|
|||
|
|
@ -108,7 +108,7 @@ public class SnapshotSchedulerImpl implements SnapshotScheduler {
|
|||
// We don't maintain the time. The timer task does.
|
||||
_currentTimestamp = currentTimestamp;
|
||||
|
||||
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
|
||||
GlobalLock scanLock = GlobalLock.getInternLock("snapshot.poll");
|
||||
try {
|
||||
if(scanLock.lock(ACQUIRE_GLOBAL_LOCK_TIMEOUT_FOR_COOPERATION)) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -405,7 +405,7 @@ public class UploadMonitorImpl implements UploadMonitor {
|
|||
try {
|
||||
s_logger.info("Extract Monitor Garbage Collection Thread is running.");
|
||||
|
||||
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
|
||||
GlobalLock scanLock = GlobalLock.getInternLock("uploadmonitor.storageGC");
|
||||
try {
|
||||
if (scanLock.lock(3)) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -1124,7 +1124,7 @@ public class VirtualMachineManagerImpl implements VirtualMachineManager, Listene
|
|||
|
||||
|
||||
protected void cancelWorkItems(long nodeId) {
|
||||
GlobalLock scanLock = GlobalLock.getInternLock(this.getClass().getName());
|
||||
GlobalLock scanLock = GlobalLock.getInternLock("vmmgr.cancel.workitem");
|
||||
|
||||
try {
|
||||
if (scanLock.lock(3)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue