using deprecated attributes when using kolla-writepwd to store password in a Vault server

Bug #1992251 reported by Amine
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla-ansible
New
Undecided
Unassigned

Bug Description

Hi,

Trying to use kolla-writepwd to store passwords in a Hashicorp vault server. Received the following errors:

Traceback (most recent call last):
  File "/var/lib/kolla/kolla_venv/bin/kolla-writepwd", line 8, in <module>
    sys.exit(main())
  File "/var/lib/kolla/kolla_venv/lib/python3.8/site-packages/kolla_ansible/cmd/writepwd.py", line 114, in main
    writepwd(passwords_file, vault_kv_path, vault_mount_point, vault_namespace,
  File "/var/lib/kolla/kolla_venv/lib/python3.8/site-packages/kolla_ansible/cmd/writepwd.py", line 35, in writepwd
    client = hashicorp_vault_client(vault_namespace, vault_addr, vault_role_id,
  File "/var/lib/kolla/kolla_venv/lib/python3.8/site-packages/kolla_ansible/hashi_vault.py", line 58, in hashicorp_vault_client
    client.auth_approle(vault_role_id, vault_secret_id)
  File "/var/lib/kolla/kolla_venv/lib/python3.8/site-packages/hvac/v1/__init__.py", line 112, in __getattr__
    return utils.getattr_with_deprecated_properties(
  File "/var/lib/kolla/kolla_venv/lib/python3.8/site-packages/hvac/utils.py", line 154, in getattr_with_deprecated_properties
    raise AttributeError(
AttributeError: 'Client' has no attribute 'auth_approle'

I have tried quickly to correct this on hashi_vault.py", line 58:

--- client.auth_approle(vault_role_id, vault_secret_id)
+++ client.auth.approle.login(vault_role_id, vault_secret_id)

And it works.

Maybe there is a better way to do it ?

kolla-ansible version 14.4.0
python 3.8
hvac 1.0.2

Thanks

summary: - using deprecated attributes when using kolla-writepwd to storage
- password in Vault server
+ using deprecated attributes when using kolla-writepwd to store password
+ in a Vault server
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.