mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Schenk, Gavin" <G.Schenk@eckelmann.de>
To: "ptxdist@pengutronix.de" <ptxdist@pengutronix.de>
Subject: Re: [ptxdist] systemd: Using second offline update service beside rc-once in PTXDIST
Date: Tue, 6 Jun 2017 15:28:47 +0000	[thread overview]
Message-ID: <D415CD2EC4182C4EAB90A76B7D9F16DC0220360105@EX-DAG01.eckelmann.group> (raw)
In-Reply-To: <20170606090456.oa4egsreaiorwffn@pengutronix.de>

Hi Michael,

> >
> > Thank you for the fast feedback, I will send a patch.
> >
> > Some Questions:
> > Using readlink is ok? (additional dependency rc-once -> readlink ) Is
> > there anything more lightweight?
> 
> Not that I know. Note: if you use 'readlink -f' then the busybox version
> has a option for this, so maybe:
> 
> 	select BUSYBOX_FEATURE_READLINK_FOLLOW	if BUSYBOX_READLINK
> 	select COREUTILS			if !BUSYBOX_READLINK
> 	select COREUTILS_READLINK		if !BUSYBOX_READLINK
> 
Ok, done.

> > Do we need this stuff configurable?
> 
> No. But I think we should have a sanity check. To avoid getting stuck in
> the system-update.target: A service that is part of system-update.target
> and starts the rescue target. rc-once.service and your service should
> both be sorted 'Before' that service. If no other service starts a
> different target we automatically fall into the rescue target.
> 
Is "FailureAction=reboot" or "FailureAction=rescue.target" in service file sufficient here?

I am not happy with my implementation today :-(. The main reason is, it does not cover my usecase where I want to do something:
   * Once at first boot
   * With UI on tty
   * Without conflicting rc-once

For this usecase it seems to be enough to add a service to system-update.target.wants with "After=rc-once.service". This is not flawless, because the system continues booting after rc-once is done e.g. getty.target. It seems to be related to "systemctl daemon-reexec" in systemd-rc-once I am not sure. The handling of bbinit beside systemd and managing write protection in this scripts scares me. I am afraid to break stuff when doing changes here.

I reverted my last commit where I added some recommendations of freedesktop.org:
   * Requires=sysinit.target
   * After=sysinit.target

The result was a broken system. I reverted this to your implementation
   * After=local-fs.target
   * Requires=local-fs.target
   * Before=system-update-cleanup.service
   * After=system-update.target

I will send my three small patches after this mail. It adds a bugfix (etc/rc-once.d -> /etc/rc-once.d) and the readlink check. I moved the deletion of /system-update into run_rc_once function. Not sure if you like this, I followed recommendation 2.

Best regards
Gavin Schenk


Eckelmann AG
Vorstand: Dipl.-Ing. Peter Frankenbach (Sprecher) Dipl.-Wi.-Ing. Philipp Eckelmann
Dr.-Ing. Marco Münchhof Dr.-Ing. Frank Uhlemann
Vorsitzender des Aufsichtsrats: Hubertus G. Krossa
Stv. Vorsitzender des Aufsichtsrats: Dr.-Ing. Gerd Eckelmann
Sitz der Gesellschaft: Berliner Str. 161, 65205 Wiesbaden, Amtsgericht Wiesbaden HRB 12636
http://www.eckelmann.de 

_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  reply	other threads:[~2017-06-06 15:28 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-01 14:51 Schenk, Gavin
2017-06-02  9:46 ` Michael Olbrich
2017-06-02 11:15   ` Schenk, Gavin
2017-06-06  9:04     ` Michael Olbrich
2017-06-06 15:28       ` Schenk, Gavin [this message]
2017-06-06 16:33         ` Michael Olbrich
2017-06-07  7:26           ` Schenk, Gavin

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=D415CD2EC4182C4EAB90A76B7D9F16DC0220360105@EX-DAG01.eckelmann.group \
    --to=g.schenk@eckelmann.de \
    --cc=ptxdist@pengutronix.de \
    /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