1 |
On 02/23/2014 06:01 PM, Canek Peláez Valdés wrote: |
2 |
> On Sun, Feb 23, 2014 at 5:06 AM, <thegeezer@×××××××××.net> wrote: |
3 |
> [ snip ] |
4 |
>>> Corrupt filesystems or logs? |
5 |
>> logs. currently if fsck runs anywhere on boot i get zero log about what |
6 |
>> was done, so i prefer to do this on a running system. / is obviously |
7 |
>> special, so this is a pro that fsck is logged, but of course if / has |
8 |
>> issue i'm not sure what systemd would do other than drop you to emergency |
9 |
> Mmmmh; |
10 |
> |
11 |
> centurion ~ # journalctl /usr/lib/systemd/systemd-fsck -b |
12 |
> -- Logs begin at Tue 2013-09-24 13:39:03 CDT, end at Sun 2014-02-23 |
13 |
> 11:37:30 CST. -- |
14 |
> Feb 18 23:49:16 centurion systemd-fsck[1047]: Centurion: clean, |
15 |
> 1054301/3389904 files, 10171017/13533184 blocks |
16 |
> Feb 18 23:49:17 centurion systemd-fsck[1531]: Data: clean, |
17 |
> 308819/30531584 files, 105744823/122096390 blocks |
18 |
> Feb 18 23:49:17 centurion systemd-fsck[1568]: Files: clean, |
19 |
> 509045/9773056 files, 20704341/39072470 blocks |
20 |
> |
21 |
> I mean; my file systems were clean, but if some output was generated, |
22 |
> it would be there. |
23 |
> |
24 |
> I don't think I understand what do you mean by "zero log"? |
25 |
|
26 |
using openrc if i reboot a system that requires fsck on /mnt/data it |
27 |
will do an fsck. but not log anything anywhere about the result, which |
28 |
is why i put this as a pro. |
29 |
does systemd have configurable options for '/' so that it can run |
30 |
readonly rather than dropping to emergency in case of problems? |
31 |
|
32 |
>>> It's been a while since I've read the source code, but it isn't in |
33 |
>>> src/activate/activate.c[3]? |
34 |
>> ok so it does look like it would have a systemd-activate process for each |
35 |
>> socket being activated on behalf of a service. that makes me feel better |
36 |
>> than one process doing all of them. perhaps someone using service |
37 |
>> activation can do a 'ps aux' to confirm? |
38 |
> It is one instance of systemd-activate for each socket; I don't have |
39 |
> any socket activated service waiting for the first connection at this |
40 |
> moment, but it's obvious from the source code, I believe. It waits in |
41 |
> a loop for a connection, if specified it accepts it, and then launches |
42 |
> the service. |
43 |
> |
44 |
> [ snip ] |
45 |
> |
46 |
>>>> 7.chroots no longer work. forcing use of nspawn to ensure environment |
47 |
>>>> set |
48 |
>>>> up correctly. |
49 |
>>> I'm sorry, chroot doesn't work? First time I heard about it. While |
50 |
>>> systemd-nspawn is a gazillion times better than a simple chroot, you |
51 |
>>> *can* still use a chroot if you so desire. Where did you found that |
52 |
>>> chroot doesn't works? |
53 |
>> agreed nspawn is better due to the filesystem namespaces. chroot itself |
54 |
>> works, but the environment doesn't so it is effectively broken. full |
55 |
>> explaination from lennart's blog [5] This is quite old so i don't know if |
56 |
>> this has been fixed, seems unlikely based on what he described |
57 |
> Oh, I see. Yeah; you cannot longer start a service inside a chroot; |
58 |
> but in the blog post you cited [5], there is a recipe to launch a |
59 |
> chroot inside a unit file, working around this limitation. And, if you |
60 |
> are running systemd and want jailed services, systemd-nspawn works so |
61 |
> much better. |
62 |
> |
63 |
> For non service-start-up-and-management stuff (for example, boot from |
64 |
> a non-systemd LiveCD and emerge something you forgot that you need), |
65 |
> chroot still works. |
66 |
> |
67 |
> So, there is a workaround if you want to keep using chroot for jailed |
68 |
> services, and there's a better alternative. |
69 |
> |
70 |
> [ snip ] |
71 |
> |
72 |
>>> networkd (again, netctl is the command-line front-end) is not for |
73 |
>>> enterprise networks; on the contrary, is for the trivial cases. For |
74 |
>>> example, in a little web server I administer I have: |
75 |
>>> |
76 |
>>> $ cat /etc/systemd/system/network.service |
77 |
>>> [Unit] |
78 |
>>> Description=Static network service |
79 |
>>> After=local-fs.target |
80 |
>>> Before=network.target |
81 |
>>> Documentation=man:ifconfig(8) |
82 |
>>> Documentation=man:route(8) |
83 |
>>> |
84 |
>>> [Service] |
85 |
>>> Type=oneshot |
86 |
>>> RemainAfterExit=yes |
87 |
>>> ExecStart=/bin/ifconfig enp2s12 192.168.1.2 broadcast 192.168.1.255 |
88 |
>>> netmask 255.255.255.0 up |
89 |
>>> ExecStart=/bin/route add default gw 192.168.1.1 enp2s12 |
90 |
>>> |
91 |
>>> [Install] |
92 |
>>> WantedBy=multi-user.target |
93 |
>>> |
94 |
>>> (Yeah, I know, I should switch to ip, I'm sorry, I haven't had the time |
95 |
>>> yet). |
96 |
>>> |
97 |
>>> I'm going to get rid of this trivial network.service unit file when |
98 |
>>> 209 (or better 210) hits Gentoo. Cases like this are the use-cases for |
99 |
>>> networkd. |
100 |
>> what i don't understand is if you look at how openRC does it, it only |
101 |
>> really cares about up/down events and the /etc/conf.d/net is very |
102 |
>> comprehensive, in part because it passes everything to iproute2 to handle, |
103 |
>> the only thing i can't do without an additional shell script is tc qdiscs. |
104 |
>> i don't need or want a network manager, just need something that applies |
105 |
>> confs on startup / stop of interfaces. I'm a little surprised that there |
106 |
>> isn't an iproute2 .service file |
107 |
>> |
108 |
>> reading through your example, in fact this is preferrable to me than using |
109 |
>> a network manager but using iproute2. I would rather you keep this |
110 |
>> example in, and have this shown on the wiki or somewhere as this neatly |
111 |
>> resolves my network concern. |
112 |
> Mmmh. Maybe I wasn't clear; in your case, it seems that |
113 |
> iproute2+OpenRC *is* your network manager. |
114 |
> |
115 |
> Perhaps at some point networkd will gain the ability to use iproute2 |
116 |
> (or even absorb it), but right now is only for tiny little setups. |
117 |
|
118 |
can you please clarify what you mean by absorbing iproute2? |
119 |
|
120 |
>>>> 10.strange gotchas: /tmp being tmpfs using up to 50% ram. unless |
121 |
>>>> mounted |
122 |
>>>> in fstab |
123 |
>>> That doesn't have nothing to do with systemd: from man:mount(8): |
124 |
>>> |
125 |
>>> """ |
126 |
>>> Mount options for tmpfs |
127 |
>>> size=nbytes |
128 |
>>> Override default maximum size of the filesystem. |
129 |
>>> The size is given in bytes, and rounded up to entire pages. The |
130 |
>>> default is half of the memory. The size parameter also |
131 |
>>> accepts a suffix % to limit this tmpfs instance to that |
132 |
>>> percentage of your physical RAM: the default, when neither size nor |
133 |
>>> nr_blocks is specified, is size=50% |
134 |
>>> """ |
135 |
>>> |
136 |
>>> systemd just mounts the tmpfs; the default *is* 50%. |
137 |
>>> |
138 |
>> I was just highlighting because someone could be putting systemd on |
139 |
>> embedded and wondering why memory usage increased over time. no issue if |
140 |
>> you have 8GB+, but if you have 256MB is an issue, and if you have less you |
141 |
>> are counting every byte. |
142 |
> Yeah, but again, it has nothing to do with systemd: the default *is* |
143 |
> 50% for tmpfs'. Embedded guys need to know this independently of if |
144 |
> they use systemd or not. |
145 |
the only reason that i bring this up is because if you _don't_ use |
146 |
systemd then /tmp is a folder hanging off / |
147 |
if you _do_ use systemd it will try to mount it tmpfs |
148 |
not everyone will realise this which is why i listed it as a 'gotcha' -- |
149 |
a nuance in working with it but not a major issue. |
150 |
> [ snip ] |
151 |
> |
152 |
>>>> 12.transitions into systemd are non-trivial. |
153 |
>>> No, they are not. |
154 |
>> i'm not talkign about new installs. |
155 |
> [ sniped rest with which I concur ] |
156 |
> |
157 |
> I'm sorry, I think I expressed myself incorrectly. When you said |
158 |
> "transitions into systemd are non-trivial", I answered "No, they are |
159 |
> not", meaning "No, they are not trivial". In other words, I agree with |
160 |
> you. |
161 |
> |
162 |
> Sorry for the confusion. |
163 |
|
164 |
thanks for the clearing up |
165 |
|
166 |
>> I think actually that i would just create an iproute2 service file for |
167 |
>> each device. so have no network manager at all and have the service file |
168 |
>> start after the interface. iproute2.enp2s0.service etc |
169 |
>> in there i would have "exec=/sbin/ip rule add" etc |
170 |
>> i'd also have "exec=/sbin/ip addr add" etc |
171 |
> Having a "network manager" doesn't necessarily means having a big |
172 |
> monolithic thing that sets up your network. If you use some |
173 |
> scripts+conf with iproute2 to set up your network, then *that's* your |
174 |
> network manager. |
175 |
> |
176 |
> The point of networkd (if I understand correctly), is that if you |
177 |
> *need* iproute2 (I don't have it installed in any of my machines), or |
178 |
> highly dynamic non-trivial network configurations, then networkd will |
179 |
> not be enough. |
180 |
> |
181 |
> And, by the way, someone make me notice that netctl is an Arch'ism, |
182 |
> and that the command-line front-end for networkd is actually |
183 |
> networkctl. |
184 |
> |
185 |
>>>> As Gentoo is a meta-distro (says Larry the Cow |
186 |
>>>> http://www.gentoo.org/main/en/about.xml) and a rolling release distro, |
187 |
>>>> I'm |
188 |
>>>> all for choice, but I would sincerely hope that unlike all of the other |
189 |
>>>> distributions from Arch to Ubuntu systemd is not adopted by default as |
190 |
>>>> udev and baselayout transitions were bad enough. |
191 |
>>> As a systemd supporter, at some point in the long, long future, I |
192 |
>>> would be more than happy if systemd was added to the handbook as |
193 |
>>> "secondary supported init system" in its own section. I'm completely |
194 |
>>> fine with OpenRC as the default. |
195 |
>> that would be the ideal way forwards |
196 |
> Glad to see you don't disapprove. |
197 |
> |
198 |
>>> Also (and I plan to work on this in the future), I would like to have |
199 |
>>> LiveCDs and stages with systemd installed (not necessarily hosted in |
200 |
>>> the Gentoo infrastructure), because is works really nicely install |
201 |
>>> Gentoo from systemd-nspawn instead of a chroot. |
202 |
>> actually I agree - even if it is only to get journactl on a bootable cd! |
203 |
> :D |
204 |
> |
205 |
>>> Someone would have to do that, though; I hope to help with that in the |
206 |
>>> future. |
207 |
>> to end on a merry note [6] and kind of why i wrote this |
208 |
> Thanks for sharing. |
209 |
> |
210 |
> Regards. |
211 |
> |
212 |
>>>> I will however be installing a systemd desktop in a vm to play properly. |
213 |
>>>> YMMV |
214 |
>>> Thanks again for a succinct, impartial and objective analysis of systemd. |
215 |
>> very welcome, hope this helps others |
216 |
>> |
217 |
>>> Regards. |
218 |
>>> |
219 |
>>> [1] |
220 |
>>> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.service?view=markup |
221 |
>>> [2] |
222 |
>>> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.socket?view=markup |
223 |
>>> [3] http://cgit.freedesktop.org/systemd/systemd/tree/src/activate |
224 |
> [ snip sig ] |
225 |
>> [4] http://wiki.gentoo.org/wiki/Systemd |
226 |
>> [5] http://0pointer.de/blog/projects/changing-roots.html |
227 |
>> [6] |
228 |
>> http://allpoetry.com/poem/9326367-Everybody--Anybody--Somebody--Nobody-and-Someone-Else-by-YoungDumbCrazy |