mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Merge remote-tracking branch 'origin/4.14'
This commit is contained in:
commit
d6db47618d
@ -57,7 +57,7 @@ public class ScaleKubernetesClusterCmd extends BaseAsyncCmd {
|
||||
/////////////////////////////////////////////////////
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID,
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = true,
|
||||
entityType = KubernetesClusterResponse.class,
|
||||
description = "the ID of the Kubernetes cluster")
|
||||
private Long id;
|
||||
|
||||
@ -37,7 +37,6 @@ import com.cloud.api.query.dao.DomainJoinDao;
|
||||
import com.cloud.api.query.dao.HostJoinDao;
|
||||
import com.cloud.api.query.dao.StoragePoolJoinDao;
|
||||
import com.cloud.api.query.vo.DomainJoinVO;
|
||||
import com.cloud.api.query.vo.HostJoinVO;
|
||||
import com.cloud.api.query.vo.StoragePoolJoinVO;
|
||||
import com.cloud.capacity.Capacity;
|
||||
import com.cloud.capacity.CapacityManager;
|
||||
@ -50,7 +49,9 @@ import com.cloud.dc.Vlan;
|
||||
import com.cloud.dc.dao.DataCenterDao;
|
||||
import com.cloud.dc.dao.DataCenterIpAddressDao;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.HostVO;
|
||||
import com.cloud.host.Status;
|
||||
import com.cloud.host.dao.HostDao;
|
||||
import com.cloud.network.dao.IPAddressDao;
|
||||
import com.cloud.storage.ImageStore;
|
||||
import com.cloud.storage.StorageStats;
|
||||
@ -78,6 +79,8 @@ public class PrometheusExporterImpl extends ManagerBase implements PrometheusExp
|
||||
@Inject
|
||||
private DataCenterDao dcDao;
|
||||
@Inject
|
||||
private HostDao hostDao;
|
||||
@Inject
|
||||
private HostJoinDao hostJoinDao;
|
||||
@Inject
|
||||
private VMInstanceDao vmDao;
|
||||
@ -112,8 +115,8 @@ public class PrometheusExporterImpl extends ManagerBase implements PrometheusExp
|
||||
int total = 0;
|
||||
int up = 0;
|
||||
int down = 0;
|
||||
for (final HostJoinVO host : hostJoinDao.listAll()) {
|
||||
if (host == null || host.getType() != Host.Type.Routing || host.getZoneId() != dcId) {
|
||||
for (final HostVO host : hostDao.listAll()) {
|
||||
if (host == null || host.getType() != Host.Type.Routing || host.getDataCenterId() != dcId) {
|
||||
continue;
|
||||
}
|
||||
total++;
|
||||
|
||||
@ -131,6 +131,9 @@ fi
|
||||
|
||||
LOCKFILE=/var/run/cloud/vxlan.lock
|
||||
|
||||
# ensures that parent directories exists and prepares the lock file
|
||||
mkdir -p "${LOCKFILE%/*}"
|
||||
|
||||
(
|
||||
flock -x -w 10 200 || exit 1
|
||||
if [[ "$OP" == "add" ]]; then
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user