Comment 10 for bug 1838607

Revision history for this message
Nicolas Pochet (npochet) wrote :

Validation for disco.
I created a disco VM, configured vault on another machine and installed vaultlocker from the repo.
Used vaultlocker to encrypt a partition:

lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
loop0 7:0 0 149.7M 1 loop /snap/vault/1822
loop1 7:1 0 54.9M 1 loop /snap/lxd/12631
loop2 7:2 0 89.1M 1 loop /snap/core/8268
sda 8:0 0 20G 0 disk
└─sda1 8:1 0 20G 0 part /
sdb 8:16 0 5G 0 disk
└─sdb1 8:17 0 5G 0 part
  └─crypt-af7376f2-6640-41cb-98d4-2fcaeaa89736 253:0 0 5G 0 crypt /mnt/test

As described in the original bug, there's an interface that is DOWN with NO-CARRIER:
ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:ad:4f:a6 brd ff:ff:ff:ff:ff:ff
3: ens8: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 52:54:00:2b:c5:56 brd ff:ff:ff:ff:ff:ff

When rebooting, we can see the following in the logs:
grep mnt /var/log/syslog
Jan 14 14:17:37 vm1 systemd[1]: Dependency failed for /mnt/test.
Jan 14 14:17:37 vm1 systemd[1]: mnt-test.mount: Job mnt-test.mount/start failed with result 'dependency'.
Jan 14 14:17:42 vm1 systemd[1]: Mounting /mnt/test...
Jan 14 14:17:42 vm1 systemd[1]: Mounted /mnt/test.

The version of vaultlocker is:
dpkg -l | grep vault
ii vaultlocker 1.0.3-0ubuntu2 all Secure storage of dm-crypt keys in Hashicorp Vault

After an upgrade to disco-proposed for the vaultlocker package:
dpkg -l | grep vault
ii vaultlocker 1.0.4-0ubuntu0.19.04.1 all Secure storage of dm-crypt keys in Hashicorp Vault

Rebooting the machine does not show the same errors in the logs:

grep mnt /var/log/syslog
Jan 14 14:24:30 vm1 systemd[983]: mnt-test.mount: Succeeded.
Jan 14 14:27:14 vm1 systemd[1]: Mounting /mnt/test...
Jan 14 14:27:14 vm1 systemd[1]: Mounted /mnt/test.

For the original bug point of view, this patch is fixing the issue in disco-proposed.