querysub 0.293.0 → 0.294.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "querysub",
3
- "version": "0.293.0",
3
+ "version": "0.294.0",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
6
  "note1": "note on node-forge fork, see https://github.com/digitalbazaar/forge/issues/744 for details",
@@ -26,6 +26,7 @@ export class MachineDetailPage extends qreact.Component {
26
26
  let relevantServiceConfigs = new Map<string, ServiceConfig>();
27
27
  for (let serviceId of serviceList) {
28
28
  let serviceConfig = controller.getServiceConfig(serviceId);
29
+ if (!serviceConfig?.parameters.deploy) continue;
29
30
  if (serviceConfig && serviceConfig.machineIds.includes(selectedMachineId)) {
30
31
  relevantServiceConfigs.set(serviceId, serviceConfig);
31
32
  }
@@ -361,7 +361,7 @@ const runScreenCommand = measureWrap(async function runScreenCommand(config: {
361
361
  console.log(green(`Renaming screen ${screenName} to ${rollingScreenName} for rolling interval ${config.rollingWindow} at ${new Date().toLocaleString()}`));
362
362
  await runPromise(`${prefix}tmux rename-session -t ${screenName} ${rollingScreenName}`);
363
363
  rollingScreens.set(rollingScreenName, screenName);
364
- rollingKeepScreenAlive.set(rollingScreenName, {
364
+ rollingKeepScreenAlive.set(screenName, {
365
365
  rollingScreenName,
366
366
  originalScreenName: screenName,
367
367
  pinnedDuration: config.rollingWindow,
@@ -448,7 +448,16 @@ done`);
448
448
  const killScreen = measureWrap(async function killScreen(config: {
449
449
  screenName: string;
450
450
  }) {
451
+ console.log(red(`Killing screen ${config.screenName}`));
451
452
  let prefix = getTmuxPrefix();
453
+ // Try ctrl+c a few times first
454
+ for (let i = 0; i < 5; i++) {
455
+ if (!await isScreenRunningProcess(config.screenName)) {
456
+ break;
457
+ }
458
+ await runPromise(`${prefix}tmux send-keys -t ${config.screenName} 'C-c' Enter`);
459
+ await delay(5000);
460
+ }
452
461
  await runPromise(`${prefix}tmux kill-session -t ${config.screenName}`);
453
462
  await removeOldNodeId(config.screenName);
454
463
  });
@@ -629,7 +638,10 @@ const resyncServicesBase = runInSerial(measureWrap(async function resyncServices
629
638
  rollingKeepScreenAlive.delete(rollingScreenRemainder);
630
639
  rollingInfo = undefined;
631
640
  }
632
- if (rollingInfo) continue;
641
+ if (rollingInfo) {
642
+ console.log(green(`Skipping killing rolling screen ${screenName} because it's still alive at ${new Date().toLocaleString()}. Keeping it alive until ${new Date(rollingInfo.pinnedTime + rollingInfo.pinnedDuration).toLocaleString()}`));
643
+ continue;
644
+ }
633
645
  }
634
646
  await killScreen({
635
647
  screenName,
@@ -1,26 +1,8 @@
1
1
  Hmm... our cyoa servers are dying very fast... why?
2
2
 
3
- 9) Rolling service updates
4
- - Add rollingWindow to the definition
5
- - Set for public facing services (but not for scripts)
6
- - PathValueServer - 10 minutes
7
- - FunctionRunner - CANNOT use rolling
8
- - HTTP - 4 hours
9
- - Boostrapper - NO rolling
10
- - gc/join - NO rolling
11
- - Show the rolling time in the update buttons (both list and the save button on the details page), so we know it will be a rolling update
12
- - Keep the oldest service alive when we update
13
- - Tracked per serviceId
14
- - Update the rolling time, so if we remove the rolling window we kill the old service immediately
15
- - Notify when servers are outdated
16
- - After min(5 minute, 10% of rolling window size)
17
- - Use the node registration to know the nodeId to talk to, and allow servers to register to get told when they are outdated (and how long before they are shutdown).
18
- - In HTTP server, notify users, in the same way we notify for hash updates, that they will need to switch servers
19
- - Verify this update works with a relatively low rolling update window, ensuring it force refreshes before the server actually restarts.
20
-
21
- 10) Verify we can using a rolling update with CYOA, and that it'll notify users, then refresh (eventually)
22
- - I guess set the rollingWindow to 10 minutes for testing.
23
-
3
+ 1) Verify clientside notifications work when we rolling update cyoa
4
+ 2) Verify edge nodes are removed when we rolling update cyoa
5
+ 3) Update cyoa rolling time back to 4 hours
24
6
 
25
7
  10) Add RAM total, ram % used, cpu count, CPU %, disk size, disk % used to machine info
26
8
  - Show this all in the list page, with nice bars?