Skip to content

Commit 80f6a5b

Browse files
committed
Fixes
1 parent 975804e commit 80f6a5b

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/resource/NsxResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ private Answer executeRequest(CreateNsxDhcpRelayConfigCommand cmd) {
214214
long zoneId = cmd.getZoneId();
215215
long domainId = cmd.getDomainId();
216216
long accountId = cmd.getAccountId();
217-
long vpcId = cmd.getVpcId();
217+
Long vpcId = cmd.getVpcId();
218218
long networkId = cmd.getNetworkId();
219219
String vpcName = cmd.getVpcName();
220220
String networkName = cmd.getNetworkName();

plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/service/NsxGuestNetworkGuru.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,8 @@ public NicProfile allocate(Network network, NicProfile nic, VirtualMachineProfil
207207
}
208208
VpcVO vpc = _vpcDao.findById(network.getVpcId());
209209
if (Objects.isNull(vpc)) {
210-
String msg = String.format("Unable to find VPC with id: %s", network.getVpcId());
211-
LOGGER.error(msg);
212-
throw new CloudRuntimeException(msg);
210+
String msg = String.format("Unable to find VPC with id: %s, allocating for network %s", network.getVpcId(), network.getName());
211+
LOGGER.debug(msg);
213212
}
214213

215214
DomainVO domain = domainDao.findById(account.getDomainId());

plugins/network-elements/nsx/src/main/java/org/apache/cloudstack/utils/NsxHelper.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,10 @@
3131
public class NsxHelper {
3232

3333
public static CreateNsxDhcpRelayConfigCommand createNsxDhcpRelayConfigCommand(DomainVO domain, Account account, DataCenter zone, VpcVO vpc, Network network, List<String> addresses) {
34+
Long vpcId = vpc != null ? vpc.getId() : null;
35+
String vpcName = vpc != null ? vpc.getName() : null;
3436
return new CreateNsxDhcpRelayConfigCommand(domain.getId(), account.getId(), zone.getId(),
35-
vpc.getId(), vpc.getName(), network.getId(), network.getName(), addresses);
37+
vpcId, vpcName, network.getId(), network.getName(), addresses);
3638
}
3739

3840
public static CreateNsxSegmentCommand createNsxSegmentCommand(DomainVO domain, Account account, DataCenter zone, String vpcName, NetworkVO networkVO) {

0 commit comments

Comments
 (0)