Trouble with snapd- "Unit var.mount is masked"

Hello,

I need to install an app that isn’t available in the opensuse repositories and needs to be installed through snapd so I followed the instructions over at: https://snapcraft.io/docs/installing-snap-on-opensuse but running this (as instructed)

sudo systemctl enabled --now snapd.apparmor

I get

Failed to start snapd.apparmor.service: Unit var.mount is masked

So I tried

sudo systemctl unmask var.mount

which silently completes. Try to run

sudo systemctl enabled --now snapd.apparmor

again with the same error as above.
Carrying on hoping it doesn’t affect things I try to run

sudo snap install <softwarename>

and get

error: cannot perform the following tasks:
- Mount snap "snapd" (12398) ([start snap-snapd-12398.mount] failed with exit status 1: Failed to start snap-snapd-12398.mount: Unit var.mount is masked.

So whatever this Unit var.mount is masked thing means is definitely of the way of snapd working, can anyone help me? I can’t really find anything about it on the web and trying to unmask it myself doesn’t seem to do anything. Thank you.

So what is “sudo systemctl status var.mount” giving you? Only unmasking it might not start it.

sudo systemctl status var.mount
[sudo] password for root:
 var.mount - /var
     Loaded: masked (Reason: Unit var.mount is masked.)
     Active: active (mounted) since Wed 2021-06-30 16:01:14 BST; 2 days ago
      Where: /var
       What: /dev/sdd2
      Tasks: 0 (limit: 4070)
        CPU: 3ms
     CGroup: /system.slice/var.mount

So that confirms it is still masked even after running unmask. Now I guess the question is, how does one actually unmask it?

Show output of

find /usr/lib/systemd /run/systemd /etc/systemd -name var.mount
systemctl list-unit-files var.mount

find /usr/lib/systemd /run/systemd /etc/systemd -name var.mount

/run/systemd/generator/var.mount
/run/systemd/generator/local-fs.target.requires/var.mount
/run/systemd/system/var.mount

systemctl list-unit-files var.mount

UNIT FILE STATES          VENDOR PRESET
var.mount masked-runtime disabled

1 unit files listed.

Well, to remove it run “systemctl --runtime unmask var.mount” but something created it, you need to find out what. Do you have this unit masked immediately after reboot?

Oddly enough it is not masked right after a reboot. I had rebooted before as per the instructions on snapcraft.io and it was masked.
This time around I rebooted, ran the check and it said loaded instead of masked.

sudo systemctl status var.mount[sudo] password for root:
 var.mount - /var
     Loaded: loaded (/etc/fstab; generated)
     Active: active (mounted) since Wed 2021-06-30 16:01:14 BST; 2 days ago
      Where: /var
       What: /dev/sdd2
      Tasks: 0 (limit: 4070)
        CPU: 3ms
     CGroup: /system.slice/var.mount

Figuring I could carry on with the installation I initially intended to do that also went swimmingly. So thank you for the help as things are working as intended now, although I’m not quite why.