Bug ID 1191347
Summary Yast2 Disk masks all systemd x.mount units
Classification openSUSE
Product openSUSE Distribution
Version Leap 15.3
Hardware All
OS openSUSE Leap 15.3
Status NEW
Severity Major
Priority P5 - None
Component YaST2
Assignee yast2-maintainers@suse.de
Reporter itteam@smartodds.co.uk
QA Contact jsrain@suse.com
Found By ---
Blocker ---

Created attachment 852942 [details]
journal

We've come across an issue whereby opening yast2 disk management causes all
systemd x.mount units to be masked until reboot or manual intervention. On some
systems this is causing issues restarting services which depend on these (eg
nrpe with After=var-run.mount), which present an error:

Failed to restart nrpe.service: Unit var.mount is masked.

It's simple enough to trigger the masking with yast2 disk as follows.

1. Boot system, confirm var.mount for example is not masked:

# systemctl status var.mount
��������� var.mount - /var
     Loaded: loaded (/etc/fstab; generated)
     Active: active (mounted) since Tue 2021-10-05 17:17:26 BST; 1min 31s ago
      Where: /var
       What: /dev/mapper/vg_system-lv_var
       Docs: man:fstab(5)
             man:systemd-fstab-generator(8)
      Tasks: 0 (limit: 7030)
     CGroup: /system.slice/var.mount

Oct 05 17:17:25 someserver1 systemd[1]: Mounting /var...
Oct 05 17:17:26 someserver1 systemd[1]: Mounted /var.


2. Run yast2 disk

> sudo yast2 disk

3. Accept the warning prompt and proceed to Abort or Finish without making any
changes.

4. Check the status again of var.mount and find that it is masked (note the log
of changed status, this was achieved setting journalctl to debug mode with
systemctl log-level debug):

# systemctl status var.mount
��������� var.mount - /var
     Loaded: masked (Reason: Unit var.mount is masked.)
     Active: active (mounted) since Tue 2021-10-05 17:17:26 BST; 2min 50s ago
      Where: /var
       What: /dev/mapper/vg_system-lv_var
      Tasks: 0 (limit: 7030)
     CGroup: /system.slice/var.mount

Oct 05 17:17:25 someserver1 systemd[1]: Mounting /var...
Oct 05 17:17:26 someserver1 systemd[1]: Mounted /var.
Oct 05 17:19:26 someserver1 systemd[1]: var.mount: Changed dead -> mounted
Oct 05 17:19:37 someserver1 systemd[1]: var.mount: Changed dead -> mounted

5. It's actually masking every mount unit it seems:

# ll /run/systemd/system
total 0
lrwxrwxrwx 1 root root 9 Oct  5 17:19 \x2esnapshots.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 backup.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 boot-grub2-i386\x2dpc.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 boot-grub2-x86_64\x2defi.mount ->
/dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 data.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19
dev-disk-by\x2did-dm\x2dname\x2dvg_system\x2dlv_swap.swap -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19
dev-disk-by\x2did-dm\x2duuid\x2dLVM\x2dNn2wUiPvm30gKUVSZzdj7ZcrG3W8F0qgJkggHvpUF2wzkNeQpQmB1Vb4sk6o43zY.swap
-> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19
dev-disk-by\x2duuid-61a850a3\x2de6cd\x2d4156\x2dbdfe\x2d59c040afdf8d.swap ->
/dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 dev-dm\x2d0.swap -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 dev-mapper-vg_system\x2dlv_swap.swap ->
/dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 dev-vg_system-lv_swap.swap -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 home.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 opt.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 root.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 srv.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 tmp.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 usr-local.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 var-lock.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 var-run.mount -> /dev/null
lrwxrwxrwx 1 root root 9 Oct  5 17:19 var.mount -> /dev/null

6. At this point the service cannot be restarted:
# systemctl restart nrpe
Failed to restart nrpe.service: Unit var.mount is masked.

Either rebooting, or removing the symlink and doing a daemon reload is
sufficient to resolve individual units, in this case nrpe also needs tmp.mount
(possibly due to the PrivateTmp=true directive):

# rm /run/systemd/system/var.mount
# systemctl daemon-reload
# systemctl restart nrpe
Failed to restart nrpe.service: Unit tmp.mount is masked.
# rm /run/systemd/system/tmp.mount
# systemctl daemon-reload
# systemctl restart nrpe
(starts fine)

This latter behaviour though is where there is a divergence, the service will
only fail to restart on *some* systems, despite the unit file
(/usr/lib/systemd/system/nrpe.service) being identical and all systems seeing
the same masking behaviour triggered by yast.

So a few questions are raised, namely why is yast2 disk masking the x.mount
units, is this expected, and is it supposed to leave them in this state? But
then also why is it only having a tangible effect on some systems?

Attached is the systemd journal (debug level).


You are receiving this mail because: