mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02:29 +01:00
bug 5147: implementing the recommendations i got for the ps maintenance. For now, we are not implementing the cancel maintenance part. Instead, we are going to ask the admin if he is "sure" of enabling maintenance on a sp, before proceeding
This commit is contained in:
parent
76e5cf3321
commit
20973d48af
@ -2199,4 +2199,5 @@ public interface ManagementServer {
|
||||
GuestOSVO getGuestOs(Long guestOsId);
|
||||
VolumeVO findVolumeByInstanceAndDeviceId(long instanceId, long deviceId);
|
||||
VolumeVO getRootVolume(Long instanceId);
|
||||
long getPsMaintenanceCount(long podId);
|
||||
}
|
||||
|
||||
@ -8719,5 +8719,10 @@ public class ManagementServerImpl implements ManagementServer {
|
||||
{
|
||||
return _volumeDao.findByInstanceAndType(instanceId, Volume.VolumeType.ROOT).get(0);
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getPsMaintenanceCount(long podId){
|
||||
return _poolDao.countBy(podId, Status.Maintenance);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -2007,7 +2007,7 @@ public class StorageManagerImpl implements StorageManager {
|
||||
//check to see if other ps exist
|
||||
//if they do, then we can migrate over the system vms to them
|
||||
//if they dont, then just stop all vms on this one
|
||||
count = _storagePoolDao.countBy(primaryStorage.getId(), Status.Up);
|
||||
count = _storagePoolDao.countBy(primaryStorage.getPodId(), Status.Up);
|
||||
|
||||
if(count == 1)
|
||||
restart = false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user