Re: [systemd-devel] hinting systemd about what to do to make a device appear

2015-09-11 Thread martin f krafft
also sprach Lennart Poettering  [2015-09-11 14:16 
+0200]:
> I figure the next step is to attach gdb to PID, set a break point
> in device_process_new() and figure out why systemd doesn't care
> for the symlink.

Frankly — and you won't like this — but I lack the resources to get
involved at this level. My gdb days are a while in the past and in
order to figure out what's going on, I'd need to spend a lot more
time with the code, I'm afraid. I don't have the time for this.

> I still have the suspicion that drbd does something weird with
> /dev, and breaks things there... To detect that one option might
> be to use Martin Pitt's fatrace tool on /dev and see what accesses
> are made to /dev when the device is supposed to show up.

Regarding drbd touching /dev, all I can say is that it /looks/ like
it's doing everything you're asking it to do, via udev:

  http://slexy.org/raw/s20OEktMXW

Using "fatrace -c" in /dev and starting drbd returns absolutely
nothing, not a single line, which I find a bit suspcicious, or does
fatrace not include udev/systemd-generated events?

-- 
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
 
"da haben wir es also: eine kirchliche ordnung mit priesterschaft,
 theologie, kultus, sakrament;
 kurz, alles das, was jesus von nazareth bekämpft hatte..."
 - friedrich nietzsche
 
spamtraps: madduck.bo...@madduck.net


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] hinting systemd about what to do to make a device appear

2015-09-11 Thread Andrei Borzenkov


Отправлено с iPhone

> 10 сент. 2015 г., в 20:21, martin f krafft  написал(а):
> 
> also sprach Michael Biebl  [2015-09-10 19:13 +0200]:
>> Could you run udevadm info on the device?
>> Does it have a SYSTEMD_READY flag set?
> 
> No: http://slexy.org/raw/s2VEGDwICN

Missing SYSTEMD_READY means it is ready (by default) so it is ok.


> -- 
> @martinkrafft | http://madduck.net/ | http://two.sentenc.es/
> 
> murphy's law is recursive.
> washing your car to make it rain doesn't work.
> 
> spamtraps: madduck.bo...@madduck.net
> ___
> systemd-devel mailing list
> systemd-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] systemd 225: cannot override nspawn service

2015-09-11 Thread crequill
Hi Ruben,

Thank you for your reply. I will test when systemd 226 will be available on
archlinux.

Best regards
Christophe

2015-09-09 20:43 GMT+02:00 Ruben Kerkhof :

> On Wed, Sep 9, 2015 at 11:48 AM, crequill  wrote:
> > 1/ I cannot login anymore on containers (/sbin/getatty exist in
> container):
> > Failed to get login PTY: No such file or directory
>
> No idea about your other issues, but I hit this one too and it is
> fixed in systemd 2.26.
>
> Kind regards,
>
> Ruben
>
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] hinting systemd about what to do to make a device appear

2015-09-11 Thread martin f krafft
also sprach Andrei Borzenkov  [2015-09-11 10:28 +0200]:
> Please run "udevadm monitor --env", start drbd service to trigger
> device creation and make output available.

http://slexy.org/raw/s21alRk3ZD

-- 
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
 
"if you have built castles in the air, your work need not be lost;
 that is where they should be. now put the foundations under them."
-- henry david thoreau
 
spamtraps: madduck.bo...@madduck.net


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] NetDev Vlan device copy parent mac

2015-09-11 Thread O Neill, David M
Hi,

 

I have a working patch to copy the mac address from parent link to the
netdev vlan device.

Currently today when using the IP command this is the behavior seen and for
our projects it is the behavior we would like to see for systemd-networkd
also.

In the systemd-networkd solution a mac address is generated using
netdev_get_mac.

 

I have implemented a patch the mimic this behavior, but as far as the
matching goes, which solution would be best accepted for the device
comparison?

By providing the below key options, users can opt for this functionality or
not.  

A key in the below format? Is the CopyParentMac option superfluous?

 

[NetDev] 
Name=enp0s20f0.4094 
Kind=vlan

CopyParentMac=True

Parent=enp0s20f0

 

[VLAN] 
Id=4094

 

Thanks

Dave.

 



smime.p7s
Description: S/MIME cryptographic signature
--
Intel Shannon Limited
Registered in Ireland
Registered Office: Collinstown Industrial Park, Leixlip, County Kildare
Registered Number: 308263
Business address: Dromore House, East Park, Shannon, Co. Clare

This e-mail and any attachments may contain confidential material for the sole 
use of the intended recipient(s). Any review or distribution by others is 
strictly prohibited. If you are not the intended recipient, please contact the 
sender and delete all copies.

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


Re: [systemd-devel] hinting systemd about what to do to make a device appear

2015-09-11 Thread martin f krafft
also sprach Lennart Poettering  [2015-09-11 12:30 
+0200]:
> Do I see this right, this is luks on lvm on drbd? Yuck!

luks on drbd, and the local volume is on lvm, yes.

> Which symlink are you looking for? the drbd one?

Right. /dev/drbd/by-res/backup

-- 
@martinkrafft | http://madduck.net/ | http://two.sentenc.es/
 
"i doubt larry wall ever uses strict."
   -- frederick heckel
 
spamtraps: madduck.bo...@madduck.net


digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] hinting systemd about what to do to make a device appear

2015-09-11 Thread Lennart Poettering
On Fri, 11.09.15 12:45, martin f krafft (madd...@madduck.net) wrote:

> also sprach Lennart Poettering  [2015-09-11 12:30 
> +0200]:
> > Do I see this right, this is luks on lvm on drbd? Yuck!
> 
> luks on drbd, and the local volume is on lvm, yes.
> 
> > Which symlink are you looking for? the drbd one?
> 
> Right. /dev/drbd/by-res/backup

Hmm, not sure what is going on there. I don't know drbd. I figure the
next step is to attach gdb to PID, set a break point in
device_process_new() and figure out why systemd doesn't care for the
symlink. There's a loop after calling
udev_device_get_devlinks_list_entry() and it would be interesting to
see if the symlinks pop up there and why systemd doesn't process
them... Maybe the stat() verification step in the loop is actually
what fails here?

I still have the suspicion that drbd does something weird with /dev,
and breaks things there... To detect that one option might be to use
Martin Pitt's fatrace tool on /dev and see what accesses are made to
/dev when the device is supposed to show up.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] hinting systemd about what to do to make a device appear

2015-09-11 Thread Lennart Poettering
On Fri, 11.09.15 10:41, martin f krafft (madd...@madduck.net) wrote:

> also sprach Andrei Borzenkov  [2015-09-11 10:28 +0200]:
> > Please run "udevadm monitor --env", start drbd service to trigger
> > device creation and make output available.
> 
> http://slexy.org/raw/s21alRk3ZD

Do I see this right, this is luks on lvm on drbd? Yuck!

Which symlink are you looking for? the drbd one?

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


Re: [systemd-devel] hostname can be changed without permission checks

2015-09-11 Thread Michael Chapman

On Sat, 12 Sep 2015, Michał Zegan wrote:

Hello.

It seems that I am able to change a hostname with hostnamectl set-hostname 
name without any problems, even logged in as unprivileged user, and I did not 
get any authentication requests.
I did not modify polkit rules to allow this, not sure about the default ones, 
but they probably shouldn't allow that, just checked that implicit rules are 
auth_admin_keep, arch does not have vendor rules and I also do not have my 
own..


Did you check both /etc/polkit-1/rules.d/ and /usr/share/polkit-1/rules.d/?

On my system (Fedora), gnome-control-center has added a rule to the latter 
directory to allow a local user set the hostname, locale, etc., if they 
are in the "wheel" group. Perhaps you have something similar?


You can test whether PolicyKit is allowing the action with:

  pkcheck --action-id org.freedesktop.hostname1.set-hostname \
--process $$ --allow-user-interaction

If this exits successfully, then it's something in your PolicyKit 
configuration allowing the action, not systemd.


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


[systemd-devel] hostname can be changed without permission checks

2015-09-11 Thread Michał Zegan

Hello.

It seems that I am able to change a hostname with hostnamectl 
set-hostname name without any problems, even logged in as unprivileged 
user, and I did not get any authentication requests.
I did not modify polkit rules to allow this, not sure about the default 
ones, but they probably shouldn't allow that, just checked that implicit 
rules are auth_admin_keep, arch does not have vendor rules and I also do 
not have my own..

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


[systemd-devel] tmp.mount inactive => /tmp not mounted

2015-09-11 Thread Aaron_Wright
I recently switched to using systemd in my initrd, and nearly everything 
works fine, expect now the system comes up without /tmp being mounted 
correctly. I'm not sure where to start looking. Can anyone nudge me in the 
right direction?

The tmp.mount unit seems to be inactive. It didn't do that before I 
started using systemd in initrd.

~ # systemctl status tmp.mount
● tmp.mount - Temporary Directory
   Loaded: loaded (/usr/lib/systemd/system/tmp.mount; static; vendor 
preset: enabled)
   Active: inactive (dead) since Sat 2015-09-12 00:28:11 UTC; 33s ago
Where: /tmp
 What: tmpfs
 Docs: man:hier(7)
   http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems

The local-fs.target unit is active and happy.

~ # systemctl status local-fs.target
● local-fs.target - Local File Systems
   Loaded: loaded (/usr/lib/systemd/system/local-fs.target; static; vendor 
preset: enabled)
   Active: active since Sat 2015-09-12 00:28:12 UTC; 1min 24s ago
 Docs: man:systemd.special(7)

But its dependencies list tmp.mount as not active.

~ # systemctl list-dependencies local-fs.target
local-fs.target
● ├─-.mount
● ├─systemd-remount-fs.service
● ├─tmp.mount
● └─var.mount

The list of mounts show that tmpfs is mounted on /tmp, but it isn't 
really. I assume this is a /tmp in initrd that is masked by switching the 
root to /sysroot (similar to the rootfs on the first line), because it is 
read-only like the root file system (can't make any files in it), and when 
I manually start tmp.mount that problem is fixed.

~ # cat /proc/mounts
rootfs / rootfs rw 0 0
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,nosuid,size=954032k,nr_inodes=238508,mode=755 0 
0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/systemd cgroup 
rw,nosuid,nodev,noexec,relatime,xattr,release_agent=/usr/lib/systemd/systemd-cgroups-agent,name=systemd
 
0 0
tmpfs /tmp tmpfs rw 0 0
/dev/disk/by-partlabel/rootfs / ext4 ro,relatime,data=ordered 0 0
/dev/disk/by-partlabel/varfs /var ext4 
rw,relatime,discard,nodelalloc,data=journal 0 0

/etc/fstab is pretty tame. Not sure if it would be causing an issue or 
not.

~ # cat /etc/fstab
PARTLABEL=rootfs / ext4 ro 0 1
PARTLABEL=varfs /var ext4 rw,data=journal,discard 0 2

Some journal output for reference. The root file system is read-only, so 
the errors with chmod are expected. These errors don't occur when /tmp is 
mounted properly.

systemd[1]: systemd 219 running in system mode. (-PAM -AUDIT -SELINUX -IMA 
-APPARMOR -SMACK -SYSVINIT -UTMP -LIBCRYPTSETUP -GCRYPT -GNUTLS -ACL -XZ 
-LZ4 -SECCOMP +BLKID -ELFUTILS -KMOD -IDN)
systemd[1]: Started Remount Root and Kernel File Systems.
systemd[1]: Reached target Local File Systems (Pre).
systemd[1]: Starting Local File Systems (Pre).
systemd[1]: Found device SILICONSYSTEMS_INC_8GB varfs.
systemd[1]: Mounting /var...
systemd[1]: Mounted /var.
systemd[1]: Starting Flush Journal to Persistent Storage...
systemd[1]: Started Flush Journal to Persistent Storage.
systemd[1]: Reached target Local File Systems.
systemd[1]: Starting Local File Systems.
systemd[1]: Starting Create Volatile Files and Directories...
systemd-tmpfiles[161]: chmod(/tmp) failed: Read-only file system
systemd[1]: systemd-tmpfiles-setup.service: main process exited, 
code=exited, status=1/FAILURE
systemd[1]: Failed to start Create Volatile Files and Directories.
systemd[1]: Unit systemd-tmpfiles-setup.service entered failed state.
systemd[1]: systemd-tmpfiles-setup.service failed.
systemd[1]: Reached target System Initialization.
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel


[systemd-devel] systemctl -M foo operates on host not container foo

2015-09-11 Thread Johannes Ernst
This sounds silly but I do think this used to work for me (current: v225 on 
Arch, perhaps something broke?)

> systemctl -M foo enable sshd.service

creates the symlink on the host, not in the container.
Other sub-commands also work on the host, not the container.

machine foo doesn’t actually exist. If it exists, the behavior is still the 
same.

The machine name argument is completely ignored.

What am I missing?

Actually just found an old v222. That produces a dbus error if machine foo does 
not exist. That sounds more reasonable.

Cheers,



Johannes.

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


Re: [systemd-devel] systemd and intltool

2015-09-11 Thread Lennart Poettering
On Thu, 10.09.15 19:10, Michael Biebl (mbi...@gmail.com) wrote:

> Hi,
> 
> reading https://wiki.gnome.org/Projects/GnomeCommon/Migration, it says
> that intltool is practically dead and one should use gettext directly.
> 
> Do we still need intltool in systemd? Does gettext have support for
> translating PolicyKit policy files?

Happy to take a patch that removes the intltool hookup if it replaces
it with the right gettext hookup instead.

Lennart

-- 
Lennart Poettering, Red Hat
___
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/systemd-devel