You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 7e9836d
Browse filesBrowse the repository at this point in the historyBrowse files
Alex Huang
committed
Some operations on the lock table allowed through jmx
s_logger.debug("DeploymentPlan has host_id specified, making no checks on this host, looks like admin test: "+hostIdSpecified);
132
134
}
133
135
HostVOhost = _hostDao.findById(hostIdSpecified);
134
-
if(host == null){
135
-
s_logger.debug("The specified host cannot be found");
136
-
}else{
137
-
s_logger.debug("Looking for suitable pools for this host under zone: "+host.getDataCenterId() +", pod: "+ host.getPodId()+", cluster: "+ host.getClusterId());
138
-
}
136
+
if (s_logger.isDebugEnabled()) {
137
+
if(host == null){
138
+
s_logger.debug("The specified host cannot be found");
139
+
}else{
140
+
s_logger.debug("Looking for suitable pools for this host under zone: "+host.getDataCenterId() +", pod: "+ host.getPodId()+", cluster: "+ host.getClusterId());
141
+
}
142
+
}
139
143
140
144
//search for storage under the zone, pod, cluster of the host.
//look at the aggregate available cpu and ram per cluster
471
475
//although an aggregate value may be false indicator that a cluster can host a vm, it will at the least eliminate those clusters which definitely cannot
472
476
473
-
//we need clusters having enough cpu AND RAM
477
+
//we need clusters having enough cpu AND RAM
474
478
if (s_logger.isDebugEnabled()) {
475
479
s_logger.debug("Listing clusters that have enough aggregate CPU and RAM capacity under this "+(isZone ? "Zone: " : "Pod: " )+id);
privatestaticfinalStringINQUIRE_SQL = SELECT_SQL + " WHERE op_lock.key=?";
52
52
privatestaticfinalStringDECREMENT_SQL = "UPDATE op_lock SET waiters=waiters-1 where op_lock.key=? AND op_lock.mac=? AND op_lock.ip=? AND op_lock.thread=?";
53
-
privatestaticfinalStringRELEASE_SQL = "DELETE FROM op_lock WHERE op_lock.key = ? AND op_lock.mac=? AND waiters=0";
53
+
privatestaticfinalStringRELEASE_LOCK_SQL = "DELETE FROM op_lock WHERE op_lock.key = ?";
54
+
privatestaticfinalStringRELEASE_SQL = RELEASE_LOCK_SQL + " AND op_lock.mac=? AND waiters=0";
54
55
privatestaticfinalStringCLEANUP_MGMT_LOCKS_SQL = "DELETE FROM op_lock WHERE op_lock.mac = ?";
55
56
privatestaticfinalStringSELECT_MGMT_LOCKS_SQL = SELECT_SQL + " WHERE mac=?";
56
57
privatestaticfinalStringSELECT_THREAD_LOCKS_SQL = SELECT_SQL + " WHERE mac=? AND ip=?";
57
-
privatestaticfinalStringSELECT_OWNER_SQL = "SELECT mac, ip, thread FROM op_lock WHERE op_lock.key=?";
58
-
privatestaticfinalStringDEADLOCK_DETECT_SQL = "SELECT l2.key FROM op_lock l2 WHERE l2.mac=? AND l2.ip=? AND l2.thread=? AND l2.key in " +
59
-
"(SELECT l1.key from op_lock l1 WHERE l1.mac=? AND l1.ip=? AND l1.thread=?)";
60
58
privatestaticfinalStringCLEANUP_THREAD_LOCKS_SQL = "DELETE FROM op_lock WHERE mac=? AND ip=? AND thread=?";
0 commit comments