Bug 1509476 - MariaDB provision failure on blank passwords
Summary: MariaDB provision failure on blank passwords
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Service Broker
Version: 3.7.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 3.7.0
Assignee: cchase
QA Contact: Weihua Meng
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-03 21:20 UTC by cchase
Modified: 2017-11-28 22:21 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
undefined
Clone Of:
Environment:
Last Closed: 2017-11-28 22:21:23 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2017:3188 0 normal SHIPPED_LIVE Moderate: Red Hat OpenShift Container Platform 3.7 security, bug, and enhancement update 2017-11-29 02:34:54 UTC

Description cchase 2017-11-03 21:20:08 UTC
Description of problem:
When provisioning a MariaDB APB but leaving passwords blank, password generation fails and provision subsquently fails.

Version-Release number of selected component (if applicable):


How reproducible:
100%

Steps to Reproduce:
1. Log in to console
2. Provision MariaDB APB
3. Leave (root or user) passwords blank

Actual results:
Provision fails with an error

Expected results:
Provision is successful

Additional info:
Sandbox log:

+ [[ provision --extra-vars {"_apb_plan_id":"dev","_apb_service_class_id":"14279bd3c56924e5c97c20b965e74f26","_apb_service_instance_id":"8c62def0-7dbe-4f4c-a2a6-e3eff33de9ed","mariadb_version":"10.0","mysql_database":"admin","mysql_root_password":"admin","mysql_user":"admin","namespace":"maria6"} == *\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:1000300000:0:apb user:/opt/apb:/sbin/nologin'
+ oc-login.sh
Attempting to login with a service account...
Logged into "https://kubernetes.default:443 " as "system:serviceaccount:dh-rhscl-mariadb-apb-prov-mpdt6:apb-6b92a63f-bd66-42b7-aeed-440bf7b6f47b" using the token provided.
You have access to the following projects and can switch between them with 'oc project <projectname>':
  * dh-rhscl-mariadb-apb-prov-mpdt6
    maria6
Using project "dh-rhscl-mariadb-apb-prov-mpdt6".
Welcome! See 'oc help' to get started.
+ set +x
ls: cannot access /etc/apb-secrets: No such file or directory
+ [[ -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":"14279bd3c56924e5c97c20b965e74f26","_apb_service_instance_id":"8c62def0-7dbe-4f4c-a2a6-e3eff33de9ed","mariadb_version":"10.0","mysql_database":"admin","mysql_root_password":"admin","mysql_user":"admin","namespace":"maria6"}'
 [WARNING]: Could not match supplied host pattern, ignoring: all
 [WARNING]: provided hosts list is empty, only localhost is available
[DEPRECATION WARNING]: The use of 'include' for tasks has been deprecated. Use 
'import_tasks' for static inclusions or 'include_tasks' for dynamic inclusions.
 This feature will be removed in a future release. Deprecation warnings can be 
disabled by setting deprecation_warnings=False in ansible.cfg.
[DEPRECATION WARNING]: include is kept for backwards compatibility but usage is
 discouraged. The module documentation details page may explain more about this
 rationale.. This feature will be removed in a future release. Deprecation 
warnings can be disabled by setting deprecation_warnings=False in ansible.cfg.
PLAY [Deploy rhscl-mariadb-apb to openshift] ***********************************
TASK [ansible.kubernetes-modules : Install latest openshift client] ************
skipping: [localhost]
TASK [ansibleplaybookbundle.asb-modules : debug] *******************************
skipping: [localhost]
TASK [rhscl-mariadb-apb-openshift : set mariadb deployment using persistent storage to present] ***
changed: [localhost]
TASK [rhscl-mariadb-apb-openshift : set volume claim state to present] *********
skipping: [localhost]
TASK [rhscl-mariadb-apb-openshift : set mariadb deployment using persistent storage to present] ***
skipping: [localhost]
TASK [rhscl-mariadb-apb-openshift : set rhscl-mariadb service state to present] ***
changed: [localhost]
TASK [rhscl-mariadb-apb-openshift : encode bind credentials] *******************
fatal: [localhost]: FAILED! => {"failed": true, "msg": "{{ lookup('mysql_password', '/tmp/pass chars=ascii_letters,digits') }}: lookup plugin (mysql_password) not found"}
	to retry, use: --limit @/opt/apb/actions/provision.retry
PLAY RECAP *********************************************************************
localhost                  : ok=2    changed=2    unreachable=0    failed=1   
+ EXIT_CODE=2
+ set +ex
+ '[' -f /var/tmp/test-result ']'
+ '[' -f /var/tmp/bind-creds ']'
+ exit 2

Comment 3 Weihua Meng 2017-11-07 09:41:04 UTC
blocked by bug https://bugzilla.redhat.com/show_bug.cgi?id=1510299

and
PR merged 3 days ago, latest openshift3/mariadb-apb was created 4 days ago.
Waiting for later image to test.

Comment 4 Weihua Meng 2017-11-08 08:55:55 UTC
Waiting for new image to test.

Comment 6 Weihua Meng 2017-11-09 05:53:42 UTC
Fixed in openshift3/mariadb-apb:v3.7.0-0.198.0.3

Provision is successful.

Logs:
+ [[ provision --extra-vars {"_apb_plan_id":"dev","_apb_service_class_id":"2c259ddd8059b9bc65081e07bf20058f","_apb_service_instance_id":"082c2060-5999-44f7-a471-0db02c8a0a3a","mariadb_version":"10.0","mysql_database":"admin","mysql_user":"admin","namespace":"mariadb1"} == *\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:1000180000:0:apb user:/opt/apb:/sbin/nologin'
+ oc-login.sh
Attempting to login with a service account...
Logged into "https://kubernetes.default:443" as "system:serviceaccount:rh-mariadb-apb-prov-gq5gm:apb-038ce0e1-ca26-45dd-ae37-c21fbce17599" using the token provided.
You have access to the following projects and can switch between them with 'oc project <projectname>':
  * mariadb1
    rh-mariadb-apb-prov-gq5gm
Using project "mariadb1".
Welcome! See 'oc help' to get started.
+ 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":"2c259ddd8059b9bc65081e07bf20058f","_apb_service_instance_id":"082c2060-5999-44f7-a471-0db02c8a0a3a","mariadb_version":"10.0","mysql_database":"admin","mysql_user":"admin","namespace":"mariadb1"}'
PLAY [Deploy rhscl-mariadb-apb to openshift] ***********************************
TASK [ansible.kubernetes-modules : Install latest openshift client] ************
skipping: [localhost]
TASK [ansibleplaybookbundle.asb-modules : debug] *******************************
skipping: [localhost]
TASK [rhscl-mariadb-apb-openshift : include_tasks] *****************************
included: /opt/ansible/roles/rhscl-mariadb-apb-openshift/tasks/dev.yml for localhost
TASK [rhscl-mariadb-apb-openshift : set mariadb deployment using persistent storage to present] ***
changed: [localhost]
TASK [rhscl-mariadb-apb-openshift : include_tasks] *****************************
skipping: [localhost]
TASK [rhscl-mariadb-apb-openshift : set rhscl-mariadb service state to present] ***
changed: [localhost]
TASK [rhscl-mariadb-apb-openshift : encode bind credentials] *******************
changed: [localhost]
PLAY RECAP *********************************************************************
localhost                  : ok=4    changed=3    unreachable=0    failed=0   
+ EXIT_CODE=0
+ set +ex
+ '[' -f /var/tmp/test-result ']'
+ '[' -f /var/tmp/bind-creds ']'
+ bind-init
Waiting for broker to gather the bind credentials...
Broker has received bind credentials.
Waiting for broker exec to complete...
+ exit 0

Comment 9 errata-xmlrpc 2017-11-28 22:21:23 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2017:3188


Note You need to log in before you can comment on or make changes to this bug.