HackerTrans
TopNewTrendsCommentsPastAskShowJobs

dghubble

no profile record

Submissions

Writing systemd units that stop gracefully before shutdown

psdn.io
228 points·by dghubble·قبل 4 سنوات·53 comments

The Road to Kubernetes on ARM64

psdn.io
1 points·by dghubble·قبل 4 سنوات·0 comments

comments

dghubble
·قبل 4 سنوات·discuss
That's fair, that example would be better with a modest timeout (e.g. if podman had a bug that caused it to hang), without taking away from the main points. Updated.

Someone asked about the opposite on Twitter: https://twitter.com/DannoHung/status/1585350836074446869
dghubble
·قبل 4 سنوات·discuss
The post shows long-running stop scripts / containers and demonstrates them delaying shutdown (not with KillMode none though)

@CGamesPlay network.target's "primary purpose is for ordering things properly at shutdown: since the shutdown ordering of units in systemd is the reverse of the startup ordering, any unit that is order After=network.target can be sure that it is stopped before the network is shut down if the system is powered off."

https://www.freedesktop.org/wiki/Software/systemd/NetworkTar...
dghubble
·قبل 4 سنوات·discuss
Hmm, sorry you're not seeing it. Its just a CNAME to Cloudflare Pages, nothing fancy

  dig www.psdn.io @1.1.1.1
  
  ; <<>> DiG 9.16.33-RH <<>> www.psdn.io @1.1.1.1
  ;; global options: +cmd
  ;; Got answer:
  ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37362
  ;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 0,   ADDITIONAL: 1
  ;; QUESTION SECTION:
  ;www.psdn.io.                   IN      A
  
  ;; ANSWER SECTION:
  www.psdn.io.            126     IN      CNAME   poseidon-www.pages.dev.
  poseidon-www.pages.dev. 126     IN      A       172.66.45.44
  poseidon-www.pages.dev. 126     IN      A       172.66.46.212
dghubble
·قبل 4 سنوات·discuss
That's what this post builds to solving at the end and in the next post - having a unit deletes the instance from a cluster before shutdown