Переглянути джерело

better handling of failed node launches

tags/v0.2.0
Jonathan Cobb 4 роки тому
джерело
коміт
cfa170e161
10 змінених файлів з 16 додано та 6 видалено
  1. +1
    -1
      automation/roles/bubble/tasks/main.yml
  2. +1
    -1
      bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java
  3. +1
    -1
      bubble-server/src/main/java/bubble/main/rekey/RekeyWriterMain.java
  4. +1
    -1
      bubble-server/src/main/java/bubble/model/cloud/BubbleNetwork.java
  5. +6
    -0
      bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java
  6. +2
    -0
      bubble-server/src/main/java/bubble/service/dbfilter/FilteredEntityIterator.java
  7. +1
    -1
      bubble-server/src/main/java/bubble/service/notify/NotificationService.java
  8. +1
    -0
      bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties
  9. +1
    -0
      bubble-server/src/test/java/bubble/mock/MockNetworkService.java
  10. +1
    -1
      bubble-web

+ 1
- 1
automation/roles/bubble/tasks/main.yml Переглянути файл

@@ -47,7 +47,7 @@
mode: 0444

- name: Unpack site files
shell: su - bubble -c "cd /home/bubble && unzip /home/bubble/bubble_{{ bubble_version }}/bubble.jar 'site/*'"
shell: cd /home/bubble && unzip /home/bubble/bubble_{{ bubble_version }}/bubble.jar 'site/*' && chown -R bubble site

- name: Install bubble self_node.json, sage_node.json and sage_key.json
copy:


+ 1
- 1
bubble-server/src/main/java/bubble/cloud/dns/godaddy/GoDaddyDnsDriver.java Переглянути файл

@@ -124,7 +124,7 @@ public class GoDaddyDnsDriver extends DnsDriverBase<GoDaddyDnsConfig> {
final Collection<GoDaddyDnsRecord> retained = Arrays.stream(gdRecords)
.filter(r -> nonMatcher.matches(r.toDnsRecord(domain.get())))
.collect(Collectors.toList());
if (empty(retained)) {
if (gdRecords.length == retained.size()) {
log.warn("remove("+record+"): no matching record(s) found");
return null;
}


+ 1
- 1
bubble-server/src/main/java/bubble/main/rekey/RekeyWriterMain.java Переглянути файл

@@ -53,7 +53,7 @@ public class RekeyWriterMain extends BaseMain<RekeyOptions> {
return;
} catch (SocketException e) {
err("WRITER SocketException: "+e);
return;
throw e;
} catch (Exception e) {
err("WRITER error (sleeping then retrying): "+e);
sleep(RETRY_DELAY);


+ 1
- 1
bubble-server/src/main/java/bubble/model/cloud/BubbleNetwork.java Переглянути файл

@@ -103,7 +103,7 @@ public class BubbleNetwork extends IdentifiableBase implements HasNetwork, HasBu
@Getter @Setter private Integer sslPort;

@Transient @JsonIgnore public String getPublicUri() {
return "https://" + getNetworkDomain() + (getSslPort() == 443 ? "" : ":"+getSslPort()) + "/";
return "https://" + getNetworkDomain() + (getSslPort() == 443 ? "" : ":"+getSslPort());
}

public String getPublicUri(BubbleConfiguration configuration) {


+ 6
- 0
bubble-server/src/main/java/bubble/service/cloud/StandardNetworkService.java Переглянути файл

@@ -366,6 +366,12 @@ public class StandardNetworkService implements NetworkService {
nodeDAO.update(node);
progressMeter.error(METER_UNKNOWN_ERROR);
killNode(node, "error: "+e);
} else {
final BubbleNetwork network = networkDAO.findByUuid(node.getNetwork());
if (noNodesActive(network)) {
// if no nodes are running, then the network is stopped
networkDAO.update(network.setState(BubbleNetworkState.stopped));
}
}
return die("newNode: "+e, e);



+ 2
- 0
bubble-server/src/main/java/bubble/service/dbfilter/FilteredEntityIterator.java Переглянути файл

@@ -6,6 +6,7 @@ import bubble.dao.cloud.BubbleNodeDAO;
import bubble.dao.cloud.BubbleNodeKeyDAO;
import bubble.model.account.Account;
import bubble.model.account.HasAccount;
import bubble.model.account.message.AccountMessage;
import bubble.model.cloud.BubbleNetwork;
import bubble.model.cloud.BubbleNode;
import bubble.model.cloud.BubbleNodeKey;
@@ -30,6 +31,7 @@ public class FilteredEntityIterator extends EntityIterator {
POST_COPY_ENTITIES.add(BubbleNode.class);
POST_COPY_ENTITIES.add(BubbleNodeKey.class);
POST_COPY_ENTITIES.add(Device.class);
POST_COPY_ENTITIES.add(AccountMessage.class);
}
public static boolean isPostCopyEntity(Class<? extends Identifiable> clazz) {
return POST_COPY_ENTITIES.stream().anyMatch(c -> c.isAssignableFrom(clazz));


+ 1
- 1
bubble-server/src/main/java/bubble/service/notify/NotificationService.java Переглянути файл

@@ -139,7 +139,7 @@ public class NotificationService {
return null;
}

private final Map<String, SynchronousNotification> syncRequests = new ExpirationMap<>(SECONDS.toMillis(20));
private final Map<String, SynchronousNotification> syncRequests = new ExpirationMap<>(SYNC_TIMEOUT + SECONDS.toMillis(5));
private final Map<String, SynchronousNotification> syncRequestCache = new ExpirationMap<>(SECONDS.toMillis(15));

public <T> T notifySync(BubbleNode delegate, NotificationType type, SynchronousNotification notification) {


+ 1
- 0
bubble-server/src/main/resources/message_templates/en_US/server/post_auth/ResourceMessages.properties Переглянути файл

@@ -336,6 +336,7 @@ msg_node_state_awaiting_dns=waiting for DNS to be visible
msg_node_state_installing=installing
msg_node_state_running=running
msg_node_state_stopping=stopping
msg_node_state_stopped=stopped
msg_node_state_unreachable=unreachable
msg_node_state_error_stopping=error stopping
msg_node_state_error_stopped=stopped with error


+ 1
- 0
bubble-server/src/test/java/bubble/mock/MockNetworkService.java Переглянути файл

@@ -41,6 +41,7 @@ public class MockNetworkService extends StandardNetworkService {
.setState(BubbleNodeState.running)
.setSageNode(nn.fork() ? null : configuration.getThisNode().getUuid())
.setNetwork(network.getUuid())
.setSslPort(network.getSslPort())
.setDomain(network.getDomain())
.setAccount(network.getAccount())
.setSizeType(network.getComputeSizeType())


+ 1
- 1
bubble-web

@@ -1 +1 @@
Subproject commit 85ab827c5acaa73818496e10b250d87333f24df4
Subproject commit e533e7d44bb788f8fa077608a5bfd470032797b8

Завантаження…
Відмінити
Зберегти