Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OCP-4.x][AWS] Playbook clobbers AWS cred file #89

Open
copejon opened this issue Aug 19, 2020 · 0 comments
Open

[OCP-4.x][AWS] Playbook clobbers AWS cred file #89

copejon opened this issue Aug 19, 2020 · 0 comments
Labels

Comments

@copejon
Copy link

copejon commented Aug 19, 2020

Version git hash: 23de699

Location
OCP-4.X/roles/install-on-aws/templates/credentials.j2
OCP-4.X/roles/install-on-aws/tasks/main.yml

Environment

AWS_ACCESS_KEY_ID=1232414321234 # or unset
AWS_SECRET_ACCESS_KEY=1232412341234 # or unset

Issue
The playbook will clobber the $HOME/.aws/credentials variable values, even if the env vars are set. This behavior is undocumented. Overwriting the default credential file results in loss of those keys, forcing users to regenerate them (or having to ask an admin to do it for them).

Behavior
The installer will hang indefinitely at the credential check:
time="2020-08-19T10:31:08-04:00" level=debug msg=" Generating Platform Credentials Check..."
This is because the installer cannot find the keys and is prompting the user for them, but the prompt is hidden from the openshift logs and playbook output.

Suggested Behavior
The playbook should not overwrite the $HOME/.aws/credentials file. The playbook should, at most, validate that either the env vars or the credential file exists, and fail if none do. This will prevent the hang and provide the user an indication of what's wrong.

Additionally..
This behavior also exists for the $HOME/.aws/config file, which again should not be overwritten, at least if the env vars are not set or are null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants