diff --git a/bubble-server/src/main/java/bubble/cloud/dns/DnsServiceDriver.java b/bubble-server/src/main/java/bubble/cloud/dns/DnsServiceDriver.java index f329c0ae..cabc0ca2 100644 --- a/bubble-server/src/main/java/bubble/cloud/dns/DnsServiceDriver.java +++ b/bubble-server/src/main/java/bubble/cloud/dns/DnsServiceDriver.java @@ -208,5 +208,5 @@ public interface DnsServiceDriver extends CloudServiceDriver { return true; } - default boolean requireSubnetNS() { return true; } + default boolean requireSubnetNS() { return false; } } diff --git a/bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java b/bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java index 7c661b8b..70cfbd0a 100644 --- a/bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java +++ b/bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java @@ -31,8 +31,6 @@ public class GoDaddyDnsDriver extends DnsDriverBase { public static final int MAX_GODADDY_RETRIES = 5; - @Override public boolean requireSubnetNS() { return false; } - @Override public Collection create(BubbleDomain domain) { // lookup SOA and NS records for domain, they must already exist final Collection soaRecords = readRecords(domain, urlForType(domain, SOA), domain.matchSOA()); diff --git a/bubble-server/src/main/java/bubble/service/boot/ActivationService.java b/bubble-server/src/main/java/bubble/service/boot/ActivationService.java index 6017f156..d89e21d8 100644 --- a/bubble-server/src/main/java/bubble/service/boot/ActivationService.java +++ b/bubble-server/src/main/java/bubble/service/boot/ActivationService.java @@ -109,10 +109,11 @@ public class ActivationService { } } } + final boolean testMode = configuration.testMode(); if (publicDns == null) errors.addViolation("err.publicDns.noneSpecified"); - if (networkStorage == null) errors.addViolation("err.storage.noneSpecified"); - if (compute == null && !configuration.testMode()) errors.addViolation("err.compute.noneSpecified"); - if (email == null && !configuration.testMode()) errors.addViolation("err.email.noneSpecified"); + if (networkStorage == null && !testMode) errors.addViolation("err.storage.noneSpecified"); + if (compute == null && !testMode) errors.addViolation("err.compute.noneSpecified"); + if (email == null && !testMode) errors.addViolation("err.email.noneSpecified"); if (errors.isInvalid()) throw invalidEx(errors); // create local storage if it was not provided @@ -168,7 +169,7 @@ public class ActivationService { .setName(request.getNetworkName()) .setTag(TAG_ALLOW_REGISTRATION, true) .setTag(TAG_PARENT_ACCOUNT, account.getUuid()) - .setStorage(networkStorage.getUuid()) + .setStorage(networkStorage != null ? networkStorage.getUuid() : localStorage.getUuid()) .setState(BubbleNetworkState.running)); // copy data outside the network to inside the network diff --git a/bubble-server/src/main/java/bubble/service/cloud/GeoService.java b/bubble-server/src/main/java/bubble/service/cloud/GeoService.java index 2b4b65fc..8f05574d 100644 --- a/bubble-server/src/main/java/bubble/service/cloud/GeoService.java +++ b/bubble-server/src/main/java/bubble/service/cloud/GeoService.java @@ -156,9 +156,9 @@ public class GeoService { throw new SimpleViolationException("err.geoTimeService.notFound"); } - final GeoLocation location = locate(account.getUuid(), ip); + final GeoLocation location = locate(acct.get().getUuid(), ip); if (!location.hasLatLon()) { - final List geocodes = cloudDAO.findByAccountAndType(account.getUuid(), CloudServiceType.geoCode); + final List geocodes = cloudDAO.findByAccountAndType(acct.get().getUuid(), CloudServiceType.geoCode); if (geocodes.isEmpty()) throw new SimpleViolationException("err.geoCodeService.notFound"); final GeoCodeResult code = geocodes.get(0).getGeoCodeDriver(configuration).lookup(location); location.setLat(code.getLat());