mirror of https://github.com/apache/cloudstack.git
Add logs in case ipassoccmd failed
This commit is contained in:
parent
3381d4eaed
commit
e03088a3f1
|
|
@ -2025,6 +2025,9 @@ ServerResource {
|
|||
.getAccessDetail(NetworkElementCommand.ROUTER_NAME);
|
||||
String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP);
|
||||
String[] results = new String[cmd.getIpAddresses().length];
|
||||
for (int i = 0; i < results.length; i++) {
|
||||
results[i] = IpAssocAnswer.errorResult;
|
||||
}
|
||||
Connect conn;
|
||||
try {
|
||||
conn = LibvirtConnection.getConnectionByVmName(routerName);
|
||||
|
|
@ -2066,17 +2069,16 @@ ServerResource {
|
|||
ip.isSourceNat(), ip.getBroadcastUri(), ip.getVlanGateway(),
|
||||
ip.getVlanNetmask(), ip.getVifMacAddress(), nicNum, newNic);
|
||||
|
||||
if (result != null) {
|
||||
results[i++] = IpAssocAnswer.errorResult;
|
||||
} else {
|
||||
if (result == null) {
|
||||
results[i++] = ip.getPublicIp() + " - success";
|
||||
;
|
||||
}
|
||||
}
|
||||
return new IpAssocAnswer(cmd, results);
|
||||
} catch (LibvirtException e) {
|
||||
s_logger.error("ipassoccmd failed", e);
|
||||
return new IpAssocAnswer(cmd, results);
|
||||
} catch (InternalErrorException e) {
|
||||
s_logger.error("ipassoccmd failed", e);
|
||||
return new IpAssocAnswer(cmd, results);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -743,4 +743,5 @@ CREATE VIEW `cloud`.`domain_router_view` AS
|
|||
and async_job.instance_type = 'DomainRouter'
|
||||
and async_job.job_status = 0;
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Advanced", 'DEFAULT', 'management-server', "vmware.vcenter.session.timeout", "1200", "VMware client timeout in seconds", "1200", NULL,NULL,0);
|
||||
INSERT IGNORE INTO `cloud`.`configuration` VALUES ("Advanced", 'DEFAULT', 'management-server', "mgt.server.vendor", "ACS", "the vendor of management server", "ACS", NULL,NULL,0);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue