Re: [systemd-devel] working with PrivateNetwork=yes

2015-08-09 Thread Mantas Mikulėnas
systemd does not assign names to the namespaces – this is mostly an 'ip'
thing, though it has been requested for systemd earlier.

If you know a PID which is in that namespace (e.g. from 'systemctl show'),
you can use 'nsenter --net' to switch into that namespace.)

# nsenter --net --target $PID

You can also make it show up in 'ip netns' with the following:

# touch /run/netns/foobar
# mount --bind  /proc/$PID/ns/net  /run/netns/foobar

(However, if all involved services are stopped and then restarted, systemd
will not try to reuse the same netns (it doesn't care about the names), it
will just create a new one, and you'll have to re-do the above.)

-- 
Mantas Mikulėnas
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] working with PrivateNetwork=yes

2015-08-09 Thread Ido Barkan
Hi,

I am VDSM developer at Ovirt.
I am trying to run VDSM related service with PrivateNetwork=yes and 
JoinsNamespaceOf=
in order to isolate VDSM network operations from the host during system tests.

After I alter the service files, run 'systemctl daemon-reload' and restart the 
services
it seems like they are indeed isolated: the service local socket is no longer 
accessible.

But what if I want to hack in this network namespace?
or even know it's name?

'ip netns identify PID' and 'ip netns list' fail to discover it and I also 
could not find
any systemd command line that will show me where are my processes hide.


Thanks,
Ido

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] How to remove *~ journal files?

2015-08-09 Thread Mantas Mikulėnas
On Sun, Aug 9, 2015 at 9:57 AM, Andrei Borzenkov arvidj...@gmail.com
wrote:

 More than half of all files here are *~ files:

 bor@opensuse:~/src/systemd ls -1
 /var/log/journal/40527be2480f8cf60f4e8d4b06b0/*~ | wc -l
 85
 bor@opensuse:~/src/systemd ls -1
 /var/log/journal/40527be2480f8cf60f4e8d4b06b0/* | wc -l
 127

 If I understand it correctly they are corrupted files. Should not they
 have been deleted?


Well no, they still have your logs, and they're usually 99% readable.
Journald renames even uncleanly closed files to journal~, just in case.


 What is the correct procedure to remove them?


`rm`, or let journald's built-in log rotation take care of them.

-- 
Mantas Mikulėnas graw...@gmail.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] How to remove *~ journal files?

2015-08-09 Thread Andrei Borzenkov
More than half of all files here are *~ files:

bor@opensuse:~/src/systemd ls -1 
/var/log/journal/40527be2480f8cf60f4e8d4b06b0/*~ | wc -l
85
bor@opensuse:~/src/systemd ls -1 
/var/log/journal/40527be2480f8cf60f4e8d4b06b0/* | wc -l
127

If I understand it correctly they are corrupted files. Should not they
have been deleted? What is the correct procedure to remove them?
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] network configuration

2015-08-09 Thread Michał Zegan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Actually everything should be settable that can be done with ip-route
and ip-address and stuff...
And ip-rule, by the way.
But, no. Source= parameter in route sections is for source based
routing without adding rules, not to set a preferred source ip
address. Checked/tested.

W dniu 2015-08-09 o 18:21, Tomasz Torcz pisze:
 On Sun, Aug 09, 2015 at 05:58:40PM +0200, Michał Zegan wrote:
 
 It seems that systemd-networkd can not handle any kind of
 advanced network configurations, that is: It cannot handle policy
 routing and additional routing options like setting a src
 address,
 
 What about this: [Route] Section Options
 
 Source= The source prefix of the route. […]
 
 It does not ensure address ordering (if I have two addresses on 
 interface, which is first and which is second?)
 
 You can file enhancement request on GitHub.  I guess you want FLAG
 from man ip-address to be settable
 
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBAgAGBQJVx36TAAoJEHb1CzgxXKwYn0AQAKk5SEwpZ7D0XOLMLMUOi/Ih
s5tMdWMlChtqzfIdVZio6ntoezl4OfsTAqmuO/r7Q2/9aNik/iwCreNTi8pAF3CL
u8IM7IFpwvj+yW900MCpkwaop6FN2oefKUo4B+hn6Vz2bxM8IA2AGOce9acfGmFW
IFbqYp1gTCakynIHYRbTinKemWtSGxdM+d3eOFq1HDX77NPZlvYRF/wp7L0R23L8
2HFESnU2yKvzAzTDyULleNb67X7C/0w20i4nBFyJzFLnNOD1rIfpYDz+MjrYHJIT
kRySiX5Jhxc4Ae92EJoibsD7uSch8BQ2mjvC42eegZySDJxaAKnnuVcRbdWRwoqv
Osl/0XN4a4bt6e/D3q+tGSe922XiL4vhWxCPJUJ1OC2PHUeSPOXJEmCcffBm5D7f
WrRuqMNivpUPm54BGEHVezDwHXMRWoUWI8c4JtCNjT+6Cja0Dl8L2aG20zLJOPvN
cKxWDZgpMWjYZdbAV6WIq7/Re4FH3/QgAIlEgAuRlH8/Oj8nH+H2CXoYZnUv4F4b
Pn2FIZyUSEYKe6vpVUsVrHMvR8p8s0eJsS1puSLEVExI4Bz8pNINUBgmDNMUoL6E
wNseLnkVFSXURAaxSbUy6/ifflEYVdy3DLMEgCch4EajBpyRPY0RJyTgXji8OewM
l8UPy4ysPOg9Hpg4QWVK
=Czl4
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] network configuration

2015-08-09 Thread Tomasz Torcz
On Sun, Aug 09, 2015 at 05:58:40PM +0200, Michał Zegan wrote:
 
 It seems that systemd-networkd can not handle any kind of advanced
 network configurations, that is:
 It cannot handle policy routing and additional routing options like
 setting a src address,

  What about this:
[Route] Section Options

  Source=
The source prefix of the route. […]

 It does not ensure address ordering (if I have two addresses on
 interface, which is first and which is second?)

  You can file enhancement request on GitHub.  I guess you want
FLAG from man ip-address to be settable

-- 
Tomasz Torcz God, root, what's the difference?
xmpp: zdzich...@chrome.pl God is more forgiving.

___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] network configuration

2015-08-09 Thread Michał Zegan
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello.

It seems that systemd-networkd can not handle any kind of advanced
network configurations, that is:
It cannot handle policy routing and additional routing options like
setting a src address,
It does not ensure address ordering (if I have two addresses on
interface, which is first and which is second?)
-BEGIN PGP SIGNATURE-
Version: GnuPG v2

iQIcBAEBAgAGBQJVx3iuAAoJEHb1CzgxXKwYD1sQAJpG+BSlLEU6S5yP3Ibnkm2e
arA8I90lvgQmf4HGQ01kDehTZX790eDiwDBPd1WN4TnjJ2W5sZCOwVV5SKxIOVzj
sz2tI+0FIMJPnqmrLT9S9HBdvcjAWVrYVBWwgwW1ZkDsfJjwsZFdbY1rZcZzbTK+
Hg+teipEbXsvgIThWfUgjp0wTgruoR/IHqZD/bowdkfl61G6rYfsNSln+nacxqyK
pFSLsut9xxJOhmuafLagRUmCyzkXONiQtGbBmcBYWvygfoiDxKwUhjtgUSLoqKFe
71hnHhkSO8m42Y3rbgdW7ZV1OK/iDd15wkIX0EBIn+okpB09+XXujFT5tftdysK+
XTk47+0kJT/pYQ6QiMnth0yCbTOHeU+1WxnhVnAzvvSxQe3q33F2c5wqgQJQJ3nr
0yeV+wwr1po9JCMANFzoVkDD6XQkEg1in06Y789K780wU8OqllOfhxKYOAGOXKQR
oNW8jEeHs8413HD0rWKuGfhgOvleuEj5As2TP7+QFYui5Q5vgkQz9gIjekmpEZLt
Oex8u61NM+O5oko/yW8nkibXtboBpogMoZd6kEBkpFPL2oPiREIB9u+GXKN5QzUT
clXREAj8+iZq/Qft3edfmBLfhHrapzTqT47v6Bx6TaBDYBcpwPgzh6FqawwNqNuk
djUSD7Tc6mk0J/y9X9RE
=sLom
-END PGP SIGNATURE-
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] Failed at step RUNTIME_DIRECTORY spawning /usr/bin/true: File exists

2015-08-09 Thread Ivan Shapovalov
On 2015-08-06 at 15:01 +0200, Michael Biebl wrote:
 2015-08-06 14:43 GMT+02:00 Reindl Harald h.rei...@thelounge.net:
  well, but Type=simple is default and recommended everywhere 
  because there
  is no main-pid to guess and the with Restart=always monitored is 
  in fact
  ExecStart
 
 
 Actually, Type=simple has its own share of problems:
 https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=778913

That's a direct consequence of Type=simple semantics. From systemd's
standpoint, a daemon which crashes 10ms after start-up due to bad
config is indistinguishable from a daemon which crashes 10hrs after
starting due to an internal error.

To make things more robust, the daemon should either *properly*
implement Type=forking (i. e. fork only after initial start-up)
or it should implement Type=notify.

-- 
Ivan Shapovalov / intelfx /


signature.asc
Description: This is a digitally signed message part
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel