1 |
On Sun, Feb 23, 2014 at 5:06 AM, <thegeezer@×××××××××.net> wrote: |
2 |
[ snip ] |
3 |
>> Corrupt filesystems or logs? |
4 |
> |
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 |
|
10 |
Mmmmh; |
11 |
|
12 |
centurion ~ # journalctl /usr/lib/systemd/systemd-fsck -b |
13 |
-- Logs begin at Tue 2013-09-24 13:39:03 CDT, end at Sun 2014-02-23 |
14 |
11:37:30 CST. -- |
15 |
Feb 18 23:49:16 centurion systemd-fsck[1047]: Centurion: clean, |
16 |
1054301/3389904 files, 10171017/13533184 blocks |
17 |
Feb 18 23:49:17 centurion systemd-fsck[1531]: Data: clean, |
18 |
308819/30531584 files, 105744823/122096390 blocks |
19 |
Feb 18 23:49:17 centurion systemd-fsck[1568]: Files: clean, |
20 |
509045/9773056 files, 20704341/39072470 blocks |
21 |
|
22 |
I mean; my file systems were clean, but if some output was generated, |
23 |
it would be there. |
24 |
|
25 |
I don't think I understand what do you mean by "zero log"? |
26 |
|
27 |
>> It's been a while since I've read the source code, but it isn't in |
28 |
>> src/activate/activate.c[3]? |
29 |
> |
30 |
> ok so it does look like it would have a systemd-activate process for each |
31 |
> socket being activated on behalf of a service. that makes me feel better |
32 |
> than one process doing all of them. perhaps someone using service |
33 |
> activation can do a 'ps aux' to confirm? |
34 |
|
35 |
It is one instance of systemd-activate for each socket; I don't have |
36 |
any socket activated service waiting for the first connection at this |
37 |
moment, but it's obvious from the source code, I believe. It waits in |
38 |
a loop for a connection, if specified it accepts it, and then launches |
39 |
the service. |
40 |
|
41 |
[ snip ] |
42 |
|
43 |
>>> 7.chroots no longer work. forcing use of nspawn to ensure environment |
44 |
>>> set |
45 |
>>> up correctly. |
46 |
>> |
47 |
>> I'm sorry, chroot doesn't work? First time I heard about it. While |
48 |
>> systemd-nspawn is a gazillion times better than a simple chroot, you |
49 |
>> *can* still use a chroot if you so desire. Where did you found that |
50 |
>> chroot doesn't works? |
51 |
> |
52 |
> agreed nspawn is better due to the filesystem namespaces. chroot itself |
53 |
> works, but the environment doesn't so it is effectively broken. full |
54 |
> explaination from lennart's blog [5] This is quite old so i don't know if |
55 |
> this has been fixed, seems unlikely based on what he described |
56 |
|
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 |
> |
101 |
> what i don't understand is if you look at how openRC does it, it only |
102 |
> really cares about up/down events and the /etc/conf.d/net is very |
103 |
> comprehensive, in part because it passes everything to iproute2 to handle, |
104 |
> the only thing i can't do without an additional shell script is tc qdiscs. |
105 |
> i don't need or want a network manager, just need something that applies |
106 |
> confs on startup / stop of interfaces. I'm a little surprised that there |
107 |
> isn't an iproute2 .service file |
108 |
> |
109 |
> reading through your example, in fact this is preferrable to me than using |
110 |
> a network manager but using iproute2. I would rather you keep this |
111 |
> example in, and have this shown on the wiki or somewhere as this neatly |
112 |
> resolves my network concern. |
113 |
|
114 |
Mmmh. Maybe I wasn't clear; in your case, it seems that |
115 |
iproute2+OpenRC *is* your network manager. |
116 |
|
117 |
Perhaps at some point networkd will gain the ability to use iproute2 |
118 |
(or even absorb it), but right now is only for tiny little setups. |
119 |
|
120 |
>>> 10.strange gotchas: /tmp being tmpfs using up to 50% ram. unless |
121 |
>>> mounted |
122 |
>>> in fstab |
123 |
>> |
124 |
>> That doesn't have nothing to do with systemd: from man:mount(8): |
125 |
>> |
126 |
>> """ |
127 |
>> Mount options for tmpfs |
128 |
>> size=nbytes |
129 |
>> Override default maximum size of the filesystem. |
130 |
>> The size is given in bytes, and rounded up to entire pages. The |
131 |
>> default is half of the memory. The size parameter also |
132 |
>> accepts a suffix % to limit this tmpfs instance to that |
133 |
>> percentage of your physical RAM: the default, when neither size nor |
134 |
>> nr_blocks is specified, is size=50% |
135 |
>> """ |
136 |
>> |
137 |
>> systemd just mounts the tmpfs; the default *is* 50%. |
138 |
>> |
139 |
> |
140 |
> I was just highlighting because someone could be putting systemd on |
141 |
> embedded and wondering why memory usage increased over time. no issue if |
142 |
> you have 8GB+, but if you have 256MB is an issue, and if you have less you |
143 |
> are counting every byte. |
144 |
|
145 |
Yeah, but again, it has nothing to do with systemd: the default *is* |
146 |
50% for tmpfs'. Embedded guys need to know this independently of if |
147 |
they use systemd or not. |
148 |
|
149 |
[ snip ] |
150 |
|
151 |
>>> 12.transitions into systemd are non-trivial. |
152 |
>> |
153 |
>> No, they are not. |
154 |
> |
155 |
> i'm not talkign about new installs. |
156 |
|
157 |
[ sniped rest with which I concur ] |
158 |
|
159 |
I'm sorry, I think I expressed myself incorrectly. When you said |
160 |
"transitions into systemd are non-trivial", I answered "No, they are |
161 |
not", meaning "No, they are not trivial". In other words, I agree with |
162 |
you. |
163 |
|
164 |
Sorry for the confusion. |
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 |
|
172 |
Having a "network manager" doesn't necessarily means having a big |
173 |
monolithic thing that sets up your network. If you use some |
174 |
scripts+conf with iproute2 to set up your network, then *that's* your |
175 |
network manager. |
176 |
|
177 |
The point of networkd (if I understand correctly), is that if you |
178 |
*need* iproute2 (I don't have it installed in any of my machines), or |
179 |
highly dynamic non-trivial network configurations, then networkd will |
180 |
not be enough. |
181 |
|
182 |
And, by the way, someone make me notice that netctl is an Arch'ism, |
183 |
and that the command-line front-end for networkd is actually |
184 |
networkctl. |
185 |
|
186 |
>>> As Gentoo is a meta-distro (says Larry the Cow |
187 |
>>> http://www.gentoo.org/main/en/about.xml) and a rolling release distro, |
188 |
>>> I'm |
189 |
>>> all for choice, but I would sincerely hope that unlike all of the other |
190 |
>>> distributions from Arch to Ubuntu systemd is not adopted by default as |
191 |
>>> udev and baselayout transitions were bad enough. |
192 |
>> |
193 |
>> As a systemd supporter, at some point in the long, long future, I |
194 |
>> would be more than happy if systemd was added to the handbook as |
195 |
>> "secondary supported init system" in its own section. I'm completely |
196 |
>> fine with OpenRC as the default. |
197 |
> |
198 |
> that would be the ideal way forwards |
199 |
|
200 |
Glad to see you don't disapprove. |
201 |
|
202 |
>> Also (and I plan to work on this in the future), I would like to have |
203 |
>> LiveCDs and stages with systemd installed (not necessarily hosted in |
204 |
>> the Gentoo infrastructure), because is works really nicely install |
205 |
>> Gentoo from systemd-nspawn instead of a chroot. |
206 |
> |
207 |
> actually I agree - even if it is only to get journactl on a bootable cd! |
208 |
|
209 |
:D |
210 |
|
211 |
>> Someone would have to do that, though; I hope to help with that in the |
212 |
>> future. |
213 |
> |
214 |
> to end on a merry note [6] and kind of why i wrote this |
215 |
|
216 |
Thanks for sharing. |
217 |
|
218 |
Regards. |
219 |
|
220 |
>>> I will however be installing a systemd desktop in a vm to play properly. |
221 |
>>> YMMV |
222 |
>> |
223 |
>> Thanks again for a succinct, impartial and objective analysis of systemd. |
224 |
> |
225 |
> very welcome, hope this helps others |
226 |
> |
227 |
>> Regards. |
228 |
>> |
229 |
>> [1] |
230 |
>> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.service?view=markup |
231 |
>> [2] |
232 |
>> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.socket?view=markup |
233 |
>> [3] http://cgit.freedesktop.org/systemd/systemd/tree/src/activate |
234 |
[ snip sig ] |
235 |
> [4] http://wiki.gentoo.org/wiki/Systemd |
236 |
> [5] http://0pointer.de/blog/projects/changing-roots.html |
237 |
> [6] |
238 |
> http://allpoetry.com/poem/9326367-Everybody--Anybody--Somebody--Nobody-and-Someone-Else-by-YoungDumbCrazy |
239 |
-- |
240 |
Canek Peláez Valdés |
241 |
Posgrado en Ciencia e Ingeniería de la Computación |
242 |
Universidad Nacional Autónoma de México |