get_password function cannot support use define password in developer mode.

Registered by Sam Su

Background:
In our environment, all team members share the same set of machines within the same network. If everybody uses the same password of rabbitmq, some nodes that are out of the scope of the installation can also register successfully. Therefore, if users can set different passwords of rabbitmq, the occurrence of these situations can be avoided.

Code analysis:
In the current Openstack-<some parts name> implementation, all of Openstack services passwords are set as its related service name, for example we can see the codes as follow:
db_user = node['openstack']['db']['compute']['username']
db_pass = get_password 'db', 'nova'
Source from: https://github.com/stackforge/cookbook-openstack-compute/blob/master/recipes/nova-common.rb

users cannot change at the line db_pass = get_password 'db', 'nova' e.g. change the password from 'nova' to 'abcd'.
The reason is the function get_password called the function secret(), it returns the index as the related password, however the value of the variable index is also used as the key to its related username node['openstack']['secret'][index], so the index cannot take any arbitrary values that users expect.
So I suggest that we decouple the dependence between usernames and passwords, node['openstack']['secret'][index] is only related with username. So the password can take any value from users. At the same time, the change should not break any existing code, so it is important to keep the same interface and keep the same return value when users use the old convention.

Blueprint information

Status:
Complete
Approver:
Matt Ray
Priority:
Undefined
Drafter:
Sam Su
Direction:
Needs approval
Assignee:
Sam Su
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Mark Vanderwiel

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.