mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Add logs in case ipassoccmd failed
This commit is contained in:
parent
86736d6d4a
commit
2d42b2d1ab
@ -2048,6 +2048,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);
|
||||
@ -2089,17 +2092,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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -752,4 +752,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…
x
Reference in New Issue
Block a user