mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fixed template download
This commit is contained in:
parent
ae1753c997
commit
ef42b21c1d
@ -23,7 +23,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.math.BigInteger;
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.net.URI;
|
||||
@ -108,7 +107,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
||||
private String _localgw;
|
||||
private String _eth1mask;
|
||||
private String _eth1ip;
|
||||
final private String _parent = "/mnt/SecStorage/";
|
||||
final private String _parent = "/mnt/SecStorage";
|
||||
@Override
|
||||
public void disconnected() {
|
||||
}
|
||||
@ -640,7 +639,7 @@ public class NfsSecondaryStorageResource extends ServerResourceBase implements S
|
||||
protected String mount(String root, String nfsPath) {
|
||||
File file = new File(root);
|
||||
if (!file.exists()) {
|
||||
if (!_storage.mkdir(root)) {
|
||||
if (_storage.mkdir(root)) {
|
||||
s_logger.debug("create mount point: " + root);
|
||||
} else {
|
||||
s_logger.debug("Unable to create mount point: " + root);
|
||||
|
||||
@ -238,10 +238,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
s_logger.warn("secondary storage VM " + cssHost.getName() + " doesn't exist");
|
||||
return false;
|
||||
}
|
||||
if (secStorageVm.getState() != State.Running) {
|
||||
s_logger.warn("secondary storage VM " + cssHost.getName() + " is not running");
|
||||
return false;
|
||||
}
|
||||
|
||||
List<HostVO> ssHosts = _hostDao.listSecondaryStorageHosts(zoneId);
|
||||
for( HostVO ssHost : ssHosts ) {
|
||||
String secUrl = ssHost.getStorageUrl();
|
||||
@ -292,11 +289,7 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
s_logger.warn("secondary storage VM " + ssAHost.getName() + " doesn't exist");
|
||||
return false;
|
||||
}
|
||||
if (secStorageVm.getState() != State.Running) {
|
||||
s_logger.warn("secondary storage VM " + ssAHost.getName() + " is not running");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
SecStorageVMSetupCommand setupCmd = new SecStorageVMSetupCommand();
|
||||
if (_allowedInternalSites != null) {
|
||||
List<String> allowedCidrs = new ArrayList<String>();
|
||||
@ -351,10 +344,6 @@ public class SecondaryStorageManagerImpl implements SecondaryStorageVmManager, V
|
||||
s_logger.warn("secondary storage VM " + ssAHost.getName() + " doesn't exist");
|
||||
return false;
|
||||
}
|
||||
if (thisSecStorageVm.getState() != State.Running) {
|
||||
s_logger.warn("secondary storage VM " + ssAHost.getName() + " is not running");
|
||||
return false;
|
||||
}
|
||||
|
||||
List<SecondaryStorageVmVO> alreadyRunning = _secStorageVmDao.getSecStorageVmListInStates(SecondaryStorageVm.Role.templateProcessor, State.Running, State.Migrating, State.Starting);
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user