generate_password.yml does not add new keys added to deployment

Bug #1566538 reported by Ganesh Maharaj Mahalingam
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kolla
Invalid
Undecided
Unassigned

Bug Description

Current working of {source_dir}/tools/generate_passwords.py is to read the contents of /etc/kolla/passwords.yml and generate a password for any key thats empty. This works fine for a fresh deployment, but updating an existing deployment will fail since the new keys are not in the passwords.yml file.

Proposal:

generate_passwords.yml will read contents of {source_dir}/etc/tools/generate_passwords.yml [if exists] and compare that with the contents of /etc/kolla/passwords.yml. Generate password for emptry string and add any missing key values.

description: updated
Changed in kolla:
assignee: nobody → Mauricio José de Lima (mlima) (limamauricio)
Revision history for this message
Mauricio Lima (mliima) (mauricio-lima) wrote :

I tested it and it worked. Can you confirm that the error still happen?

Changed in kolla:
status: New → Incomplete
Revision history for this message
Vikram Hosakote (vhosakot) wrote :

I also tested kolla-genpwd in master, and it works fine as expected without any issues.

Revision history for this message
Ganesh Maharaj Mahalingam (ganesh-mahalingam) wrote :

Let me explain the scenario. I think the bug description is not explaining the issue properly.

Env:
Ubuntu 14.04 images with wily kernel, source build, base deployment+ceph.

Steps:
1. Use old kolla master 808d6baa448533b7dca98eca728c06d4323de22b
2. Create /etc/kolla/passwords.yml with the contents from the kolla dir and running tools/generate_passwords.py
3. Do a deployment
4. Update to latest master
5. Run tools/generate_passwords.py
6. Do a deployment <-- This will fail.

Expected:
The new contents of nova-ssh keys should be added to /etc/kolla/passwords.yml when running generate_passwords.py

Actual Result:
The new key-value pairs are not added and the deployment will fail. Only fix is finding the new keys from {source}/etc/kolla/passwords.yml and then add them to /etc/kolla/passwords.yml file manually before running generate_passwords.yml

The bug is more of a feature/wish-list request to enhance generate_passwords.yml to read the contents of {source}/etc/kolla/passwords.yml, compare it with whats currently deployed in /etc/kolla/passwords.yml and add the missing keys.

Revision history for this message
Ganesh Maharaj Mahalingam (ganesh-mahalingam) wrote :

Tested with master and genpwd.py and still the same effect. The new keys (nova-ssh, etc) are not getting added to the passwords.yml file.

Revision history for this message
Vikram Hosakote (vhosakot) wrote :

nova_ssh_key is supposed to be empty, and it works fine for me.

$ grep nova_ssh_key: /etc/kolla/passwords.yml
nova_ssh_key:

Revision history for this message
Ganesh Maharaj Mahalingam (ganesh-mahalingam) wrote :

I understand that should be empty, but thats not what i am alluding to. Let me propose a patch. maybe that will clear things up.

Changed in kolla:
assignee: Mauricio Lima (mliima) (mauricio-lima) → nobody
status: Incomplete → Invalid
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.