With the error in vault, we initialized vault and unsealed. vault showed it is in ready status. The error from juju log show uuid is d045f2c8-b705-4113-9291-2ef203600fb0 but this uuid does not exist. Where does the charm gets d045f2c8-b705-4113-9291-2ef203600fb0 from?
It seems that with thedac's proposed fix, it did have the correct symlink for uuid 4c151bc2-8ad8-4c18-b4e8-58b22a66a6b2 but when the charm ran, it used uuid d045f2c8-b705-4113-9291-2ef203600fb0.
With the error in vault, we initialized vault and unsealed. vault showed it is in ready status. The error from juju log show uuid is d045f2c8- b705-4113- 9291-2ef203600f b0 but this uuid does not exist. Where does the charm gets d045f2c8- b705-4113- 9291-2ef203600f b0 from?
It seems that with thedac's proposed fix, it did have the correct symlink for uuid 4c151bc2- 8ad8-4c18- b4e8-58b22a66a6 b2 but when the charm ran, it used uuid d045f2c8- b705-4113- 9291-2ef203600f b0.
/etc/udev/rules.d# cat bcache1.rules ="add|change" , ENV{CACHED_ UUID}== "4c151bc2- 8ad8-4c18- b4e8-58b22a66a6 b2", SYMLINK+ ="disk/ by-dname/ bcache1"
SUBSYSTEM=="block", ACTION=
hook failed: "secrets- storage- relation- changed"
2018-07-06 07:54:37 DEBUG secrets- storage- relation- changed vaultlocker: Command '['cryptsetup', '--batch-mode', '--key-file', '-', 'open', 'UUID=d045f2c8- b705-4113- 9291-2ef203600f b0', 'crypt- d045f2c8- b705-4113- 9291-2ef203600f b0', '--type', 'luks']' returned non-zero exit status 4 storage- relation- changed Traceback (most recent call last): storage- relation- changed File "/var/lib/ juju/agents/ unit-nova- compute- kvm-5/charm/ hooks/secrets- storage- relation- changed" , line 579, in <module> storage- relation- changed main() storage- relation- changed File "/var/lib/ juju/agents/ unit-nova- compute- kvm-5/charm/ hooks/secrets- storage- relation- changed" , line 572, in main storage- relation- changed hooks.execute( sys.argv) storage- relation- changed File "/var/lib/ juju/agents/ unit-nova- compute- kvm-5/charm/ hooks/charmhelp ers/core/ hookenv. py", line 823, in execute storage- relation- changed self._hooks[ hook_name] () storage- relation- changed File "/var/lib/ juju/agents/ unit-nova- compute- kvm-5/charm/ hooks/secrets- storage- relation- changed" , line 556, in secrets_ storage_ changed storage- relation- changed configure_ local_ephemeral _storage( ) storage- relation- changed File "/var/lib/ juju/agents/ unit-nova- compute- kvm-5/charm/ hooks/nova_ compute_ utils.py" , line 883, in configure_ local_ephemeral _storage storage- relation- changed dev]) storage- relation- changed File "/usr/lib/ python3. 5/subprocess. py", line 581, in check_call storage- relation- changed raise CalledProcessEr ror(retcode, cmd) storage- relation- changed subprocess. CalledProcessEr ror: Command '['vaultlocker', 'encrypt', '--uuid', 'd045f2c8- b705-4113- 9291-2ef203600f b0', '/dev/disk/ by-dname/ bcache1' ]' returned non-zero exit status 1
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
2018-07-06 07:54:37 DEBUG secrets-
===================
# vaultlocker encrypt --uuid d045f2c8- b705-4113- 9291-2ef203600f b0 /dev/disk/ by-dname/ bcache1 connectionpool: Starting new HTTP connection (1): 10.216.2.23 connectionpool:http:// 10.216. 2.23:8200 "POST /v1/auth/ approle/ login HTTP/1.1" 200 437 r.dmcrypt: LUKS formatting /dev/disk/ by-dname/ bcache1 using UUID:d045f2c8- b705-4113- 9291-2ef203600f b0 r.dmcrypt: udevadm settle /dev/disk/ by-uuid/ d045f2c8- b705-4113- 9291-2ef203600f b0 connectionpool:http:// 10.216. 2.23:8200 "PUT /v1/charm- vaultlocker/ DCS1-CLP- NOD17/d045f2c8- b705-4113- 9291-2ef203600f b0 HTTP/1.1" 204 0 connectionpool:http:// 10.216. 2.23:8200 "GET /v1/charm- vaultlocker/ DCS1-CLP- NOD17/d045f2c8- b705-4113- 9291-2ef203600f b0 HTTP/1.1" 200 866 r.dmcrypt: LUKS opening d045f2c8- b705-4113- 9291-2ef203600f b0 by-uuid/ d045f2c8- b705-4113- 9291-2ef203600f b0 doesn't exist or access denied. b705-4113- 9291-2ef203600f b0', 'crypt- d045f2c8- b705-4113- 9291-2ef203600f b0', '--type', 'luks']' returned non-zero exit status 4
DEBUG:urllib3.
DEBUG:urllib3.
INFO:vaultlocke
INFO:vaultlocke
DEBUG:urllib3.
DEBUG:urllib3.
INFO:vaultlocke
Device /dev/disk/
vaultlocker: Command '['cryptsetup', '--batch-mode', '--key-file', '-', 'open', 'UUID=d045f2c8-
# cryptsetup --batch-mode --key-file - open UUID=d045f2c8- b705-4113- 9291-2ef203600f b0 crypt-d045f2c8- b705-4113- 9291-2ef203600f b0 --type luks by-uuid/ d045f2c8- b705-4113- 9291-2ef203600f b0 doesn't exist or access denied.
Device /dev/disk/
/dev/bcache# ls CLP-NOD17: /dev/bcache# ls -al /dev/disk/by-uuid/* by-uuid/ 05EC-7CF7 -> ../../sda1 by-uuid/ 2d8a4580- df8a-4e79- 9189-8931f66dc9 78 -> ../../sdf by-uuid/ 38be3b4b- 90dd-4bc3- 8030-668042b4d5 72 -> ../../nvme0n1p1 by-uuid/ 4c151bc2- 8ad8-4c18- b4e8-58b22a66a6 b2 -> ../../sda4 by-uuid/ 576c447b- 1e76-438a- 8158-0b316e4f5c 12 -> ../../nvme0n1p2 by-uuid/ 58ca75fe- 0bf2-4543- 9a7e-1514141938 14 -> ../../sdd by-uuid/ 8c7cb4cb- 0e29-44e3- 87ab-339c64400b 9c -> ../../sdc by-uuid/ b1940fc7- 80aa-49cc- b528-d46dc05fe7 b5 -> ../../sda2 by-uuid/ b454f3b4- b17d-4ba8- b13a-001b9aedfb be -> ../../sdg by-uuid/ cd955f04- 0cbe-4f66- 8ba9-198d3058f0 98 -> ../../sde by-uuid/ d0fbbf40- 5a04-4152- 9937-a2164c95bb 8e -> ../../bcache7 by-uuid/ fac76349- eab1-4574- 9fda-455126075b 7f -> ../../sdb by-uuid/ fd6432a5- e436-450c- a240-3098024351 d5 -> ../../sda3
by-label by-uuid
root@DCS1-
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 15 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 15 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 13 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
==================
# cryptsetup luksDump /dev/disk/ by-dname/ bcache1 by-dname/ bcache1
LUKS header information for /dev/disk/
Version: 1 50f8-4b70- 8842-9723f41be2 66
Cipher name: aes
Cipher mode: xts-plain64
Hash spec: sha1
Payload offset: 4096
MK bits: 256
MK digest: a8 2c 89 2f 32 a3 30 99 ea 10 15 89 af 4b 24 e7 cd 07 4d a6
MK salt: 07 5c 0f 31 e2 e8 17 3b ca 95 10 33 b6 aa 17 c5
cc df 46 eb 99 1b ad b5 72 18 ff b5 79 b1 b4 64
MK iterations: 142125
UUID: e466562f-
Key Slot 0: ENABLED
af 7f 65 d6 57 da b6 69 bb d2 71 77 a2 92 09 58
Iterations: 575280
Salt: 21 b4 37 78 d3 47 21 d4 b2 3e 96 33 e5 30 fe 67
Key material offset: 8
AF stripes: 4000
Key Slot 1: DISABLED
Key Slot 2: DISABLED
Key Slot 3: DISABLED
Key Slot 4: DISABLED
Key Slot 5: DISABLED
Key Slot 6: DISABLED
Key Slot 7: DISABLED
======= ======= =======
# ls -al /dev/disk/by-uuid/* by-uuid/ 05EC-7CF7 -> ../../sda1 by-uuid/ 2d8a4580- df8a-4e79- 9189-8931f66dc9 78 -> ../../sdf by-uuid/ 38be3b4b- 90dd-4bc3- 8030-668042b4d5 72 -> ../../nvme0n1p1 by-uuid/ 4c151bc2- 8ad8-4c18- b4e8-58b22a66a6 b2 -> ../../sda4 by-uuid/ 576c447b- 1e76-438a- 8158-0b316e4f5c 12 -> ../../nvme0n1p2 by-uuid/ 58ca75fe- 0bf2-4543- 9a7e-1514141938 14 -> ../../sdd by-uuid/ 8c7cb4cb- 0e29-44e3- 87ab-339c64400b 9c -> ../../sdc by-uuid/ b1940fc7- 80aa-49cc- b528-d46dc05fe7 b5 -> ../../sda2 by-uuid/ b454f3b4- b17d-4ba8- b13a-001b9aedfb be -> ../../sdg by-uuid/ cd955f04- 0cbe-4f66- 8ba9-198d3058f0 98 -> ../../sde by-uuid/ d0fbbf40- 5a04-4152- 9937-a2164c95bb 8e -> ../../bcache7 by-uuid/ fac76349- eab1-4574- 9fda-455126075b 7f -> ../../sdb by-uuid/ fd6432a5- e436-450c- a240-3098024351 d5 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 15 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 15 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 13 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 9 Jul 5 22:52 /dev/disk/
lrwxrwxrwx 1 root root 10 Jul 5 22:52 /dev/disk/
===========
/etc/udev/rules.d# cat bcache1.rules ="add|change" , ENV{CACHED_ UUID}== "4c151bc2- 8ad8-4c18- b4e8-58b22a66a6 b2", SYMLINK+ ="disk/ by-dname/ bcache1"
SUBSYSTEM=="block", ACTION=