Re: [systemd-devel] symlinking /etc/hostname to /data/etc/hostname woes

2019-07-01 Thread Belisko Marek
On Mon, Jul 1, 2019 at 9:48 AM Lennart Poettering
 wrote:
>
> On Mo, 01.07.19 08:25, Belisko Marek (marek.beli...@gmail.com) wrote:
>
> > Hi,
> >
> > I'm working on rpi3 by using mender OTA system and for identifying
> > devices I would like to have for every of it different hostname. As
> > rootfs is update-able (rootA, rootB layout) so I tried to create file
> > in /data/etc (which is permanent) and in /etc create symlink. When now
> > boot my system I still get hostname localhost.
>
> Two issues: /etc/hostname is read very early during boot, before PID 1
> starts the first other userspace program. This means you'd have to
> mount that fs from the initrd already, to be applied.
>
> hostnamed and friends live in a sandbox these days, that prohibit
> write access outside of /etc, and read access to various other
> dirs. If you play such symlink games, you have to turn that off. See
> the systemd-hostnamed.service service file, specifically
> ProtectSystem= and similar options.
>
> That all said, instead of introducing /data and keeping the whole of
> the OS read-only, I'd recommend to instead operate with a read-only
> /usr only, combined with a writable / that comes up in the initrd
> already and is automatically populated on first boot. i.e. keep /etc
> and everything else as empty as possible, and store only the stuff in
> it actually needed. systemd itself is all set up for this mode, and is
> happy if there's no configuration in /etc around. Some distros are not
> that happy with such a set up however, they require some bits in /etc
> existing. Ideally distros would be fixed to not require that and be
> happy with /etc entirely empty, but until then you can use
> tmpfiles.d/'s "C" lines copy in basic necessary configuration into
> /etc from /usr/share/factory/.
OK thanks for valuable info.
>
> Lennart
>
> --
> Lennart Poettering, Berlin

BR,

marek

-- 
as simple and primitive as possible
-
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] systemd-networkd version 241 not setting up tunnel of type GRE with Local=any

2019-07-01 Thread Susant Sahani
Care to open an issue at GitHub ?

On Fri, Jun 28, 2019 at 7:52 PM Christian Rohmann
 wrote:
>
> Hello systemd-devel,
>
> after a recent update to systemd 241 my previously working GRE tunnel
> does not work anymore:
>
> Jun 28 13:58:54 localhost systemd-networkd[637]: mytunnel:
> vti/ipip/sit/gre/gretap/erspan tunnel without a local IPv4 address
> configured in /etc/systemd/network/mytunnel.netdev. Ignoring
> Jun 28 13:58:54 localhost systemd-networkd[637]:
> /etc/systemd/network/eth0.network:5: Tunnel is invalid, ignoring
> assignment: mytunnel
>
>
> The configs are:
>
> --- cut ---
>
>
> $ cat /etc/systemd/network/mytunnel.netdev
>
> [NetDev]
> Name=mytunnel
> Kind=gre
>
> [Tunnel]
> Local=local
> Remote=192.168.1.1
>
> $ cat /etc/systemd/network/mytunnel.network
>
> [Match]
> Name=mytunnel
>
> [Network]
> Address=192.168.255.1/24
> DHCP=no
> LinkLocalAddressing=no
>
> [Route]
> Gateway=192.168.255.2
> Destination=172.16.0.0/16
>
>
> $ cat /etc/systemd/network/eth0.network
>
> [Match]
> Name=eth0
>
> [Network]
> DHCP=yes
> Tunnel=mytunnel
>
> [DHCP]
> UseDNS=true
> UseNTP=false
>
> --- cut ---
>
>
> A found https://github.com/systemd/systemd/issues/12041 which requires
> the "Local" variable to be set.
> As soon as I add a static IP to the "Local=" variable (the one eth0
> received from DHCP) the tunnel works again.
> According to https://github.com/systemd/systemd/issues/12041 a value of
> "any" would be possible as well though.
>
>
> Certainly this looks like a support question, but I am more or less
> getting at the recent change and if it really works as it should after
> forcing "Local=" to be present in Tunnel configurations
>
>
>
> Regards
>
> Christian
>
>
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel



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

Re: [systemd-devel] Antw: Re: Anybody care to fix the list processor?

2019-07-01 Thread systemd
On Mon, 01 Jul 2019 08:20:23 +0200
"Ulrich Windl"  wrote:
> >>> Simon McVittie  schrieb am 11.06.2019 um
> >>> 16:29 in Nachricht  
> <20190611142939.GA6676@horizon>:
> > On Tue, 11 Jun 2019 at 15:44:07 +0200, Ulrich Windl wrote:  
> >> Does anybody running the list care to fix the list-processor.  
> > 
> > I don't think the members of this list
> > control its infrastructure, but I've opened
> > .  
> 
> I agree, but they might care that the list they are using is
> operational.

Is this problem being worked on?
It seems quite serious; it apparently prevents people from subscribing
to the list as well as changing permissions.

There was just a post to the openSUSE list reporting that he is unable
to subscribe to the systemd-devel list because the confirmation email
is rejected.

https://lists.opensuse.org/opensuse-support/2019-07/msg5.html

I tried to subscribe to the systemd-devel mailing list, to ask
questions there directly, but they don't seem to have a
correctly-configured mail server; the confirmation email fails
thusly:

  :
  131.252.210.177 does not like recipient.
  Remote host said: 550 5.1.1
  : Recipient address
  rejected: User unknown in local recipient table Giving up on
  131.252.210.177.

I will see if the poster can add his situation to the bug report, but
if anybody could fix this problem in the meantime ...
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Verify only single file

2019-07-01 Thread Dennis Ljungmark
Hi,
  on my current Fedora (30) system, I'm trying to hook a test to
validate systemd unit files via `systemd-analyze verify`

this however has a problem that it analyzes & verifies the entire
chain, reporting errors if _any_ of the system units has an error.

Is there a way to limit `verify` to only run on the targetted units,
while maintaining the dependency tracking (units should exist)  but
not causing errors just because one of the system active units has a
PIDFile set in /var/run, or similar.

Ie:  I want to verify the dep-chain being okay, and that my own files
have correct syntax and is up to par, but not cause a hard failure
just because something on the system is wrong.

It's a lovely idea that everyone should always have completely
functional and clean unit files, but sadly Fedora and others don't
have this by default, so the current `systemd-analyze verify`
behaviour fails for me :(
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] symlinking /etc/hostname to /data/etc/hostname woes

2019-07-01 Thread Lennart Poettering
On Mo, 01.07.19 08:25, Belisko Marek (marek.beli...@gmail.com) wrote:

> Hi,
>
> I'm working on rpi3 by using mender OTA system and for identifying
> devices I would like to have for every of it different hostname. As
> rootfs is update-able (rootA, rootB layout) so I tried to create file
> in /data/etc (which is permanent) and in /etc create symlink. When now
> boot my system I still get hostname localhost.

Two issues: /etc/hostname is read very early during boot, before PID 1
starts the first other userspace program. This means you'd have to
mount that fs from the initrd already, to be applied.

hostnamed and friends live in a sandbox these days, that prohibit
write access outside of /etc, and read access to various other
dirs. If you play such symlink games, you have to turn that off. See
the systemd-hostnamed.service service file, specifically
ProtectSystem= and similar options.

That all said, instead of introducing /data and keeping the whole of
the OS read-only, I'd recommend to instead operate with a read-only
/usr only, combined with a writable / that comes up in the initrd
already and is automatically populated on first boot. i.e. keep /etc
and everything else as empty as possible, and store only the stuff in
it actually needed. systemd itself is all set up for this mode, and is
happy if there's no configuration in /etc around. Some distros are not
that happy with such a set up however, they require some bits in /etc
existing. Ideally distros would be fixed to not require that and be
happy with /etc entirely empty, but until then you can use
tmpfiles.d/'s "C" lines copy in basic necessary configuration into
/etc from /usr/share/factory/.

Lennart

--
Lennart Poettering, Berlin
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Re: [systemd-devel] symlinking /etc/hostname to /data/etc/hostname woes

2019-07-01 Thread Jérémy ROSEN
For that kind of complicated case, I would recommand mounting /data in your
initrd (i.e before the real systemd is started)

If you don't have an initrd in your system, you can replace systemd with a
simple shell script. We did something similar recently

#!/bin/sh
/bin/mount /dev/sda4 /data

exec /usrlib/systemd


Note that we "exec" systemd, not just call it from the shell script. It is
important that the real systemd is run as pid1

Le lun. 1 juil. 2019 à 08:25, Belisko Marek  a
écrit :

> Hi,
>
> I'm working on rpi3 by using mender OTA system and for identifying
> devices I would like to have for every of it different hostname. As
> rootfs is update-able (rootA, rootB layout) so I tried to create file
> in /data/etc (which is permanent) and in /etc create symlink. When now
> boot my system I still get hostname localhost.
>
> My log is:
>
> journalctl -b | grep hostname
> Jun 28 19:18:14 localhost systemd[1]: No hostname configured.
> Jun 28 19:18:14 localhost systemd[1]: Set hostname to .
> Jun 28 19:18:16 localhost kernel[137]: [1.507423] systemd[1]: No
> hostname configured.
> Jun 28 19:18:16 localhost kernel[137]: [1.507454] systemd[1]: Set
> hostname to .
> Jun 28 19:18:16 localhost systemd-resolved[135]: Defaulting to hostname
> 'linux'.
>
> If I read sources correctly  hostname is set in early startup of
> systemd and then using systemd-hostnamed (which I've edited and added
> Requires=data.mount -> as I need to wait when /data partition is
> mounted).
>
> Also when system is booted and /data is mounted and run below I get
> strange issue:
>
> root@localhost:~# hostnamectl set-hostname 321
> Could not set property: Failed to set static hostname: Read-only file
> system
> root@localhost:~# Jul 03 17:26:01 321 systemd-hostnamed[336]: Failed
> to write static host name: Read-only file system
> Jul 03 17:26:01 321 systemd-resolved[135]: System hostname changed to
> '321'.
>
> while / and /data are both rw.
>
> Any ideas how to overcome this problem? Thanks.
>
> BR,
>
> marek
>
> --
> as simple and primitive as possible
> -
> Marek Belisko - OPEN-NANDRA
> Freelance Developer
>
> Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
> Tel: +421 915 052 184
> skype: marekwhite
> twitter: #opennandra
> web: http://open-nandra.com
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel



-- 
[image: SMILE]  

20 rue des Jardins
92600 Asnières-sur-Seine
*Jérémy ROSEN*
Architecte technique

[image: email] jeremy.ro...@smile.fr
[image: phone]  +33 6 88 25 87 42
[image: url] http://www.smile.eu

[image: Twitter]  [image: Facebook]
 [image: LinkedIn]
 [image: Github]


[image: Découvrez l’univers Smile, rendez-vous sur smile.eu]

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

[systemd-devel] symlinking /etc/hostname to /data/etc/hostname woes

2019-07-01 Thread Belisko Marek
Hi,

I'm working on rpi3 by using mender OTA system and for identifying
devices I would like to have for every of it different hostname. As
rootfs is update-able (rootA, rootB layout) so I tried to create file
in /data/etc (which is permanent) and in /etc create symlink. When now
boot my system I still get hostname localhost.

My log is:

journalctl -b | grep hostname
Jun 28 19:18:14 localhost systemd[1]: No hostname configured.
Jun 28 19:18:14 localhost systemd[1]: Set hostname to .
Jun 28 19:18:16 localhost kernel[137]: [1.507423] systemd[1]: No
hostname configured.
Jun 28 19:18:16 localhost kernel[137]: [1.507454] systemd[1]: Set
hostname to .
Jun 28 19:18:16 localhost systemd-resolved[135]: Defaulting to hostname 'linux'.

If I read sources correctly  hostname is set in early startup of
systemd and then using systemd-hostnamed (which I've edited and added
Requires=data.mount -> as I need to wait when /data partition is
mounted).

Also when system is booted and /data is mounted and run below I get
strange issue:

root@localhost:~# hostnamectl set-hostname 321
Could not set property: Failed to set static hostname: Read-only file system
root@localhost:~# Jul 03 17:26:01 321 systemd-hostnamed[336]: Failed
to write static host name: Read-only file system
Jul 03 17:26:01 321 systemd-resolved[135]: System hostname changed to '321'.

while / and /data are both rw.

Any ideas how to overcome this problem? Thanks.

BR,

marek

-- 
as simple and primitive as possible
-
Marek Belisko - OPEN-NANDRA
Freelance Developer

Ruska Nova Ves 219 | Presov, 08005 Slovak Republic
Tel: +421 915 052 184
skype: marekwhite
twitter: #opennandra
web: http://open-nandra.com
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

[systemd-devel] Antw: Re: Anybody care to fix the list processor?

2019-07-01 Thread Ulrich Windl
>>> Simon McVittie  schrieb am 11.06.2019 um 16:29 in 
>>> Nachricht
<20190611142939.GA6676@horizon>:
> On Tue, 11 Jun 2019 at 15:44:07 +0200, Ulrich Windl wrote:
>> Does anybody running the list care to fix the list-processor.
> 
> I don't think the members of this list
> control its infrastructure, but I've opened
> .

I agree, but they might care that the list they are using is operational.

> 
> smcv
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org 
> https://lists.freedesktop.org/mailman/listinfo/systemd-devel 




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