| Summary: | systemd doesn't execute /etc/rcS.d | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | LiRongQing <rongqing.li> |
| Component: | core | Assignee: | Chen Qi <Qi.Chen> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | Medium | CC: | holger, meta.mr.watcher, meta.watcher, Qi.Chen, ross.burton, sgw, srifenbark |
| Version: | 1.5 | ||
| Target Milestone: | 1.7 M4 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | 25 September 2014: Documentation issues resolved. | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Done (doc changes complete) | |
| Bug Depends on: | |||
| Bug Blocks: | 5441 | ||
|
Description
LiRongQing
2013-09-10 09:06:08 UTC
The systemd.bbclass now deletes files under /etc/init.d when 'sysvinit' is not in DISTRO_FEATURES and it detetes files under systemd_unitdir if 'systemd' is not in DISTRO_FEATURES. So is there any reason that a recipe inherits update-rc.d and it doesn't inherit systemd? //Chen Qi Please verify if you are using both sysvinit and systemd? Is there a specific package / recipe that you are concerned with? As Qi points out it may need to inherit systemd. No, I only use systemd, the cause is that some packages did not inherit systemd, or did not supply systemd unit file, so the sysvinit files can not be removed. *** Bug 4862 has been marked as a duplicate of this bug. *** So I have a patch that enables rcS (mostly from Debian, which has the same problem) but it's a bit too invasive for 1.5 at this point in time. Hi Ross & Roy, IMHO, I don't think we should execute *all* scripts under /etc/rcS.d/. The real problem here is that some packages lack systemd support. And I think we should fix such packages one by one if needed. Of course, adding a unit file specifying 'ExecStart=/etc/rcS.d/xxx start' is one of the forms of adding systemd support. What do you think? //Chen Qi Set in local.conf: VIRTUAL_RUNTIME_initscripts = "" I think such configuration should be recommended in a systemd based image. Hope this could be included in our documentation. //Chen Qi http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=5d90c5ebdb899b2951c97a94ff57867c1e491c15 http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=4379e6f3096c893db5fa6a0b4569a0440e4494fe http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=baae0b0e8786e26b60e17c4febd57ca1915f1e55 http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=b71670bfbd8e394521cfd969eeafad4adc34c285 //Chen Qi #4220 is mentioned in the commit message. I have some doubts towards the dropbear change. 1.) Does upgrading using opkg upgrade through a ssh session with dropbear still work when dropbear is being updated? 2.) We had the problem that dropbear created the host keys in place. So when the device is switched off at a bad moment or not fsync/fdatasync was used the hostkeys can have a zero size. The dropbearkey service appears prone to that issue again. And to be honest the bug mentioned in the topic is not fixed. From what I assume is that there are no more /etc/rcS.d scripts to be executed. So besides the potential regressions introduced the bug is not relevant anymore. (In reply to comment #9) > #4220 is mentioned in the commit message. I have some doubts towards the > dropbear change. > > 1.) Does upgrading using opkg upgrade through a ssh session with dropbear > still work when dropbear is being updated? > Such case hasn't been tested. If there's any problem, could you please open a new bug? To be honest, I currently don't have environment to easily test such case. > 2.) We had the problem that dropbear created the host keys in place. So when > the device is switched off at a bad moment or not fsync/fdatasync was used > the hostkeys can have a zero size. The dropbearkey service appears prone to > that issue again. You are right. I saw your patch. There's a directive in systemd's unit file called ConditionFileNotEmpty=. If you have time, would you please try this out? Thanks, Chen Qi > > > And to be honest the bug mentioned in the topic is not fixed. From what I > assume is that there are no more /etc/rcS.d scripts to be executed. So > besides the potential regressions introduced the bug is not relevant anymore. Hi, Here are some additions to the YP documentation to address the documentation component of this bug. Please review them and comment if there are problems. Note, there is some redundancy here with the note, but that is the nature of this fix. Also, I did some grepping in poky for "VIRTUAL_RUNTIME" and could not find it. So, I am assuming it is "VIRTUAL-RUNTIME", which returned plenty of hits: http://www.yoctoproject.org/docs/1.6/dev-manual/dev-manual.html#new-recipe-enabling-system-services http://www.yoctoproject.org/docs/1.6/dev-manual/dev-manual.html#using-systemd-exclusively http://www.yoctoproject.org/docs/1.6/dev-manual/dev-manual.html#using-systemd-for-the-main-image-and-using-sysvinit-for-the-rescue-image http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#ref-classes-systemd http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-SYSTEMD_AUTO_ENABLE http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-SYSTEMD_PACKAGES http://www.yoctoproject.org/docs/1.6/ref-manual/ref-manual.html#var-SYSTEMD_SERVICE Hi, I have applied Paul's review comments for the affected areas in Comment 11. Here is the feedback: "As we discussed, the bit about VIRTUAL-RUNTIME_initscripts = "" needs to be removed everywhere you've added it. The only place we want to keep it is under "Selecting an Initialization Manager", however it needs to be removed from "Using Systemd for the Main Image and Using SysVinit for the Rescue Image", and then specifically under "Using Systemd Exclusively", the following changes need to be made: * it needs to be moved *after* the other lines * "Set this variable in your local.conf file:" -> "To remove initscripts from your image altogether, set this variable also:" (note, *not* in local.conf, the custom distro config - and since the section has just talked about that, that should be implied.)" See the links for the changes. I am marking this documentation flag to "Done." Thanks, Scott The issue is not fully resolved in Dora. I sadly don't have the time to look at master right now. We are using a TI Davinci SoC which is a ARMv5te and doesn't support unaligned memory access. The "CPU alignment" script does not run and there is no .service file for changing the ignore to fixup. I think the issue should be considered to be re-opened. Can you please check if the problem applies to master? I think there was bug confusion between this and another bug, this certainly isn't fixed. Hi, I am not sure where we stand on this bug regarding the documentation needs. Right now, the Documentation flag is set to "Done" due to fixes I had applied before it was reopened. Please consider the doc flag and set it to "Yes" if there are further fixes I need to apply to the docs. Scott systemd cares about /etc/rc[0~6].d/ but it doesn't care about /etc/rcS.d. I think the logic here is that anything under /etc/rcS.d should be handled by the systemd package itself. For example, the utility of the urandom script under /etc/rcS.d is now accomplished by the systemd-random-seed.service. So the problem is not that systemd doesn't execute things under /etc/rcS.d, instead, it's that we should convert anything remained under /etc/rcS.d to systemd unit files. If nobody objects, I'm going to close this bug. //Chen Qi Our sysvinit executes init scripts from rcS.d as well as rc[123456]d, so our systemd needs to as well. rcS came from Debian, so they have a patch to add rcS support to their systemd. We can likely just apply that. Fixed in 198ed4b5bb11ea045b69523abb9244bd8d5df465. Hi, Sounds as if docs are not an issue here. Thanks, Scott |