genesis-community / genesis

A BOSH Deployment Paradigm
MIT License
56 stars 24 forks source link

Ctrl-C masking / handling #300

Open jhunt opened 6 years ago

jhunt commented 6 years ago

Tried to do this this morning:

→  genesis deploy thunder-dome.yml
Checking availability of the 'buffalo-lab' BOSH director...
Preparing to deploy thunder-dome to 'buffalo-lab' BOSH director.

- Fetching cloud config from 'buffalo-lab'
Downloading cloud config from 'buffalo-lab' BOSH director...
- Running preflight checks against [thunder-dome]:
[thunder-dome] running cloud-config and environmental parameter checks...
  cloud-config [OK]
  checking if our certificates match the director static ip (10.200.131.9)...
    - secret/thunder/dome/bosh/ssl/server [OK]
^C    - secret/thunder/dome/bosh/ssl/mbus [MISSING]
^C    - secret/thunder/dome/bosh/ssl/uaa [INVALID]
^C
^C    - secret/thunder/dome/bosh/ssl/uaa-sp [MISSING]
^C    - secret/thunder/dome/bosh/credhub/server [MISSING]
^C    - secret/thunder/dome/bosh/nats/server [MISSING]
^C    - secret/thunder/dome/bosh/nats/director [MISSING]
^C^C[thunder-dome] running manifest viability checks...
^CDied at /Users/jhunt/.geese/genesis line 7.
^C
^C
^C
^C
^C
^C
^C

That's me trying desperately to kill a deployment I issued in error, but instead, hitting all of the safe processes spawned by the secrets check hook. We should mask Ctrl-C for ALL child processes, and handle it in the parent Genesis process, more gracefully.

mrferris commented 3 years ago

Genesis now detects Ctrl^C has been hit, but does not yet properly handle stopping, nor setting up state necessary to implement something like genesis resume.