Re: [systemd-devel] [215] bridge with static network does not work

2014-10-24 Thread Gerardo Exequiel Pozzi
On 10/23/2014 02:06 PM, Tom Gundersen wrote:
 Hi Gerardo,

Hola Tom!

 
 Sorry to dig up this old thread. Are you incidentally able to
 reproduce this with current systemd/kernel? I am not able to on this
 end.

I just upgrade from 3.10.58 to 3.14.22 and with later the problem seems
fixed. Using systemd-216.

 
 FWIW, what I do is create bridge0 with networkd and set up a DHCP
 server on it, and start two containers with --network-bridge=bridge0.
 These containers can then reach eachother's IP addresses just fine.
 
 Did you do something differently? Are you able to observe any
 differences in the networkd created bridge and the brctl created one
 (according to the brctl output)?
 

A bit different, just in real hardware: static ip to br0 and attached
network card to br0.

$ cat /etc/systemd/network/br0.netdev
[NetDev]
Name=br0
Kind=bridge

$ cat /etc/systemd/network/br0.network
[Match]
Name=br0

[Network]
Address=192.168.0.77/24
Gateway=192.168.0.1

$ cat /etc/systemd/network/enp0s16.network
[Match]
Name=enp0s16

[Network]
Bridge=br0


In four cases (3.10.58 X 3.14.22) X (ip/brctl X networkd), the
difference is the macaddr of br0 as said in [#1], but now with
linux-3.14, even with a macaddr(br0) != macaddr(enp0s16) works fine.


Thanks.

[#1] https://bugs.freedesktop.org/show_bug.cgi?id=81979#c2


 Cheers,
 
 Tom
 




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [215] bridge with static network does not work

2014-07-29 Thread Gerardo Exequiel Pozzi
Hello,

Setting up a bridge with systemd-networkd does not works for me. Doing
things manually works. (no network, can not ping other hosts). Output of
ip addr looks same in both cases.

I am sure that I am doing things correctly, if not please let me know.
Thanks.

systemd-networkd config looks like:
# cat br0.netdev
[NetDev]
Name=br0
Kind=bridge

# cat br0.network
[Match]
Name=br0

[Network]
Address=192.168.0.77/24
Gateway=192.168.0.1

# cat enp0s16.network
[Match]
Name=enp0s16

[Network]
Bridge=br0

and manual commands for the same (works):

ip link add name br0 type bridge
ip addr add 192.168.0.77/24 broadcast + dev br0
ip link set dev enp0s16 master br0
ip link set dev br0 up
ip link set dev enp0s16 up
ip route add default via 192.168.0.1


In both cases the output of ip addr is:

2: enp0s16: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast
master br0 state UP group default qlen 1000
link/ether 00:17:31:bb:44:19 brd ff:ff:ff:ff:ff:ff
inet6 fe80::217:31ff:febb:4419/64 scope link
   valid_lft forever preferred_lft forever
8: br0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc noqueue state
UP group default
link/ether 00:17:31:bb:44:19 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.77/24 brd 192.168.0.255 scope global br0
   valid_lft forever preferred_lft forever
inet6 fe80::217:31ff:febb:4419/64 scope link
   valid_lft forever preferred_lft forever

and bridge fdb:

01:00:5e:00:00:01 dev enp0s16 self permanent
33:33:00:00:00:01 dev enp0s16 self permanent
33:33:ff:bb:44:19 dev enp0s16 self permanent
00:19:3e:ea:c5:54 dev enp0s16 vlan 0
00:21:29:98:d4:f3 dev enp0s16 vlan 0
00:17:31:bb:44:19 dev enp0s16 vlan 0 permanent


Have a nice day!




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [215] bridge with static network does not work

2014-07-29 Thread Gerardo Exequiel Pozzi
On 07/29/2014 06:24 PM, Gerardo Exequiel Pozzi wrote:
 Hello,
 
 Setting up a bridge with systemd-networkd does not works for me. Doing
 things manually works. (no network, can not ping other hosts). Output of
 ip addr looks same in both cases.
 
 I am sure that I am doing things correctly, if not please let me know.
 Thanks.

By the way, If after start networkd, I set br0 to promisc executing ip
link set br0 promisc on, network works fine, but of course now br0
shows PROMISC under ip link.

 
 systemd-networkd config looks like:
 # cat br0.netdev
 [NetDev]
 Name=br0
 Kind=bridge
 
 # cat br0.network
 [Match]
 Name=br0
 
 [Network]
 Address=192.168.0.77/24
 Gateway=192.168.0.1
 
 # cat enp0s16.network
 [Match]
 Name=enp0s16
 
 [Network]
 Bridge=br0
 
 and manual commands for the same (works):
 
 ip link add name br0 type bridge
 ip addr add 192.168.0.77/24 broadcast + dev br0
 ip link set dev enp0s16 master br0
 ip link set dev br0 up
 ip link set dev enp0s16 up
 ip route add default via 192.168.0.1
 
 
 In both cases the output of ip addr is:
 
 2: enp0s16: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc pfifo_fast
 master br0 state UP group default qlen 1000
 link/ether 00:17:31:bb:44:19 brd ff:ff:ff:ff:ff:ff
 inet6 fe80::217:31ff:febb:4419/64 scope link
valid_lft forever preferred_lft forever
 8: br0: BROADCAST,MULTICAST,UP,LOWER_UP mtu 1500 qdisc noqueue state
 UP group default
 link/ether 00:17:31:bb:44:19 brd ff:ff:ff:ff:ff:ff
 inet 192.168.0.77/24 brd 192.168.0.255 scope global br0
valid_lft forever preferred_lft forever
 inet6 fe80::217:31ff:febb:4419/64 scope link
valid_lft forever preferred_lft forever
 
 and bridge fdb:
 
 01:00:5e:00:00:01 dev enp0s16 self permanent
 33:33:00:00:00:01 dev enp0s16 self permanent
 33:33:ff:bb:44:19 dev enp0s16 self permanent
 00:19:3e:ea:c5:54 dev enp0s16 vlan 0
 00:21:29:98:d4:f3 dev enp0s16 vlan 0
 00:17:31:bb:44:19 dev enp0s16 vlan 0 permanent
 
 
 Have a nice day!
 
 




signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] regression in a4a878d0 (units: introduce network-pre.target...)

2014-06-27 Thread Gerardo Exequiel Pozzi
Hello

Looks like this commit also changes a unrelated file
(units/local-fs.target) reverting the commit 40f862e3 (filesystem
targets: disable default dependencies)

The side effect, at least in my case is that the nofail option in both
crypttab and fstab has partial effect does the default timeout
instead of continue normal boot without timeout.

Good luck!



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [ANNOUNCE] systemd 211

2014-03-12 Thread Gerardo Exequiel Pozzi
On 03/12/2014 06:23 AM, Thomas Bächler wrote:
 Am 12.03.2014 01:30, schrieb Lennart Poettering:
 Heya!

 Many bugfixes, and a number of new features:

 http://www.freedesktop.org/software/systemd/systemd-211.tar.xz   
  
   
 
 Nice.

I Agree :)

 
 CHANGES WITH 211:

 [...]

 * systemd-gpt-auto-generator is now able to discover /srv and
   root partitions in addition to /home and swap partitions. It
   also supports LUKS-encrypted partitions now. With this in
   place automatic discovery of partitions to mount following
   the Discoverable Partitions Specification
   
 (http://www.freedesktop.org/wiki/Specifications/DiscoverablePartitionsSpec)
   is now a lot more complete. This allows booting without
   /etc/fstab and without root= on the kernel command line on
   appropriately prepared systems.
 
 I had no time to look into this yet, but there's something wrong. I
 don't have GPT partitions on this machine (so the generator shouldn't do
 anyting), but I get an error during boot:
 
 [4.634733] evey systemd-gpt-auto-generator[226]: Out of memory.
 
 I do have plenty of free memory available, so there is probably an
 incorrect log_oom() somewhere in there.

Hi Thomas, I reported this issue here:
https://bugs.freedesktop.org/show_bug.cgi?id=76058


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


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [210] logind bypasses polkit? bug or new feature?

2014-03-10 Thread Gerardo Exequiel Pozzi
On 03/10/2014 06:48 AM, Djalal Harouni wrote:
 On Sun, Mar 09, 2014 at 08:00:22PM -0300, Gerardo Exequiel Pozzi wrote:
 Hello

 To do tests I made a new Arch Linux (x86_64) base installation running
 in qemu/kvm with systemd-210-3 and polkit-0.112-1 to discard any weird
 thing on my system.

 I can reboot/poweroff/suspend/hibernate the system with a normal user
 logged from a local VT or remote SSH does not care. I can not disable
 this even with a set of polkit rules.
 I am sure that this works fine before (maybe systemd-204 age?)
 Yes! I did notice that, normally it should return 'challenge' ?!

Yes. Except if you change it as I did to NO per custom rule.

Thanks.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [210] logind bypasses polkit? bug or new feature?

2014-03-10 Thread Gerardo Exequiel Pozzi
On 03/10/2014 12:10 PM, Zbigniew Jędrzejewski-Szmek wrote:
 On Mon, Mar 10, 2014 at 11:41:52AM -0300, Gerardo Exequiel Pozzi wrote:
 On 03/10/2014 06:48 AM, Djalal Harouni wrote:
 On Sun, Mar 09, 2014 at 08:00:22PM -0300, Gerardo Exequiel Pozzi wrote:
 Hello

 To do tests I made a new Arch Linux (x86_64) base installation running
 in qemu/kvm with systemd-210-3 and polkit-0.112-1 to discard any weird
 thing on my system.

 I can reboot/poweroff/suspend/hibernate the system with a normal user
 logged from a local VT or remote SSH does not care. I can not disable
 this even with a set of polkit rules.
 I am sure that this works fine before (maybe systemd-204 age?)
 Yes! I did notice that, normally it should return 'challenge' ?!

 Yes. Except if you change it as I did to NO per custom rule.
 
 Could you check if current git behaves as expected?
 
 Zbyszek
 
 

Perfecto, thanks you. :)
Aplying 055d4066 (logind: fix policykit checks) fixed the issue.


Now works as expected:

(with polkit rule to deny)
[djgera@host322 ~]$ systemctl reboot
Failed to execute operation: Access denied
Failed to start reboot.target: Access denied
[djgera@host322 ~]$

Without polkit installed at all:
[djgera@host322 ~]$ systemctl reboot
Failed to execute operation: The name org.freedesktop.PolicyKit1 was not
provided by any .service files
Must be root.
[djgera@host322 ~]$


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [210] logind bypasses polkit? bug or new feature?

2014-03-09 Thread Gerardo Exequiel Pozzi
Hello

To do tests I made a new Arch Linux (x86_64) base installation running
in qemu/kvm with systemd-210-3 and polkit-0.112-1 to discard any weird
thing on my system.

I can reboot/poweroff/suspend/hibernate the system with a normal user
logged from a local VT or remote SSH does not care. I can not disable
this even with a set of polkit rules.
I am sure that this works fine before (maybe systemd-204 age?)

The weird thing here, is that If I ask to login1 about Can* methods it
returns 'no'. Also system can be rebooted or poweroff if other users are
logged on the system (i.e root on tty1).


I have another question: If polkit is not installed at all, what is
supposed to happens on these actions? Because I can reboot/poweroff/etc
by default, is this right?

Thanks in advance.


[djgera@host322 ~]$ loginctl show-user djgera
UID=1000
GID=1000
Name=djgera
Timestamp=Sun 2014-03-09 19:29:33 ART
TimestampMonotonic=16659804
RuntimePath=/run/user/1000
Service=user@1000.service
Slice=user-1000.slice
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0
Linger=no

[djgera@host322 ~]$ loginctl show-session 1
Id=1
Name=djgera
Timestamp=Sun 2014-03-09 19:29:33 ART
TimestampMonotonic=16673677
VTNr=0
Remote=yes
RemoteHost=192.168.0.77
Service=sshd
Scope=session-1.scope
Leader=166
Audit=1
Type=tty
Class=user
Active=yes
State=active
IdleHint=no
IdleSinceHint=0
IdleSinceHintMonotonic=0

[djgera@host322 ~]$ gdbus call --system --dest org.freedesktop.login1
--object-path /org/freedesktop/login1 --method
org.freedesktop.login1.Manager.CanReboot
('no',)
[djgera@host322 ~]$ gdbus call --system --dest org.freedesktop.login1
--object-path /org/freedesktop/login1 --method
org.freedesktop.login1.Manager.Reboot true
()
Connection to 192.168.0.218 closed by remote host.
Connection to 192.168.0.218 closed.


[djgera@host322 ~]$ reboot
User root is logged in on tty1.
Please retry operation after closing inhibitors and logging out other users.
Alternatively, ignore inhibitors and users with 'systemctl reboot -i'.
[djgera@host322 ~]$ gdbus call --system --dest org.freedesktop.login1
--object-path /org/freedesktop/login1 --method
org.freedesktop.login1.Manager.Reboot true
()
Connection to 192.168.0.218 closed by remote host.
Connection to 192.168.0.218 closed.
[djgera@exequiel ~]$




-
/etc/polkit-1/rules.d/69-djgera.rules

polkit.addRule(function(action, subject) {
if (action.id == org.freedesktop.login1.power-off ||
action.id == org.freedesktop.login1.power-off-ignore-inhibit ||
action.id == org.freedesktop.login1.power-off-multiple-sessions ||
action.id == org.freedesktop.login1.reboot ||
action.id == org.freedesktop.login1.reboot-ignore-inhibit ||
action.id == org.freedesktop.login1.reboot-multiple-sessions ||
action.id == org.freedesktop.login1.hibernate ||
action.id == org.freedesktop.login1.hibernate-ignore-inhibit ||
action.id == org.freedesktop.login1.hibernate-multiple-sessions ||
action.id == org.freedesktop.login1.suspend ||
action.id == org.freedesktop.login1.suspend-ignore-inhibit ||
action.id == org.freedesktop.login1.suspend-multiple-sessions) {
return polkit.Result.NO;
}
});
-

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] After poweroff nspawn container can not be started again (with 207)

2013-09-22 Thread Gerardo Exequiel Pozzi
Hello

This works fine with systemd-204.
(Running on Linux-3.8.11)

# cat /etc/systemd/system/systemd-nspawn@.socket
[Unit]
Description=The SSH socket of ARCH container in port %I

[Socket]
ListenStream=%I



starting first time:
systemd[1]: Starting Container 2...
systemd-nspawn[272]: Spawning namespace container on /container/arch
(console is /dev/pts/1).
systemd-nspawn[272]: Init process in the container running as PID 275.
systemd[1]: Started Container 2.
dbus-daemon[200]: dbus[200]: [system] Activating via systemd: service
name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
dbus[200]: [system] Activating via systemd: service
name='org.freedesktop.machine1' unit='dbus-org.freedesktop.machine1.service'
systemd[1]: Starting Virtual Machine and Container Slice.
systemd[1]: Created slice Virtual Machine and Container Slice.
systemd[1]: Starting Virtual Machine and Container Registration Service...
dbus-daemon[200]: dbus[200]: [system] Successfully activated service
'org.freedesktop.machine1'
dbus[200]: [system] Successfully activated service
'org.freedesktop.machine1'
systemd[1]: Started Virtual Machine and Container Registration Service.
systemd-machined[276]: New machine arch.
systemd[1]: Starting Container arch.
systemd[1]: Started Container arch.
systemd-nspawn[272]: systemd 204 running in system mode. (+PAM -LIBWRAP
-AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
systemd-nspawn[272]: Detected virtualization 'systemd-nspawn'.
systemd-nspawn[272]: Welcome to Arch Linux!


After poweroff:
systemd-nspawn[272]: Sending SIGTERM to remaining processes...
systemd-nspawn[272]: Sending SIGKILL to remaining processes...
systemd-nspawn[272]: Unmounting file systems.
systemd-nspawn[272]: Unmounting /sys/kernel/debug.
systemd-nspawn[272]: Unmounting /sys/kernel/config.
systemd-nspawn[272]: Unmounting /dev/hugepages.
systemd-nspawn[272]: Unmounting /dev/mqueue.
systemd-nspawn[272]: All filesystems unmounted.
systemd-nspawn[272]: Storage is finalized.
systemd-nspawn[272]: Container has been shut down.


Trying to start again:
systemd[1]: Starting Container 2...
systemd-nspawn[339]: Spawning namespace container on /container/arch
(console is /dev/pts/1).
systemd-nspawn[339]: Init process in the container running as PID 342.
systemd[1]: Started Container 2.
systemd-nspawn[339]: Failed to register machine: File exists
systemd-nspawn[339]: Container failed with error code 239.
systemd[1]: systemd-nspawn@2.service: main process exited,
code=exited, status=239/n/a
systemd[1]: Unit systemd-nspawn@2.service entered failed state.
...
...
...
systemd[1]: Starting Container 2...
systemd[1]: systemd-nspawn@2.service start request repeated too
quickly, refusing to start.
systemd[1]: Failed to start Container 2.
systemd[1]: Unit systemd-nspawn@2.socket entered failed state.



I can start it again, but only one time, after doing:
# machinectl terminate arch
# systemctl stop systemd-nspawn@2.socket
# systemctl stop systemd-nspawn@2.service
# systemctl start systemd-nspawn@2.socket

But after a second poweroff, there is no way to be started again, I
guess because of:
# systemctl status machine-arch.scope
machine-arch.scope - Container arch
   Loaded: loaded (/run/systemd/system/machine-arch.scope; static)
  Drop-In: /run/systemd/system/machine-arch.scope.d
   └─90-Description.conf, 90-TimeoutStopUSec.conf
   Active: failed (Result: timeout) since Sun 2013-09-22 16:10:04 ART;
5min ago

Logs:
systemd[1]: Starting Container 2...
systemd-nspawn[1025]: Spawning namespace container on /container/arch
(console is /dev/pts/1).
systemd-nspawn[1025]: Init process in the container running as PID 1028.
systemd[1]: Started Container 2.
systemd-machined[882]: Failed to start machine scope: Unit
machine-arch.scope already exists.
systemd-nspawn[1025]: Failed to register machine: Input/output error
systemd-nspawn[1025]: Container failed with error code 251.
systemd[1]: systemd-nspawn@2.service: main process exited,
code=exited, status=251/n/a
systemd[1]: Unit systemd-nspawn@2.service entered failed state.



-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] After poweroff nspawn container can not be started again (with 207)

2013-09-22 Thread Gerardo Exequiel Pozzi
On 09/22/2013 05:15 PM, Maksim Melnikau wrote:
 Looks like your problem similar
 to https://bugs.freedesktop.org/show_bug.cgi?id=68370 

Thanks. Seems to be the same issue.

 
 
 On Sun, Sep 22, 2013 at 10:24 PM, Gerardo Exequiel Pozzi
 vmlinuz...@yahoo.com.ar mailto:vmlinuz...@yahoo.com.ar wrote:
 
 Hello
 
 This works fine with systemd-204.
 (Running on Linux-3.8.11)
 
 # cat /etc/systemd/system/systemd-nspawn@.socket
 [Unit]
 Description=The SSH socket of ARCH container in port %I
 
 [Socket]
 ListenStream=%I
 
 
 
 starting first time:
 systemd[1]: Starting Container 2...
 systemd-nspawn[272]: Spawning namespace container on /container/arch
 (console is /dev/pts/1).
 systemd-nspawn[272]: Init process in the container running as PID 275.
 systemd[1]: Started Container 2.
 dbus-daemon[200]: dbus[200]: [system] Activating via systemd: service
 name='org.freedesktop.machine1'
 unit='dbus-org.freedesktop.machine1.service'
 dbus[200]: [system] Activating via systemd: service
 name='org.freedesktop.machine1'
 unit='dbus-org.freedesktop.machine1.service'
 systemd[1]: Starting Virtual Machine and Container Slice.
 systemd[1]: Created slice Virtual Machine and Container Slice.
 systemd[1]: Starting Virtual Machine and Container Registration
 Service...
 dbus-daemon[200]: dbus[200]: [system] Successfully activated service
 'org.freedesktop.machine1'
 dbus[200]: [system] Successfully activated service
 'org.freedesktop.machine1'
 systemd[1]: Started Virtual Machine and Container Registration Service.
 systemd-machined[276]: New machine arch.
 systemd[1]: Starting Container arch.
 systemd[1]: Started Container arch.
 systemd-nspawn[272]: systemd 204 running in system mode. (+PAM -LIBWRAP
 -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
 systemd-nspawn[272]: Detected virtualization 'systemd-nspawn'.
 systemd-nspawn[272]: Welcome to Arch Linux!
 
 
 After poweroff:
 systemd-nspawn[272]: Sending SIGTERM to remaining processes...
 systemd-nspawn[272]: Sending SIGKILL to remaining processes...
 systemd-nspawn[272]: Unmounting file systems.
 systemd-nspawn[272]: Unmounting /sys/kernel/debug.
 systemd-nspawn[272]: Unmounting /sys/kernel/config.
 systemd-nspawn[272]: Unmounting /dev/hugepages.
 systemd-nspawn[272]: Unmounting /dev/mqueue.
 systemd-nspawn[272]: All filesystems unmounted.
 systemd-nspawn[272]: Storage is finalized.
 systemd-nspawn[272]: Container has been shut down.
 
 
 Trying to start again:
 systemd[1]: Starting Container 2...
 systemd-nspawn[339]: Spawning namespace container on /container/arch
 (console is /dev/pts/1).
 systemd-nspawn[339]: Init process in the container running as PID 342.
 systemd[1]: Started Container 2.
 systemd-nspawn[339]: Failed to register machine: File exists
 systemd-nspawn[339]: Container failed with error code 239.
 systemd[1]: systemd-nspawn@2.service: main process exited,
 code=exited, status=239/n/a
 systemd[1]: Unit systemd-nspawn@2.service entered failed state.
 ...
 ...
 ...
 systemd[1]: Starting Container 2...
 systemd[1]: systemd-nspawn@2.service start request repeated too
 quickly, refusing to start.
 systemd[1]: Failed to start Container 2.
 systemd[1]: Unit systemd-nspawn@2.socket entered failed state.
 
 
 
 I can start it again, but only one time, after doing:
 # machinectl terminate arch
 # systemctl stop systemd-nspawn@2.socket
 # systemctl stop systemd-nspawn@2.service
 # systemctl start systemd-nspawn@2.socket
 
 But after a second poweroff, there is no way to be started again, I
 guess because of:
 # systemctl status machine-arch.scope
 machine-arch.scope - Container arch
Loaded: loaded (/run/systemd/system/machine-arch.scope; static)
   Drop-In: /run/systemd/system/machine-arch.scope.d
└─90-Description.conf, 90-TimeoutStopUSec.conf
Active: failed (Result: timeout) since Sun 2013-09-22 16:10:04 ART;
 5min ago
 
 Logs:
 systemd[1]: Starting Container 2...
 systemd-nspawn[1025]: Spawning namespace container on /container/arch
 (console is /dev/pts/1).
 systemd-nspawn[1025]: Init process in the container running as PID 1028.
 systemd[1]: Started Container 2.
 systemd-machined[882]: Failed to start machine scope: Unit
 machine-arch.scope already exists.
 systemd-nspawn[1025]: Failed to register machine: Input/output error
 systemd-nspawn[1025]: Container failed with error code 251.
 systemd[1]: systemd-nspawn@2.service: main process exited,
 code=exited, status=251/n/a
 systemd[1]: Unit systemd-nspawn@2.service entered failed state.
 
 
 
 --
 Gerardo Exequiel Pozzi
 \cos^2\alpha

Re: [systemd-devel] Kernel messages in journal - how?

2013-09-06 Thread Gerardo Exequiel Pozzi
On 09/06/2013 01:53 PM, Warpme wrote:
 Hi *
 I decided to remove completely syslog daemon from my Arch based server
 (my Arch is at 3.3.8 kernel level).
 I manages so far all units so kicking journalctl shows output from all
 units but there is no messages from kernel boot phase.
 When I look on journal output in Fedora19 - kernel boot messages are
 present - so this is possible.
 
 So I have Q: how should I configure systemd in my Arch server to get
 kernel messages in journal?
 
 My journald.conf and system.conf are all with default settings (all
 settings are commented out).
 My server has kernel 3.3.8 and systmd-195. I also tried with
 systemd-206. No difference: kernel boot still not logged in journal :-(
 
 Thx in advance.
 

Update your kernel. From NEWS files:

CHANGES WITH 189:

* Support for reading structured kernel messages from
  /dev/kmsg has now been added and is enabled by default.

* Support for reading kernel messages from /proc/kmsg has now
  been removed. If you want kernel messages in the journal
  make sure to run a recent kernel (= 3.5) that supports
  reading structured messages from /dev/kmsg (see
  above). /proc/kmsg is now exclusive property of classic
  syslog daemons again.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [Feature request] A way to native import /proc/cmdline within unit

2013-07-29 Thread Gerardo Exequiel Pozzi
On 07/29/2013 08:12 PM, Lennart Poettering wrote:
 On Thu, 25.07.13 19:35, Gerardo Exequiel Pozzi (vmlinuz...@yahoo.com.ar) 
 wrote:
 
 On 07/25/2013 05:06 PM, Lennart Poettering wrote:
 On Sat, 20.07.13 16:37, Gerardo Exequiel Pozzi (vmlinuz...@yahoo.com.ar) 
 wrote:

 Hello

 I am maintainer of Archiso project (The Arch Linux live ISO creator).

 I like a feature for systemd within unit files, mainly for importing
 /proc/cmdline in initramfs stage, or in a generic form for any other
 file with a similar format. Something like ImportOneLineFile=, like
 current EnvironmentFile=.

 In this way, we can use/pass parameters to Exec*= directives if needed.

 So you awant to import kernel cmdline arguments into your environment?

 Yes, in a particular unit.

 Note that you can do that already with the systemd.setenv= kernel
 command line option. What else do you need?


 Yes. But doing in this way:

 * Makes each variable passed, global to all units.
 * For each parameter that I need to process I need to prefix them.

 So for example
 archisobasedir=arch archisolabel=ARCH_201307 checksum=y
 becomes:
 systemd.setenv=archisobasedir=arch
 systemd.setenv=archisolabel=ARCH_201307 systemd.setenv=checksum=y

 And if booting via PXE, think about automatic cmdline appended by
 ip=... PXELINUX/IPAPPEND...

 The other solution that I have is using a service+script for
 parsing/dumping cmdline in a file, then import with EnvironmentFile= but
 does not look good. Other way maybe is using a generator, but they run
 too early and I need to wait for some things happens before generating
 units in a dynamic way.
 
 Hmm, but how do you process those variables further? In a shell script
 anyway? That sounds as if it would be appropriate to also parse
 /proc/cmdline from there? Why would it be better to do this in systemd
 rather than in the shell script itself?
 
 (or similar: better than in the Pythons script itself, Perl script, C
 program ...)
 
 Lennart
 

In inside systemd unit, I want to avoid shell script if possible, using
units only, doing things in a systemd way. Anyway for complex tasks
where systemd does not fit, scripting seems to be necessary.

ExecStart=/usr/bin/program --param=$CMDLINE__ARG_VALUE ...

I think is better because systemd already parse /proc/cmdline, and I
guess that implementing this is easy, but maybe I am wrong.

Thanks for your feedback.

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [PATCH] Drop ConditionCapability=CAP_MKNOD from *udev* units

2013-07-25 Thread Gerardo Exequiel Pozzi
On 07/25/2013 02:00 PM, Lennart Poettering wrote:
 On Wed, 24.07.13 18:41, Gerardo Exequiel Pozzi (vmlinuz...@yahoo.com.ar) 
 wrote:
 
 We generally try to make conditions specific to a feature rather than an
 execution environment. Containers should run without CAP_MKMNOD, and as
 udev originally was in the business of creating device nodes we hence
 bound it to this capability.
 

OK

 Now, since very recently udev doesn'#t create a single device node
 anymore (it's all done by the kernel in devtmpfs/container manager and
 tmpfiles now), so it probably would make sense to change the capability
 check, but certainly not remove it. (I'd vote by replacing it by
 ConditionPathIsReadWrite=/sys since sane container managers mount that
 read-only.)
 

Exactly.

 Anyway, I don't get what you are trying to achieve by your patch please
 elaborate.

My thought was simple: Hey! what is doing CAP_MKNOD here since is not
needed anymore for udev, remove them!. Ok course, I did not think in
containers, my bad.

Anyway, this should be changed to something more obvious thing for
testing about running environment.

Q: If udev should not run in container why not udevd itself check about
this?

Thanks for your feedback.


 
 Signed-off-by: Gerardo Exequiel Pozzi vmlinuz...@yahoo.com.ar
 ---
  units/systemd-udev-settle.service.in  | 1 -
  units/systemd-udev-trigger.service.in | 1 -
  units/systemd-udevd-control.socket| 1 -
  units/systemd-udevd-kernel.socket | 1 -
  4 files changed, 4 deletions(-)

 diff --git a/units/systemd-udev-settle.service.in 
 b/units/systemd-udev-settle.service.in
 index 037dd9a..148aa9d 100644
 --- a/units/systemd-udev-settle.service.in
 +++ b/units/systemd-udev-settle.service.in
 @@ -16,7 +16,6 @@ DefaultDependencies=no
  Wants=systemd-udevd.service
  After=systemd-udev-trigger.service
  Before=sysinit.target
 -ConditionCapability=CAP_MKNOD
  
  [Service]
  Type=oneshot
 diff --git a/units/systemd-udev-trigger.service.in 
 b/units/systemd-udev-trigger.service.in
 index 604c369..ea3cb62 100644
 --- a/units/systemd-udev-trigger.service.in
 +++ b/units/systemd-udev-trigger.service.in
 @@ -12,7 +12,6 @@ DefaultDependencies=no
  Wants=systemd-udevd.service
  After=systemd-udevd-kernel.socket systemd-udevd-control.socket
  Before=sysinit.target
 -ConditionCapability=CAP_MKNOD
  
  [Service]
  Type=oneshot
 diff --git a/units/systemd-udevd-control.socket 
 b/units/systemd-udevd-control.socket
 index ca17102..12a66d2 100644
 --- a/units/systemd-udevd-control.socket
 +++ b/units/systemd-udevd-control.socket
 @@ -10,7 +10,6 @@ Description=udev Control Socket
  Documentation=man:systemd-udevd.service(8) man:udev(7)
  DefaultDependencies=no
  Before=sockets.target
 -ConditionCapability=CAP_MKNOD
  
  [Socket]
  Service=systemd-udevd.service
 diff --git a/units/systemd-udevd-kernel.socket 
 b/units/systemd-udevd-kernel.socket
 index 4b8a5b0..64e6f63 100644
 --- a/units/systemd-udevd-kernel.socket
 +++ b/units/systemd-udevd-kernel.socket
 @@ -10,7 +10,6 @@ Description=udev Kernel Socket
  Documentation=man:systemd-udevd.service(8) man:udev(7)
  DefaultDependencies=no
  Before=sockets.target
 -ConditionCapability=CAP_MKNOD
  
  [Socket]
  Service=systemd-udevd.service
 
 
 Lennart
 


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] [Feature request] A way to native import /proc/cmdline within unit

2013-07-25 Thread Gerardo Exequiel Pozzi
On 07/25/2013 05:06 PM, Lennart Poettering wrote:
 On Sat, 20.07.13 16:37, Gerardo Exequiel Pozzi (vmlinuz...@yahoo.com.ar) 
 wrote:
 
 Hello

 I am maintainer of Archiso project (The Arch Linux live ISO creator).

 I like a feature for systemd within unit files, mainly for importing
 /proc/cmdline in initramfs stage, or in a generic form for any other
 file with a similar format. Something like ImportOneLineFile=, like
 current EnvironmentFile=.

 In this way, we can use/pass parameters to Exec*= directives if needed.
 
 So you awant to import kernel cmdline arguments into your environment?

Yes, in a particular unit.

 Note that you can do that already with the systemd.setenv= kernel
 command line option. What else do you need?
 

Yes. But doing in this way:

* Makes each variable passed, global to all units.
* For each parameter that I need to process I need to prefix them.

So for example
archisobasedir=arch archisolabel=ARCH_201307 checksum=y
becomes:
systemd.setenv=archisobasedir=arch
systemd.setenv=archisolabel=ARCH_201307 systemd.setenv=checksum=y

And if booting via PXE, think about automatic cmdline appended by
ip=... PXELINUX/IPAPPEND...

The other solution that I have is using a service+script for
parsing/dumping cmdline in a file, then import with EnvironmentFile= but
does not look good. Other way maybe is using a generator, but they run
too early and I need to wait for some things happens before generating
units in a dynamic way.

 Lennart
 

Thanks for your attention.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [206] Randomly on shutdown, stop timeout for user@.service

2013-07-24 Thread Gerardo Exequiel Pozzi
Hello

I am using Arch Linux, and testing systemd-206 with linux-3.10.2 on
shutdown, sometimes randomly there is a long delay until user@0.service
timeouts then systemd kills it.

1) Boot machine
2) Login as root
3) Execute systemctl reboot or reboot/poweroff/etc.

I see this behaviour in a real machine and in a new clean install inside
qemu.
I am using ttyS0 just for testing, but this does not care, using normal
console also happens.

systemctl status [#1]
journalctl [#2]

If more info or any tests are needed please let me know. Thanks.

[#1] http://pastebin.com/7JXNyv0T
[#2] http://pastebin.com/2MTr3M1n

-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] [PATCH] Drop ConditionCapability=CAP_MKNOD from *udev* units

2013-07-24 Thread Gerardo Exequiel Pozzi
Signed-off-by: Gerardo Exequiel Pozzi vmlinuz...@yahoo.com.ar
---
 units/systemd-udev-settle.service.in  | 1 -
 units/systemd-udev-trigger.service.in | 1 -
 units/systemd-udevd-control.socket| 1 -
 units/systemd-udevd-kernel.socket | 1 -
 4 files changed, 4 deletions(-)

diff --git a/units/systemd-udev-settle.service.in 
b/units/systemd-udev-settle.service.in
index 037dd9a..148aa9d 100644
--- a/units/systemd-udev-settle.service.in
+++ b/units/systemd-udev-settle.service.in
@@ -16,7 +16,6 @@ DefaultDependencies=no
 Wants=systemd-udevd.service
 After=systemd-udev-trigger.service
 Before=sysinit.target
-ConditionCapability=CAP_MKNOD
 
 [Service]
 Type=oneshot
diff --git a/units/systemd-udev-trigger.service.in 
b/units/systemd-udev-trigger.service.in
index 604c369..ea3cb62 100644
--- a/units/systemd-udev-trigger.service.in
+++ b/units/systemd-udev-trigger.service.in
@@ -12,7 +12,6 @@ DefaultDependencies=no
 Wants=systemd-udevd.service
 After=systemd-udevd-kernel.socket systemd-udevd-control.socket
 Before=sysinit.target
-ConditionCapability=CAP_MKNOD
 
 [Service]
 Type=oneshot
diff --git a/units/systemd-udevd-control.socket 
b/units/systemd-udevd-control.socket
index ca17102..12a66d2 100644
--- a/units/systemd-udevd-control.socket
+++ b/units/systemd-udevd-control.socket
@@ -10,7 +10,6 @@ Description=udev Control Socket
 Documentation=man:systemd-udevd.service(8) man:udev(7)
 DefaultDependencies=no
 Before=sockets.target
-ConditionCapability=CAP_MKNOD
 
 [Socket]
 Service=systemd-udevd.service
diff --git a/units/systemd-udevd-kernel.socket 
b/units/systemd-udevd-kernel.socket
index 4b8a5b0..64e6f63 100644
--- a/units/systemd-udevd-kernel.socket
+++ b/units/systemd-udevd-kernel.socket
@@ -10,7 +10,6 @@ Description=udev Kernel Socket
 Documentation=man:systemd-udevd.service(8) man:udev(7)
 DefaultDependencies=no
 Before=sockets.target
-ConditionCapability=CAP_MKNOD
 
 [Socket]
 Service=systemd-udevd.service
-- 
1.8.3.3

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


[systemd-devel] [Feature request] A way to native import /proc/cmdline within unit

2013-07-20 Thread Gerardo Exequiel Pozzi
Hello

I am maintainer of Archiso project (The Arch Linux live ISO creator).

I like a feature for systemd within unit files, mainly for importing
/proc/cmdline in initramfs stage, or in a generic form for any other
file with a similar format. Something like ImportOneLineFile=, like
current EnvironmentFile=.

In this way, we can use/pass parameters to Exec*= directives if needed.

Thanks you.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] Random busy while renaming net interface on KVM

2013-01-31 Thread Gerardo Exequiel Pozzi
Hello

During testing Arch Linux ISO under KVM (1.2.0) (using systemd 197),
looks like when rename rules must be applied network interface is still
busy.

You can see on the journal, when things goes bad:


Jan 31 16:27:53 archiso kernel: pci :00:03.0: [10ec:8139] type 00
class 0x02
Jan 31 16:27:53 archiso kernel: 8139cp: 8139cp: 10/100 PCI Ethernet
driver v1.3 (Mar 22, 2004)
Jan 31 16:27:53 archiso kernel: 8139cp :00:03.0 eth0: RTL-8139C+ at
0xc894e000, 52:54:00:12:34:56, IRQ 11
Jan 31 16:27:53 archiso kernel: 8139cp :00:03.0: setting latency
timer to 64
Jan 31 16:27:53 archiso kernel: 8139too: 8139too Fast Ethernet driver 0.9.28
Jan 31 16:27:53 archiso kernel: 8139cp :00:03.0 eth0: link up,
100Mbps, full-duplex, lpa 0x05E1
Jan 31 16:27:54 archiso systemd-udevd[171]: error changing net interface
name eth0 to enp0s3: Device or resource busy

and good:

Jan 31 16:29:14 archiso kernel: pci :00:03.0: [10ec:8139] type 00
class 0x02
Jan 31 16:29:14 archiso kernel: 8139cp: 8139cp: 10/100 PCI Ethernet
driver v1.3 (Mar 22, 2004)
Jan 31 16:29:14 archiso kernel: 8139cp :00:03.0 eth0: RTL-8139C+ at
0xc895c000, 52:54:00:12:34:56, IRQ 11
Jan 31 16:29:14 archiso kernel: 8139cp :00:03.0: setting latency
timer to 64
Jan 31 16:29:14 archiso kernel: 8139too: 8139too Fast Ethernet driver 0.9.28
Jan 31 16:29:14 archiso systemd-udevd[150]: renamed network interface
eth0 to enp0s3
Jan 31 16:29:14 archiso kernel: 8139cp :00:03.0 enp0s3: link up,
100Mbps, full-duplex, lpa 0x05E1


If more info is needed please let me know.


-- 
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1



signature.asc
Description: OpenPGP digital signature
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd intentional behaviour? (signals)

2012-09-07 Thread Gerardo Exequiel Pozzi

On 09/07/2012 01:48 PM, Lennart Poettering wrote:

On Fri, 24.08.12 00:54, Gerardo Exequiel Pozzi (vmlinuz...@yahoo.com.ar) wrote:


Hello

Just for fun I am sending some signals to systemd (188) to see how
reacts compared to sysvinit. While sysvinit ignores them or restores
from crash after 30 seconds of sleep, systemd/journald just logs
the status them freezing execution.

Example

kill -SEGV 1 - freeze
kill -QUIT 1 - freeze

Sending other signal again result in a crash (attemped to kill init)

Is this intentional? There is a way to restore systemd again without
a forced reboot?

Yes, this is intentional. If we crash (or the user kills us) we print a
warning and freeze. If the user kills us again then we return control to
the kernel. Sounds like a really reasonable reaction to some really
pointless action by the user.

I mean, the user issued the kill commands, hence he probably has a
reason to, even if that reason is I want to shoot myself in the
foot -- and hence we do what we do.

Lennart



OK, so in case of and internal crash, there is no way, at least this 
moment (maybe in a future?), to restore from freeze without doing a 
forced reboot?


Thanks for your answer.

--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

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


[systemd-devel] systemd intentional behaviour? (signals)

2012-08-23 Thread Gerardo Exequiel Pozzi

Hello

Just for fun I am sending some signals to systemd (188) to see how 
reacts compared to sysvinit. While sysvinit ignores them or restores 
from crash after 30 seconds of sleep, systemd/journald just logs the 
status them freezing execution.


Example

kill -SEGV 1 - freeze
kill -QUIT 1 - freeze

Sending other signal again result in a crash (attemped to kill init)

Is this intentional? There is a way to restore systemd again without a 
forced reboot?



Thanks.

--
Gerardo Exequiel Pozzi
\cos^2\alpha + \sin^2\alpha = 1

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