ominfra 0.0.0.dev137__py3-none-any.whl → 0.0.0.dev139__py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. ominfra/manage/__init__.py +13 -0
  2. ominfra/manage/{new/main.py → main.py} +68 -18
  3. ominfra/pyremote.py +196 -145
  4. ominfra/{manage/new/_manage.py → scripts/manage.py} +267 -170
  5. ominfra/scripts/supervisor.py +32 -31
  6. ominfra/supervisor/processimpl.py +32 -31
  7. {ominfra-0.0.0.dev137.dist-info → ominfra-0.0.0.dev139.dist-info}/METADATA +3 -3
  8. {ominfra-0.0.0.dev137.dist-info → ominfra-0.0.0.dev139.dist-info}/RECORD +15 -44
  9. ominfra/manage/deploy/_executor.py +0 -1415
  10. ominfra/manage/deploy/configs.py +0 -19
  11. ominfra/manage/deploy/executor/__init__.py +0 -1
  12. ominfra/manage/deploy/executor/base.py +0 -115
  13. ominfra/manage/deploy/executor/concerns/__init__.py +0 -0
  14. ominfra/manage/deploy/executor/concerns/dirs.py +0 -28
  15. ominfra/manage/deploy/executor/concerns/nginx.py +0 -47
  16. ominfra/manage/deploy/executor/concerns/repo.py +0 -17
  17. ominfra/manage/deploy/executor/concerns/supervisor.py +0 -46
  18. ominfra/manage/deploy/executor/concerns/systemd.py +0 -88
  19. ominfra/manage/deploy/executor/concerns/user.py +0 -25
  20. ominfra/manage/deploy/executor/concerns/venv.py +0 -22
  21. ominfra/manage/deploy/executor/main.py +0 -119
  22. ominfra/manage/deploy/poly/__init__.py +0 -1
  23. ominfra/manage/deploy/poly/_main.py +0 -975
  24. ominfra/manage/deploy/poly/base.py +0 -178
  25. ominfra/manage/deploy/poly/configs.py +0 -38
  26. ominfra/manage/deploy/poly/deploy.py +0 -25
  27. ominfra/manage/deploy/poly/main.py +0 -18
  28. ominfra/manage/deploy/poly/nginx.py +0 -60
  29. ominfra/manage/deploy/poly/repo.py +0 -41
  30. ominfra/manage/deploy/poly/runtime.py +0 -39
  31. ominfra/manage/deploy/poly/site.py +0 -11
  32. ominfra/manage/deploy/poly/supervisor.py +0 -64
  33. ominfra/manage/deploy/poly/venv.py +0 -52
  34. ominfra/manage/deploy/remote.py +0 -91
  35. ominfra/manage/manage.py +0 -12
  36. ominfra/manage/new/__init__.py +0 -1
  37. ominfra/manage/new/commands/__init__.py +0 -0
  38. /ominfra/manage/{deploy → commands}/__init__.py +0 -0
  39. /ominfra/manage/{new/commands → commands}/base.py +0 -0
  40. /ominfra/manage/{new/commands → commands}/subprocess.py +0 -0
  41. {ominfra-0.0.0.dev137.dist-info → ominfra-0.0.0.dev139.dist-info}/LICENSE +0 -0
  42. {ominfra-0.0.0.dev137.dist-info → ominfra-0.0.0.dev139.dist-info}/WHEEL +0 -0
  43. {ominfra-0.0.0.dev137.dist-info → ominfra-0.0.0.dev139.dist-info}/entry_points.txt +0 -0
  44. {ominfra-0.0.0.dev137.dist-info → ominfra-0.0.0.dev139.dist-info}/top_level.txt +0 -0
@@ -7382,7 +7382,7 @@ class ProcessImpl(Process):
7382
7382
  self._backoff = 0 # backoff counter (to start_retries)
7383
7383
 
7384
7384
  self._exitstatus: ta.Optional[Rc] = None # status attached to dead process by finish()
7385
- self._spawn_err: ta.Optional[str] = None # error message attached by spawn() if any
7385
+ self._spawn_err: ta.Optional[str] = None # error message attached by _spawn() if any
7386
7386
 
7387
7387
  #
7388
7388
 
@@ -7419,12 +7419,12 @@ class ProcessImpl(Process):
7419
7419
 
7420
7420
  #
7421
7421
 
7422
- def spawn(self) -> ta.Optional[Pid]:
7422
+ def _spawn(self) -> ta.Optional[Pid]:
7423
7423
  if self.pid:
7424
7424
  log.warning('process \'%s\' already running', self.name)
7425
7425
  return None
7426
7426
 
7427
- self.check_in_state(
7427
+ self._check_in_state(
7428
7428
  ProcessState.EXITED,
7429
7429
  ProcessState.FATAL,
7430
7430
  ProcessState.BACKOFF,
@@ -7439,15 +7439,15 @@ class ProcessImpl(Process):
7439
7439
 
7440
7440
  self._last_start = time.time()
7441
7441
 
7442
- self.change_state(ProcessState.STARTING)
7442
+ self._change_state(ProcessState.STARTING)
7443
7443
 
7444
7444
  try:
7445
7445
  sp = self._spawning.spawn()
7446
7446
  except ProcessSpawnError as err:
7447
7447
  log.exception('Spawn error')
7448
7448
  self._spawn_err = err.args[0]
7449
- self.check_in_state(ProcessState.STARTING)
7450
- self.change_state(ProcessState.BACKOFF)
7449
+ self._check_in_state(ProcessState.STARTING)
7450
+ self._change_state(ProcessState.BACKOFF)
7451
7451
  return None
7452
7452
 
7453
7453
  log.info("Spawned: '%s' with pid %s", self.name, sp.pid)
@@ -7480,7 +7480,7 @@ class ProcessImpl(Process):
7480
7480
 
7481
7481
  #
7482
7482
 
7483
- def change_state(self, new_state: ProcessState, expected: bool = True) -> bool:
7483
+ def _change_state(self, new_state: ProcessState, expected: bool = True) -> bool:
7484
7484
  old_state = self._state
7485
7485
  if new_state is old_state:
7486
7486
  return False
@@ -7498,7 +7498,7 @@ class ProcessImpl(Process):
7498
7498
 
7499
7499
  return True
7500
7500
 
7501
- def check_in_state(self, *states: ProcessState) -> None:
7501
+ def _check_in_state(self, *states: ProcessState) -> None:
7502
7502
  if self._state not in states:
7503
7503
  raise ProcessStateError(
7504
7504
  f'Check failed for {self._config.name}: '
@@ -7507,7 +7507,7 @@ class ProcessImpl(Process):
7507
7507
 
7508
7508
  #
7509
7509
 
7510
- def _check_and_adjust_for_system_clock_rollback(self, test_time):
7510
+ def _check_and_adjust_for_system_clock_rollback(self, test_time: float) -> None:
7511
7511
  """
7512
7512
  Check if system clock has rolled backward beyond test_time. If so, set affected timestamps to test_time.
7513
7513
  """
@@ -7551,8 +7551,8 @@ class ProcessImpl(Process):
7551
7551
  self._delay = 0
7552
7552
  self._backoff = 0
7553
7553
  self._system_stop = True
7554
- self.check_in_state(ProcessState.BACKOFF)
7555
- self.change_state(ProcessState.FATAL)
7554
+ self._check_in_state(ProcessState.BACKOFF)
7555
+ self._change_state(ProcessState.FATAL)
7556
7556
 
7557
7557
  def kill(self, sig: int) -> ta.Optional[str]:
7558
7558
  """
@@ -7562,6 +7562,7 @@ class ProcessImpl(Process):
7562
7562
  Return None if the signal was sent, or an error message string if an error occurred or if the subprocess is not
7563
7563
  running.
7564
7564
  """
7565
+
7565
7566
  now = time.time()
7566
7567
 
7567
7568
  # If the process is in BACKOFF and we want to stop or kill it, then BACKOFF -> STOPPED. This is needed because
@@ -7569,7 +7570,7 @@ class ProcessImpl(Process):
7569
7570
  # blocked for a long time waiting for the retries.
7570
7571
  if self._state == ProcessState.BACKOFF:
7571
7572
  log.debug('Attempted to kill %s, which is in BACKOFF state.', self.name)
7572
- self.change_state(ProcessState.STOPPED)
7573
+ self._change_state(ProcessState.STOPPED)
7573
7574
  return None
7574
7575
 
7575
7576
  args: tuple
@@ -7594,8 +7595,8 @@ class ProcessImpl(Process):
7594
7595
  self._killing = True
7595
7596
  self._delay = now + self._config.stop_wait_secs
7596
7597
  # we will already be in the STOPPING state if we're doing a SIGKILL as a result of overrunning stop_wait_secs
7597
- self.check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
7598
- self.change_state(ProcessState.STOPPING)
7598
+ self._check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
7599
+ self._change_state(ProcessState.STOPPING)
7599
7600
 
7600
7601
  kpid = int(self.pid)
7601
7602
  if kill_as_group:
@@ -7616,7 +7617,7 @@ class ProcessImpl(Process):
7616
7617
  tb = traceback.format_exc()
7617
7618
  fmt, args = 'unknown problem killing %s (%s):%s', (self.name, self.pid, tb)
7618
7619
  log.critical(fmt, *args)
7619
- self.change_state(ProcessState.UNKNOWN)
7620
+ self._change_state(ProcessState.UNKNOWN)
7620
7621
  self._killing = False
7621
7622
  self._delay = 0
7622
7623
  return fmt % args
@@ -7638,7 +7639,7 @@ class ProcessImpl(Process):
7638
7639
 
7639
7640
  log.debug('sending %s (pid %s) sig %s', self.name, self.pid, sig_name(sig))
7640
7641
 
7641
- self.check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
7642
+ self._check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
7642
7643
 
7643
7644
  try:
7644
7645
  try:
@@ -7659,7 +7660,7 @@ class ProcessImpl(Process):
7659
7660
  tb = traceback.format_exc()
7660
7661
  fmt, args = 'unknown problem sending sig %s (%s):%s', (self.name, self.pid, tb)
7661
7662
  log.critical(fmt, *args)
7662
- self.change_state(ProcessState.UNKNOWN)
7663
+ self._change_state(ProcessState.UNKNOWN)
7663
7664
  return fmt % args
7664
7665
 
7665
7666
  return None
@@ -7697,8 +7698,8 @@ class ProcessImpl(Process):
7697
7698
  self._exitstatus = Rc(es)
7698
7699
 
7699
7700
  fmt, args = 'stopped: %s (%s)', (self.name, msg)
7700
- self.check_in_state(ProcessState.STOPPING)
7701
- self.change_state(ProcessState.STOPPED)
7701
+ self._check_in_state(ProcessState.STOPPING)
7702
+ self._change_state(ProcessState.STOPPED)
7702
7703
  if exit_expected:
7703
7704
  log.info(fmt, *args)
7704
7705
  else:
@@ -7708,8 +7709,8 @@ class ProcessImpl(Process):
7708
7709
  # the program did not stay up long enough to make it to RUNNING implies STARTING -> BACKOFF
7709
7710
  self._exitstatus = None
7710
7711
  self._spawn_err = 'Exited too quickly (process log may have details)'
7711
- self.check_in_state(ProcessState.STARTING)
7712
- self.change_state(ProcessState.BACKOFF)
7712
+ self._check_in_state(ProcessState.STARTING)
7713
+ self._change_state(ProcessState.BACKOFF)
7713
7714
  log.warning('exited: %s (%s)', self.name, msg + '; not expected')
7714
7715
 
7715
7716
  else:
@@ -7722,18 +7723,18 @@ class ProcessImpl(Process):
7722
7723
  # if the process was STARTING but a system time change causes self.last_start to be in the future, the
7723
7724
  # normal STARTING->RUNNING transition can be subverted so we perform the transition here.
7724
7725
  if self._state == ProcessState.STARTING:
7725
- self.change_state(ProcessState.RUNNING)
7726
+ self._change_state(ProcessState.RUNNING)
7726
7727
 
7727
- self.check_in_state(ProcessState.RUNNING)
7728
+ self._check_in_state(ProcessState.RUNNING)
7728
7729
 
7729
7730
  if exit_expected:
7730
7731
  # expected exit code
7731
- self.change_state(ProcessState.EXITED, expected=True)
7732
+ self._change_state(ProcessState.EXITED, expected=True)
7732
7733
  log.info('exited: %s (%s)', self.name, msg + '; expected')
7733
7734
  else:
7734
7735
  # unexpected exit code
7735
7736
  self._spawn_err = f'Bad exit code {es}'
7736
- self.change_state(ProcessState.EXITED, expected=False)
7737
+ self._change_state(ProcessState.EXITED, expected=False)
7737
7738
  log.warning('exited: %s (%s)', self.name, msg + '; not expected')
7738
7739
 
7739
7740
  self._pid = Pid(0)
@@ -7753,21 +7754,21 @@ class ProcessImpl(Process):
7753
7754
  if self._config.auto_restart:
7754
7755
  if self._config.auto_restart is RestartUnconditionally:
7755
7756
  # EXITED -> STARTING
7756
- self.spawn()
7757
+ self._spawn()
7757
7758
  elif self._exitstatus not in self._config.exitcodes:
7758
7759
  # EXITED -> STARTING
7759
- self.spawn()
7760
+ self._spawn()
7760
7761
 
7761
7762
  elif state == ProcessState.STOPPED and not self._last_start:
7762
7763
  if self._config.auto_start:
7763
7764
  # STOPPED -> STARTING
7764
- self.spawn()
7765
+ self._spawn()
7765
7766
 
7766
7767
  elif state == ProcessState.BACKOFF:
7767
7768
  if self._backoff <= self._config.start_retries:
7768
7769
  if now > self._delay:
7769
7770
  # BACKOFF -> STARTING
7770
- self.spawn()
7771
+ self._spawn()
7771
7772
 
7772
7773
  if state == ProcessState.STARTING:
7773
7774
  if now - self._last_start > self._config.start_secs:
@@ -7775,8 +7776,8 @@ class ProcessImpl(Process):
7775
7776
  # proc.config.start_secs,
7776
7777
  self._delay = 0
7777
7778
  self._backoff = 0
7778
- self.check_in_state(ProcessState.STARTING)
7779
- self.change_state(ProcessState.RUNNING)
7779
+ self._check_in_state(ProcessState.STARTING)
7780
+ self._change_state(ProcessState.RUNNING)
7780
7781
  msg = ('entered RUNNING state, process has stayed up for > than %s seconds (start_secs)' % self._config.start_secs) # noqa
7781
7782
  log.info('success: %s %s', self.name, msg)
7782
7783
 
@@ -82,7 +82,7 @@ class ProcessImpl(Process):
82
82
  self._backoff = 0 # backoff counter (to start_retries)
83
83
 
84
84
  self._exitstatus: ta.Optional[Rc] = None # status attached to dead process by finish()
85
- self._spawn_err: ta.Optional[str] = None # error message attached by spawn() if any
85
+ self._spawn_err: ta.Optional[str] = None # error message attached by _spawn() if any
86
86
 
87
87
  #
88
88
 
@@ -119,12 +119,12 @@ class ProcessImpl(Process):
119
119
 
120
120
  #
121
121
 
122
- def spawn(self) -> ta.Optional[Pid]:
122
+ def _spawn(self) -> ta.Optional[Pid]:
123
123
  if self.pid:
124
124
  log.warning('process \'%s\' already running', self.name)
125
125
  return None
126
126
 
127
- self.check_in_state(
127
+ self._check_in_state(
128
128
  ProcessState.EXITED,
129
129
  ProcessState.FATAL,
130
130
  ProcessState.BACKOFF,
@@ -139,15 +139,15 @@ class ProcessImpl(Process):
139
139
 
140
140
  self._last_start = time.time()
141
141
 
142
- self.change_state(ProcessState.STARTING)
142
+ self._change_state(ProcessState.STARTING)
143
143
 
144
144
  try:
145
145
  sp = self._spawning.spawn()
146
146
  except ProcessSpawnError as err:
147
147
  log.exception('Spawn error')
148
148
  self._spawn_err = err.args[0]
149
- self.check_in_state(ProcessState.STARTING)
150
- self.change_state(ProcessState.BACKOFF)
149
+ self._check_in_state(ProcessState.STARTING)
150
+ self._change_state(ProcessState.BACKOFF)
151
151
  return None
152
152
 
153
153
  log.info("Spawned: '%s' with pid %s", self.name, sp.pid)
@@ -180,7 +180,7 @@ class ProcessImpl(Process):
180
180
 
181
181
  #
182
182
 
183
- def change_state(self, new_state: ProcessState, expected: bool = True) -> bool:
183
+ def _change_state(self, new_state: ProcessState, expected: bool = True) -> bool:
184
184
  old_state = self._state
185
185
  if new_state is old_state:
186
186
  return False
@@ -198,7 +198,7 @@ class ProcessImpl(Process):
198
198
 
199
199
  return True
200
200
 
201
- def check_in_state(self, *states: ProcessState) -> None:
201
+ def _check_in_state(self, *states: ProcessState) -> None:
202
202
  if self._state not in states:
203
203
  raise ProcessStateError(
204
204
  f'Check failed for {self._config.name}: '
@@ -207,7 +207,7 @@ class ProcessImpl(Process):
207
207
 
208
208
  #
209
209
 
210
- def _check_and_adjust_for_system_clock_rollback(self, test_time):
210
+ def _check_and_adjust_for_system_clock_rollback(self, test_time: float) -> None:
211
211
  """
212
212
  Check if system clock has rolled backward beyond test_time. If so, set affected timestamps to test_time.
213
213
  """
@@ -251,8 +251,8 @@ class ProcessImpl(Process):
251
251
  self._delay = 0
252
252
  self._backoff = 0
253
253
  self._system_stop = True
254
- self.check_in_state(ProcessState.BACKOFF)
255
- self.change_state(ProcessState.FATAL)
254
+ self._check_in_state(ProcessState.BACKOFF)
255
+ self._change_state(ProcessState.FATAL)
256
256
 
257
257
  def kill(self, sig: int) -> ta.Optional[str]:
258
258
  """
@@ -262,6 +262,7 @@ class ProcessImpl(Process):
262
262
  Return None if the signal was sent, or an error message string if an error occurred or if the subprocess is not
263
263
  running.
264
264
  """
265
+
265
266
  now = time.time()
266
267
 
267
268
  # If the process is in BACKOFF and we want to stop or kill it, then BACKOFF -> STOPPED. This is needed because
@@ -269,7 +270,7 @@ class ProcessImpl(Process):
269
270
  # blocked for a long time waiting for the retries.
270
271
  if self._state == ProcessState.BACKOFF:
271
272
  log.debug('Attempted to kill %s, which is in BACKOFF state.', self.name)
272
- self.change_state(ProcessState.STOPPED)
273
+ self._change_state(ProcessState.STOPPED)
273
274
  return None
274
275
 
275
276
  args: tuple
@@ -294,8 +295,8 @@ class ProcessImpl(Process):
294
295
  self._killing = True
295
296
  self._delay = now + self._config.stop_wait_secs
296
297
  # we will already be in the STOPPING state if we're doing a SIGKILL as a result of overrunning stop_wait_secs
297
- self.check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
298
- self.change_state(ProcessState.STOPPING)
298
+ self._check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
299
+ self._change_state(ProcessState.STOPPING)
299
300
 
300
301
  kpid = int(self.pid)
301
302
  if kill_as_group:
@@ -316,7 +317,7 @@ class ProcessImpl(Process):
316
317
  tb = traceback.format_exc()
317
318
  fmt, args = 'unknown problem killing %s (%s):%s', (self.name, self.pid, tb)
318
319
  log.critical(fmt, *args)
319
- self.change_state(ProcessState.UNKNOWN)
320
+ self._change_state(ProcessState.UNKNOWN)
320
321
  self._killing = False
321
322
  self._delay = 0
322
323
  return fmt % args
@@ -338,7 +339,7 @@ class ProcessImpl(Process):
338
339
 
339
340
  log.debug('sending %s (pid %s) sig %s', self.name, self.pid, sig_name(sig))
340
341
 
341
- self.check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
342
+ self._check_in_state(ProcessState.RUNNING, ProcessState.STARTING, ProcessState.STOPPING)
342
343
 
343
344
  try:
344
345
  try:
@@ -359,7 +360,7 @@ class ProcessImpl(Process):
359
360
  tb = traceback.format_exc()
360
361
  fmt, args = 'unknown problem sending sig %s (%s):%s', (self.name, self.pid, tb)
361
362
  log.critical(fmt, *args)
362
- self.change_state(ProcessState.UNKNOWN)
363
+ self._change_state(ProcessState.UNKNOWN)
363
364
  return fmt % args
364
365
 
365
366
  return None
@@ -397,8 +398,8 @@ class ProcessImpl(Process):
397
398
  self._exitstatus = Rc(es)
398
399
 
399
400
  fmt, args = 'stopped: %s (%s)', (self.name, msg)
400
- self.check_in_state(ProcessState.STOPPING)
401
- self.change_state(ProcessState.STOPPED)
401
+ self._check_in_state(ProcessState.STOPPING)
402
+ self._change_state(ProcessState.STOPPED)
402
403
  if exit_expected:
403
404
  log.info(fmt, *args)
404
405
  else:
@@ -408,8 +409,8 @@ class ProcessImpl(Process):
408
409
  # the program did not stay up long enough to make it to RUNNING implies STARTING -> BACKOFF
409
410
  self._exitstatus = None
410
411
  self._spawn_err = 'Exited too quickly (process log may have details)'
411
- self.check_in_state(ProcessState.STARTING)
412
- self.change_state(ProcessState.BACKOFF)
412
+ self._check_in_state(ProcessState.STARTING)
413
+ self._change_state(ProcessState.BACKOFF)
413
414
  log.warning('exited: %s (%s)', self.name, msg + '; not expected')
414
415
 
415
416
  else:
@@ -422,18 +423,18 @@ class ProcessImpl(Process):
422
423
  # if the process was STARTING but a system time change causes self.last_start to be in the future, the
423
424
  # normal STARTING->RUNNING transition can be subverted so we perform the transition here.
424
425
  if self._state == ProcessState.STARTING:
425
- self.change_state(ProcessState.RUNNING)
426
+ self._change_state(ProcessState.RUNNING)
426
427
 
427
- self.check_in_state(ProcessState.RUNNING)
428
+ self._check_in_state(ProcessState.RUNNING)
428
429
 
429
430
  if exit_expected:
430
431
  # expected exit code
431
- self.change_state(ProcessState.EXITED, expected=True)
432
+ self._change_state(ProcessState.EXITED, expected=True)
432
433
  log.info('exited: %s (%s)', self.name, msg + '; expected')
433
434
  else:
434
435
  # unexpected exit code
435
436
  self._spawn_err = f'Bad exit code {es}'
436
- self.change_state(ProcessState.EXITED, expected=False)
437
+ self._change_state(ProcessState.EXITED, expected=False)
437
438
  log.warning('exited: %s (%s)', self.name, msg + '; not expected')
438
439
 
439
440
  self._pid = Pid(0)
@@ -453,21 +454,21 @@ class ProcessImpl(Process):
453
454
  if self._config.auto_restart:
454
455
  if self._config.auto_restart is RestartUnconditionally:
455
456
  # EXITED -> STARTING
456
- self.spawn()
457
+ self._spawn()
457
458
  elif self._exitstatus not in self._config.exitcodes:
458
459
  # EXITED -> STARTING
459
- self.spawn()
460
+ self._spawn()
460
461
 
461
462
  elif state == ProcessState.STOPPED and not self._last_start:
462
463
  if self._config.auto_start:
463
464
  # STOPPED -> STARTING
464
- self.spawn()
465
+ self._spawn()
465
466
 
466
467
  elif state == ProcessState.BACKOFF:
467
468
  if self._backoff <= self._config.start_retries:
468
469
  if now > self._delay:
469
470
  # BACKOFF -> STARTING
470
- self.spawn()
471
+ self._spawn()
471
472
 
472
473
  if state == ProcessState.STARTING:
473
474
  if now - self._last_start > self._config.start_secs:
@@ -475,8 +476,8 @@ class ProcessImpl(Process):
475
476
  # proc.config.start_secs,
476
477
  self._delay = 0
477
478
  self._backoff = 0
478
- self.check_in_state(ProcessState.STARTING)
479
- self.change_state(ProcessState.RUNNING)
479
+ self._check_in_state(ProcessState.STARTING)
480
+ self._change_state(ProcessState.RUNNING)
480
481
  msg = ('entered RUNNING state, process has stayed up for > than %s seconds (start_secs)' % self._config.start_secs) # noqa
481
482
  log.info('success: %s %s', self.name, msg)
482
483
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ominfra
3
- Version: 0.0.0.dev137
3
+ Version: 0.0.0.dev139
4
4
  Summary: ominfra
5
5
  Author: wrmsr
6
6
  License: BSD-3-Clause
@@ -12,8 +12,8 @@ Classifier: Operating System :: OS Independent
12
12
  Classifier: Operating System :: POSIX
13
13
  Requires-Python: >=3.12
14
14
  License-File: LICENSE
15
- Requires-Dist: omdev==0.0.0.dev137
16
- Requires-Dist: omlish==0.0.0.dev137
15
+ Requires-Dist: omdev==0.0.0.dev139
16
+ Requires-Dist: omlish==0.0.0.dev139
17
17
  Provides-Extra: all
18
18
  Requires-Dist: paramiko~=3.5; extra == "all"
19
19
  Requires-Dist: asyncssh~=2.18; extra == "all"
@@ -3,7 +3,7 @@ ominfra/__about__.py,sha256=6i1AoruFYQCd-PyhhbDQDWY2d1tiQu9nkwWr-fXAqfY,705
3
3
  ominfra/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  ominfra/cmds.py,sha256=E0AfnvEmnKntXWvmLW5L05_NeDpBET1VBXn7vV6EwBQ,2083
5
5
  ominfra/configs.py,sha256=8aU1Qmbr-qjaE2iP3gAbA2SWJYMPZ-uGK007L01PoOI,1727
6
- ominfra/pyremote.py,sha256=djh4WzAUqqBoVfXij5ylYHtEh0bo5jxPWicnkg16q1s,10514
6
+ ominfra/pyremote.py,sha256=vIEUncFgYvcFj3aK0dvJkRuAuaaRyqXk7c8rl2WPOR4,12599
7
7
  ominfra/ssh.py,sha256=jQpc4WvkMckIfk4vILda8zFaeharRqc_6wxW50b0OjQ,5431
8
8
  ominfra/threadworkers.py,sha256=oX4ubZn7h932saXpRIJu2MNhBExgGGMuGhdXarZxLJw,4948
9
9
  ominfra/clouds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -27,44 +27,15 @@ ominfra/journald/fields.py,sha256=NjjVn7GW4jkcGdyiiizVjEfQqSFnolXYk3kDcSQcMmc,12
27
27
  ominfra/journald/genmessages.py,sha256=rLTS-K2v7otNOtTz4RoOEVYCm0fQuuBzf47e0T61tA8,1857
28
28
  ominfra/journald/messages.py,sha256=Wr7TjWMOySc0WnKwp_-idR8RfeKlbyJQ_KkELr0VB70,2192
29
29
  ominfra/journald/tailer.py,sha256=5abcFMfgi7fnY9ZEQe2ZVobaJxjQkeu6d9Kagw33a1w,33525
30
- ominfra/manage/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
31
- ominfra/manage/manage.py,sha256=BttL8LFEknHZE_h2Pt5dAqbfUkv6qy43WI0raXBZ1a8,151
32
- ominfra/manage/deploy/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
- ominfra/manage/deploy/_executor.py,sha256=amAnQWG5PBrsYVqd7K6xILyq88mhTUZucTWtSenceTE,35466
34
- ominfra/manage/deploy/configs.py,sha256=qi0kwT7G2NH7dXLOQic-u6R3yeadup_QtvrjwWIggbM,435
35
- ominfra/manage/deploy/remote.py,sha256=WHHElLmYk6wEDC4R8s_jHi1z71CCuV3soqF3elzIWEM,2145
36
- ominfra/manage/deploy/executor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
37
- ominfra/manage/deploy/executor/base.py,sha256=AjpUT1iPsJHrDNzcflZ9IazpClmWZaGjYxE0NIBazoQ,2815
38
- ominfra/manage/deploy/executor/main.py,sha256=U5p-78koTjYP_JzcE8DfwXEtGNS6nJMn3LiBiofF8a0,2641
39
- ominfra/manage/deploy/executor/concerns/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
- ominfra/manage/deploy/executor/concerns/dirs.py,sha256=Iqhva6v8nIPhMkhJFsr5lUsbTMgu-cWYv7nDwHrMSmY,696
41
- ominfra/manage/deploy/executor/concerns/nginx.py,sha256=mIL25l6PCPleUbHK2_9cS5FU19ODcT6gVLrUqN43gf8,1541
42
- ominfra/manage/deploy/executor/concerns/repo.py,sha256=mlTqxjWKGPTE8McJ41tUqwdCaFeMxqxczbMH-8LDR0Y,500
43
- ominfra/manage/deploy/executor/concerns/supervisor.py,sha256=KuMutAOwQjcOrng3ROYjwUErWPg7_Urf0Bvde20xi2s,1796
44
- ominfra/manage/deploy/executor/concerns/systemd.py,sha256=MtsSEToEa1HNouern_JukcYTnypw_i00VyKs9lJkXu4,2861
45
- ominfra/manage/deploy/executor/concerns/user.py,sha256=j5LDfQXquIp-eEM7t6aShsrYoQrM_ILXZycTmTcRVxA,686
46
- ominfra/manage/deploy/executor/concerns/venv.py,sha256=jbRriqJHO4r9Zyo5Hfl_qVmcU6Qm6UgrouBroKcPn2g,775
47
- ominfra/manage/deploy/poly/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
48
- ominfra/manage/deploy/poly/_main.py,sha256=Qc66G51CqQUt03rqT2u96p7H73UJnvxm7IhAAWNbMsE,24192
49
- ominfra/manage/deploy/poly/base.py,sha256=1dGuzWxi2Z6Hm6-YlkVxPk9r3In2aCJ0p8lGR-QQI_s,4166
50
- ominfra/manage/deploy/poly/configs.py,sha256=9bzWdbxhOk_Q4KokDjmRz254KHnUU71Vl1frLlhQyU4,584
51
- ominfra/manage/deploy/poly/deploy.py,sha256=tMYKslXLjstcv86siRt5j37USsS0Wd6lsfeGRE26zio,544
52
- ominfra/manage/deploy/poly/main.py,sha256=nHTE6oRfdQzoMAK6VNypVumFU6R8C-nAIlnCJKaqxU8,472
53
- ominfra/manage/deploy/poly/nginx.py,sha256=9PZu-7oOiyrjBzL4SyczyJwoq4a1lBhSfyFLhE9BgkE,1842
54
- ominfra/manage/deploy/poly/repo.py,sha256=nqhIhOreAQ4JcOgIQmCwjZ7EWnIMj7B9N7b8uko24sc,1205
55
- ominfra/manage/deploy/poly/runtime.py,sha256=G66AI-a27Wi6QYpG3M0ryqI7c5MnJkXt-_j9Qi8UiUk,1066
56
- ominfra/manage/deploy/poly/site.py,sha256=QJwDDJoVm2-kxi4bxIrp-mn4y2qDLuW3CAUax3W8gv8,239
57
- ominfra/manage/deploy/poly/supervisor.py,sha256=zkl6VQBcAZaMAhyR9DbbbqULcgFCDZoe9S_vP-mMFQ8,2289
58
- ominfra/manage/deploy/poly/venv.py,sha256=BoipDEa4NTeodjf3L57KJfq9eGKLagFNKwD8pS4yrzA,1552
59
- ominfra/manage/new/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
60
- ominfra/manage/new/_manage.py,sha256=ERsODiUvQUoZQKCPbQUMQDtBLvq3OnFV-jejfLHgmTI,40760
61
- ominfra/manage/new/main.py,sha256=xIRUXiofpz8Fh3KBw80TdgqGigArC1xooZ1vaIqvxGM,3912
62
- ominfra/manage/new/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
63
- ominfra/manage/new/commands/base.py,sha256=TTrHL213jf-ClVqToiNHuxQey1Yf6052E8u3E9hAf7Q,574
64
- ominfra/manage/new/commands/subprocess.py,sha256=GpbD-cTorgCRg203lCl81HAh-NBYA6ObKa5ZP2ss9rg,1884
30
+ ominfra/manage/__init__.py,sha256=YqHcYMfmo04OoVNYc6Ykc1I8WaJot44skwhm9DcnmXE,166
31
+ ominfra/manage/main.py,sha256=D-wxBsGi-EBBpKBC1hhLCr8PkJxLs1Vj9CAsSwisn-k,5141
32
+ ominfra/manage/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
33
+ ominfra/manage/commands/base.py,sha256=TTrHL213jf-ClVqToiNHuxQey1Yf6052E8u3E9hAf7Q,574
34
+ ominfra/manage/commands/subprocess.py,sha256=GpbD-cTorgCRg203lCl81HAh-NBYA6ObKa5ZP2ss9rg,1884
65
35
  ominfra/scripts/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
66
36
  ominfra/scripts/journald2aws.py,sha256=kCyeyCo53GRoCKAdVAe0aGkgmINxi8IBcUfRXphACek,131618
67
- ominfra/scripts/supervisor.py,sha256=GO_e3e6WWqdBE-WejtaTrzU8yjtZBiadD-o2Nb-aJ6o,245838
37
+ ominfra/scripts/manage.py,sha256=xgDqnBWLdLogvu2R5e3Pgg3Dc9M2P_6QN1-7MQE5dnY,43817
38
+ ominfra/scripts/supervisor.py,sha256=3rhnR5gT3MxqFW9ew5ePYioTDLvEcM2nlYmvbGBCvzI,245884
68
39
  ominfra/supervisor/LICENSE.txt,sha256=yvqaMNsDhWxziHa9ien6qCW1SkZv-DQlAg96XjfSee8,1746
69
40
  ominfra/supervisor/__init__.py,sha256=Y3l4WY4JRi2uLG6kgbGp93fuGfkxkKwZDvhsa0Rwgtk,15
70
41
  ominfra/supervisor/__main__.py,sha256=I0yFw-C08OOiZ3BF6lF1Oiv789EQXu-_j6whDhQUTEA,66
@@ -82,7 +53,7 @@ ominfra/supervisor/main.py,sha256=oqaWOcnHJgaxNhjyphPgjaNjHPjDcx7kzYMjtZpwSxE,42
82
53
  ominfra/supervisor/pipes.py,sha256=2ZihNTnRNjnIPOtPbm3_pyqO15f7BNs7WnNtO5V8ahM,2231
83
54
  ominfra/supervisor/privileges.py,sha256=kaRTHI7XjqzxEWCeHp3_0J0Vc4gSPugRbXEwxuw6MYE,2054
84
55
  ominfra/supervisor/process.py,sha256=UaubVxsxVqDnbuWVpTH0DTGbJGLO0vGJ9mNcvy2kCXM,217
85
- ominfra/supervisor/processimpl.py,sha256=BcvX-e03qjFSUogDUVmevwyizXS3kss3JY1QkHWjKWE,18689
56
+ ominfra/supervisor/processimpl.py,sha256=eLpzoxwmXG7LoT_noFncbGGlr28Sjynz3_xYyF8gFUs,18735
86
57
  ominfra/supervisor/setup.py,sha256=7HwwwI-WT_Z0WjZ9_l5Orr4K298nKKhQ1f_ZgGsi9TU,622
87
58
  ominfra/supervisor/setupimpl.py,sha256=88h3oYsdJ0LAo7sZZZGRQti14oQay3b-0Vd_h3Cl108,9638
88
59
  ominfra/supervisor/signals.py,sha256=jY52naUifcAjd6nICTP1ZW3IQSPsHB4cvbsJo8_QV_U,2196
@@ -106,9 +77,9 @@ ominfra/tailscale/api.py,sha256=C5-t_b6jZXUWcy5k8bXm7CFnk73pSdrlMOgGDeGVrpw,1370
106
77
  ominfra/tailscale/cli.py,sha256=DSGp4hn5xwOW-l_u_InKlSF6kIobxtUtVssf_73STs0,3567
107
78
  ominfra/tools/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
108
79
  ominfra/tools/listresources.py,sha256=4qVg5txsb10EHhvqXXeM6gJ2jx9LbroEnPydDv1uXs0,6176
109
- ominfra-0.0.0.dev137.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
110
- ominfra-0.0.0.dev137.dist-info/METADATA,sha256=8OfILeUYDutFSCpF5j3-yPVNgBa0WHp_CM49WDloxZA,731
111
- ominfra-0.0.0.dev137.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
112
- ominfra-0.0.0.dev137.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
113
- ominfra-0.0.0.dev137.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
114
- ominfra-0.0.0.dev137.dist-info/RECORD,,
80
+ ominfra-0.0.0.dev139.dist-info/LICENSE,sha256=B_hVtavaA8zCYDW99DYdcpDLKz1n3BBRjZrcbv8uG8c,1451
81
+ ominfra-0.0.0.dev139.dist-info/METADATA,sha256=f4A84661QYB6jEMis-4rQWqm5ZajlCBBJ7y367ojJVM,731
82
+ ominfra-0.0.0.dev139.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
83
+ ominfra-0.0.0.dev139.dist-info/entry_points.txt,sha256=kgecQ2MgGrM9qK744BoKS3tMesaC3yjLnl9pa5CRczg,37
84
+ ominfra-0.0.0.dev139.dist-info/top_level.txt,sha256=E-b2OHkk_AOBLXHYZQ2EOFKl-_6uOGd8EjeG-Zy6h_w,8
85
+ ominfra-0.0.0.dev139.dist-info/RECORD,,