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:
abhishek 2010-09-09 18:03:48 -07:00
parent 76e5cf3321
commit 20973d48af
3 changed files with 7 additions and 1 deletions

View File

@ -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);
}

View File

@ -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);
}
}

View File

@ -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;