Debugging?
Debugging?
Posted Nov 19, 2010 14:35 UTC (Fri) by zdzichu (subscriber, #17118)In reply to: Debugging? by Yenya
Parent article: systemd v12 released
117).
List exact modification you had to do in script and we will try to provide you systemd equivalent.
Posted Nov 19, 2010 14:48 UTC (Fri)
by jackb (guest, #41909)
[Link] (1 responses)
Posted Nov 19, 2010 18:12 UTC (Fri)
by mezcalero (subscriber, #45103)
[Link]
Since timeouts are opt-out, not opt-in, even if some daemon freezes the worst that happens in most cases is that your boot is delayed for a minute and you can then introspect what was going on afterwards with "systemctl list-units", "systemctl status" and dmesg/syslog.
Posted Nov 19, 2010 15:51 UTC (Fri)
by Yenya (subscriber, #52846)
[Link] (5 responses)
OK, here are few I can think about right now:
- using "set -x" to see where the things went wrong.
- loading a different firmware to the storage controller before non-root volumes are scanned
- adding a sleep command in order to give the disks chance to get detected properly
- adding another md rescan in order to build a raid-0 of raid-1 volumes (poor man's raid-10, before the native raid-10 was available)
- lowering the insane TCQ depth of the 3ware controller in order to make it smaller than the iosched queue length and give the iosched chance to do anything useful before the root is fscked and mounted r/w
- loading a non-standard crypto module in order to have a non-root volume accessible by LUKS (before the non-root volumes are probed)
etc. Thanks for providing systemd equivalents of these tasks!
Posted Nov 19, 2010 18:20 UTC (Fri)
by mezcalero (subscriber, #45103)
[Link] (4 responses)
The correct place to load firmware into controllers is from a udev hook. Similar for patching your TCQ depth.
There's no need to add sleep commands and such since systemd is fully dynamic and actually binds fsck/mount to the device actually showing up. i.e. it is unnecessary to resort to hacks such as adding sleeps everywhere since systemd waits exactly for what it needs to wait for (i.e. what is listed in fstab, ...) before proceeding with the boot.
If you want to statically load arbitrary modules, simply place them in /etc/modules-load.d/foobar.conf (replace foobar by whatever you like), and they will be loaded at the same time as udev loads all other modules. However, usually it's a better approach to fix the kernel module to be loaded implicitly on request. In fact most kernel modules already work like that and statically loading modules is only needed in exceptional cases.
Note that at this time we still rely on the old scripted raid setup code anyway. You can continue to edit that as necessary. In the future stc will hopefully support this more correctly and dynamically and set things up as needed without resorting to manual intervention.
Posted Nov 20, 2010 9:39 UTC (Sat)
by quotemstr (subscriber, #45331)
[Link] (3 responses)
Posted Nov 20, 2010 17:02 UTC (Sat)
by foom (subscriber, #14868)
[Link] (2 responses)
Posted Nov 20, 2010 19:51 UTC (Sat)
by quotemstr (subscriber, #45331)
[Link] (1 responses)
Posted Nov 21, 2010 4:12 UTC (Sun)
by foom (subscriber, #14868)
[Link]
Obviously it's possible to have other kinds of problems too...If you want to call sleep 1 before starting a daemon there's nothing stopping you from replacing the start command-line with a shell script that calls sleep 1 before starting the daemon. Even in systemd that should work...
Posted Nov 19, 2010 18:09 UTC (Fri)
by mezcalero (subscriber, #45103)
[Link]
Debugging?
Debugging?
Debugging?
> and we will try to provide you systemd equivalent.
Debugging?
Of course you can do things the "right way" by hooking into configuration infrastructure. But the OP's point was that conventional scripts make ad hoc modifications easy. It's perfectly reasonable to create an interim local solution without needing to dive into the details of arcane subsystmes. In theory, you shouldn't need band-aids like sleep(1) invocations, but in practice, the need comes up once in a while. It's better to accommodate that need instead of denying it.
Debugging?
Debugging?
Debugging?
Debugging?
Debugging?
