osism / issues

This repository is used for bug reports that are cross-project or not bound to a specific repository (or to an unknown repository).
https://www.osism.tech
1 stars 1 forks source link

inventory-reconciler: `osism sync inventory` fails with "Attempting to decrypt but no vault secrets found" #1167

Open scoopex opened 3 weeks ago

scoopex commented 3 weeks ago

OSISM release version

8.0.2

What's the problem?

I am using osism 8.0.2 and i get the following message when syncing the inventory: (see last line)

$ sudo -u dragon osism sync inventory
2024-10-15 17:53:57 | INFO     | Task 212a0650-0f41-4e81-8296-034099d875e6 is running in background. Output coming soon.
2024-10-15 17:54:11 | INFO     | Writing 050-kolla-ceph-rgw-hosts.yml with ceph_rgw_hosts
2024-10-15 17:54:11 | INFO     | Writing 050-infrastructure-cephclient-mons.yml with cephclient_mons
2024-10-15 17:54:11 | INFO     | Writing 050-ceph-cluster-fsid.yml with ceph_cluster_fsid
2024-10-15 17:54:12 | INFO     | Handling group overwrites in 99-overwrite
2024-10-15 17:54:12 | INFO     | Removing group octavia:children from 50-kolla
2024-10-15 17:54:12 | INFO     | Removing group ovn-database:children from 51-kolla
2024-10-15 17:54:12 | INFO     | Handling group overwrites in 20-roles
2024-10-15 17:54:12 | INFO     | Removing group ceph-rgw from 50-ceph
2024-10-15 17:54:13 | INFO     | File 20-netbox not found in /inventory.pre/
ERROR! Attempting to decrypt but no vault secrets found <----

@berendt assumption was that this is related to encrypted files in the inventory folder which were added to the node directories (inventory/host_vars/<node>/99_bmc_secret.yml), and it seems that this is true :-)

I adapted my convenience script for switching branches to delete the files before running that command as a workaround.

Having node specific vault files in the inventory folder seems to be useful from my point of view.

References to existing reports

References to existing bug reports, mailing lists, ...

Severity

low

Urgency

low

scoopex commented 1 week ago

@berendt You mentioned that adding support for encrypted files in the inventory files of the hosts might not be a huge task. Because my hacky workaround is not a good solution, i would like to prefer to solve that in your code.

Can you provide a pointer and suggestion about your implementation idea which helps me to improve that?