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

password not auto-generated #18

Open
mhrivnak opened this issue Jan 3, 2018 · 0 comments
Open

password not auto-generated #18

mhrivnak opened this issue Jan 3, 2018 · 0 comments

Comments

@mhrivnak
Copy link
Member

mhrivnak commented Jan 3, 2018

The parameter mysql_password says it will be auto-generated if not supplied by the user, but that does not happen. Its description reads "Password to connect to MySQL (generated if blank)".

Auto-generation was removed here, but I'm not sure why: 5eb4318#diff-c319c9a55e180aacb3c775369ac8d0afL10

If not supplied by the user, this failure appears in the APB log:

+ [[ provision --extra-vars {"_apb_plan_id":"dev","_apb_service_class_id":"77b526a02637bdf66c2fa73c0b7897b1","_apb_service_instance_id":"8545ee6b-6723-4fb2-bb58-d81b6b68183b","cluster":"openshift","mysql_database":"devel","mysql_user":"devel","mysql_version":"5.7","namespace":"baz","service_name":"mysql"} == *\s\2\i\/\a\s\s\e\m\b\l\e* ]]
+ ACTION=provision
+ shift
+ playbooks=/opt/apb/actions
+ CREDS=/var/tmp/bind-creds
+ TEST_RESULT=/var/tmp/test-result
+ whoami
+ '[' -w /etc/passwd ']'
++ id -u
+ echo 'apb:x:1000170000:0:apb user:/opt/apb:/sbin/nologin'
+ set +x
+ [[ -e /opt/apb/actions/provision.yaml ]]
+ [[ -e /opt/apb/actions/provision.yml ]]
+ ANSIBLE_ROLES_PATH=/etc/ansible/roles:/opt/ansible/roles
+ ansible-playbook /opt/apb/actions/provision.yml --extra-vars '{"_apb_plan_id":"dev","_apb_service_class_id":"77b526a02637bdf66c2fa73c0b7897b1","_apb_service_instance_id":"8545ee6b-6723-4fb2-bb58-d81b6b68183b","cluster":"openshift","mysql_database":"devel","mysql_user":"devel","mysql_version":"5.7","namespace":"baz","service_name":"mysql"}'
PLAY [mysql-apb playbook to provision the application] *************************
TASK [ansible.kubernetes-modules : Install latest openshift client] ************
skipping: [localhost]
TASK [ansibleplaybookbundle.asb-modules : debug] *******************************
skipping: [localhost]
TASK [rhscl-mysql-apb-openshift : Find pod we need to update] ******************
skipping: [localhost]
TASK [rhscl-mysql-apb-openshift : Find dc we will clean up] ********************
skipping: [localhost]
TASK [rhscl-mysql-apb-openshift : Backup source database] **********************
skipping: [localhost]
TASK [rhscl-mysql-apb-openshift : Copy over db backup] *************************
skipping: [localhost]
TASK [rhscl-mysql-apb-openshift : Set mysql service state to present] **********
changed: [localhost]
TASK [rhscl-mysql-apb-openshift : include_tasks] *******************************
included: /opt/ansible/roles/rhscl-mysql-apb-openshift/tasks/dev.yml for localhost
TASK [rhscl-mysql-apb-openshift : set MySQL deployment with ephemeral storage to present] ***
fatal: [localhost]: FAILED! => {"msg": "The task includes an option with an undefined variable. The error was: 'mysql_password' is undefined\n\nThe error appears to have been in '/opt/ansible/roles/rhscl-mysql-apb-openshift/tasks/dev.yml': line 2, column 3, but may\nbe elsewhere in the file depending on the exact syntax problem.\n\nThe offending line appears to be:\n\n---\n- name: set MySQL deployment with ephemeral storage to {{ state }}\n  ^ here\nWe could be wrong, but this one looks like it might be an issue with\nmissing quotes.  Always quote template expression brackets when they\nstart a value. For instance:\n\n    with_items:\n      - {{ foo }}\n\nShould be written as:\n\n    with_items:\n      - \"{{ foo }}\"\n"}
PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=1    unreachable=0    failed=1   
+ EXIT_CODE=2
+ set +ex
+ '[' -f /var/tmp/test-result ']'
+ exit 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant