Closed badmutex closed 8 years ago
In this file: cloud/iaas/provider/openstack/CloudProviderOpenstackAPI.py The method definition in: initialize(self, cloudname, user=None) logon(self, cloudname)
We have such call of getpass(): os_password = credentials["OS_PASSWORD"] if os_password.lower() in ["readline", "read", "tbd"]: os_password = getpass.getpass()
Which seems invoked for the default cloud even without a direct invoke of the logon/activate.
Hagen Hodgkins reported similar issue when issuing a 'cm secgroup upload' call.
My suggestion is to eliminate such interactive feature from the code so it won't be invoked behind the scene by other calls.
i think the get pass in in principal good, but in this case its somehwo bypassed.
i think we need to check if TBD is set in profile and force a profile update in some fashion we als need to be able to set the profile non interactively so we can get it passed travis and other envs
what i do not understand is that it actually asks for a apssword as all should be taken care of.
so the get pass shoudl only be asked in OS_PASSWORD, but i verified that it is set in hagens case, lets meet tomorrow to look at this setup. this csrtainly needs to be fixed. I am not yest sure where te error is, but the getpass you found is probably the reason. there is something wrong in the logic
Resolved by 83351c4. As we wanted to keep the feature (not putting password to yaml, but ask for user input when needed), we kept the feature while adding more informative message. Also we improved the code so it will ask only once for each cloud as long as a session is maintained.
A fresh install of client (version info below) asks for a password before listing the cloud information. I can enter completely random password and it still "works"
The workaround was to set the variables
clouds/kilo/credentials
to something other thanTBD
in~/.cloudmesh/cloudmesh.yaml
.My understanding after speaking with Fugang is that cm should not be asking for a password here. At the very least, some information about what password is being asked for should be given.