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 /////////////////////
|
//////////////// API parameters /////////////////////
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID,
|
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = true,
|
||||||
entityType = KubernetesClusterResponse.class,
|
entityType = KubernetesClusterResponse.class,
|
||||||
description = "the ID of the Kubernetes cluster")
|
description = "the ID of the Kubernetes cluster")
|
||||||
private Long id;
|
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.HostJoinDao;
|
||||||
import com.cloud.api.query.dao.StoragePoolJoinDao;
|
import com.cloud.api.query.dao.StoragePoolJoinDao;
|
||||||
import com.cloud.api.query.vo.DomainJoinVO;
|
import com.cloud.api.query.vo.DomainJoinVO;
|
||||||
import com.cloud.api.query.vo.HostJoinVO;
|
|
||||||
import com.cloud.api.query.vo.StoragePoolJoinVO;
|
import com.cloud.api.query.vo.StoragePoolJoinVO;
|
||||||
import com.cloud.capacity.Capacity;
|
import com.cloud.capacity.Capacity;
|
||||||
import com.cloud.capacity.CapacityManager;
|
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.DataCenterDao;
|
||||||
import com.cloud.dc.dao.DataCenterIpAddressDao;
|
import com.cloud.dc.dao.DataCenterIpAddressDao;
|
||||||
import com.cloud.host.Host;
|
import com.cloud.host.Host;
|
||||||
|
import com.cloud.host.HostVO;
|
||||||
import com.cloud.host.Status;
|
import com.cloud.host.Status;
|
||||||
|
import com.cloud.host.dao.HostDao;
|
||||||
import com.cloud.network.dao.IPAddressDao;
|
import com.cloud.network.dao.IPAddressDao;
|
||||||
import com.cloud.storage.ImageStore;
|
import com.cloud.storage.ImageStore;
|
||||||
import com.cloud.storage.StorageStats;
|
import com.cloud.storage.StorageStats;
|
||||||
@ -78,6 +79,8 @@ public class PrometheusExporterImpl extends ManagerBase implements PrometheusExp
|
|||||||
@Inject
|
@Inject
|
||||||
private DataCenterDao dcDao;
|
private DataCenterDao dcDao;
|
||||||
@Inject
|
@Inject
|
||||||
|
private HostDao hostDao;
|
||||||
|
@Inject
|
||||||
private HostJoinDao hostJoinDao;
|
private HostJoinDao hostJoinDao;
|
||||||
@Inject
|
@Inject
|
||||||
private VMInstanceDao vmDao;
|
private VMInstanceDao vmDao;
|
||||||
@ -112,8 +115,8 @@ public class PrometheusExporterImpl extends ManagerBase implements PrometheusExp
|
|||||||
int total = 0;
|
int total = 0;
|
||||||
int up = 0;
|
int up = 0;
|
||||||
int down = 0;
|
int down = 0;
|
||||||
for (final HostJoinVO host : hostJoinDao.listAll()) {
|
for (final HostVO host : hostDao.listAll()) {
|
||||||
if (host == null || host.getType() != Host.Type.Routing || host.getZoneId() != dcId) {
|
if (host == null || host.getType() != Host.Type.Routing || host.getDataCenterId() != dcId) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
total++;
|
total++;
|
||||||
|
|||||||
@ -131,6 +131,9 @@ fi
|
|||||||
|
|
||||||
LOCKFILE=/var/run/cloud/vxlan.lock
|
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
|
flock -x -w 10 200 || exit 1
|
||||||
if [[ "$OP" == "add" ]]; then
|
if [[ "$OP" == "add" ]]; then
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user