From: "Laurent Bercot" <ska-supervision@skarnet.org>
To: "Joshua Ismael Haase Hernández" <hahj87@gmail.com>,
"supervision@list.skarnet.org" <supervision@list.skarnet.org>
Subject: Re: How to recover from s6-rc broken pipe?
Date: Wed, 16 Dec 2020 21:34:04 +0000 [thread overview]
Message-ID: <em537b61d0-1ae3-423c-807e-a52d219815d0@elzian> (raw)
In-Reply-To: <CA+ypG2Y2ogrRxESR+r-_RkN9gUovRbk_vhbXr9DWQEd3kW0ZzQ@mail.gmail.com>
> sudo rsync -avr --delete compiled/ /etc/s6-rc/compiled/
> sudo s6-rc-update /etc/s6-rc/compiled/
There's your problem. You're overwriting the live database; that will
throw a wrench into everything.
s6-rc-update needs to run while the live database is still the old
one. Only after s6-rc-update has completed can you delete the old
database.
Do something like this instead:
stamp=`echo | s6-tai64n`
s6-rc-compile /etc/s6-rc/compiled-$stamp sources...
s6-rc-update /etc/s6-rc/compiled-$stamp
old=`readlink /etc/s6-rc/compiled`
ln -sf compiled-$stamp /etc/s6-rc/compiled.new
rename /etc/s6-rc/compiled.new /etc/s6-rc/compiled
rm -rf /etc/s6-rc/$old
--
Laurent
prev parent reply other threads:[~2020-12-16 21:34 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-16 17:56 Joshua Ismael Haase Hernández
2020-12-16 20:11 ` Laurent Bercot
[not found] ` <CA+ypG2Y2ogrRxESR+r-_RkN9gUovRbk_vhbXr9DWQEd3kW0ZzQ@mail.gmail.com>
2020-12-16 21:34 ` Laurent Bercot [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=em537b61d0-1ae3-423c-807e-a52d219815d0@elzian \
--to=ska-supervision@skarnet.org \
--cc=hahj87@gmail.com \
--cc=supervision@list.skarnet.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).