Bug 1583895

Summary: [APB] mysql-apb update from 5.6 to 5.7 failed
Product: OpenShift Container Platform Reporter: Zihan Tang <zitang>
Component: Service BrokerAssignee: Jason Montleon <jmontleo>
Status: CLOSED ERRATA QA Contact: Zihan Tang <zitang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.9.0CC: aos-bugs, chezhang, jiazha, jmontleo, zhsun
Target Milestone: ---   
Target Release: 3.9.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-06-27 18:02:09 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zihan Tang 2018-05-30 02:19:06 UTC
Description of problem:
mysql-apb update from 5.6 to 5.7 failed 

Version-Release number of selected component (if applicable):
mysql-apb: v3.9.27

How reproducible:
always

Steps to Reproduce:
1. provision mysql 5.6 
2. create data in mysql pod
3. upgrade to 5.7 in backend or web console

Actual results:
upgrade to 5.7 failed.

sandbox log:
# oc logs -f apb-ea16373c-6662-4162-aac0-3448b2d38c34
.....

TASK [rhscl-mysql-apb-openshift : Restore database] ****************************
changed: [localhost]

TASK [rhscl-mysql-apb-openshift : Run mysql_upgrade] ***************************
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "oc exec -it -n 1oz3n mysql-5.7-dev-1-mk9jq -- /bin/bash -c \"mysql_upgrade -u root\"", "delta": "0:00:00.776787", "end": "2018-05-23 08:58:46.823383", "msg": "non-zero return code", "rc": 2, "start": "2018-05-23 08:58:46.046596", "stderr": "Unable to use a TTY - input is not a terminal or the right kind of file\ncommand terminated with exit code 2", "stderr_lines": ["Unable to use a TTY - input is not a terminal or the right kind of file", "command terminated with exit code 2"], "stdout": "Checking if update is needed.\nThis installation of MySQL is already upgraded to 5.7.21, use --force if you still need to run mysql_upgrade", "stdout_lines": ["Checking if update is needed.", "This installation of MySQL is already upgraded to 5.7.21, use --force if you still need to run mysql_upgrade"]}

PLAY RECAP *********************************************************************
localhost                  : ok=12   changed=10   unreachable=0    failed=1   

the old pod is not deleted. but data has been moved to new pod
# oc get pod 
NAME                     READY     STATUS    RESTARTS   AGE
mysql-5.6-prod-1-qvpt5   1/1       Running   0          4m
mysql-5.7-dev-1-mk9jq    1/1       Running   0          3m

this is caused by mysql in dependency  registry.access.redhat.com/rhscl/mysql-57-rhel7 update to 5.7.21.

Additional info:
the same issue in v3.10 : 
https://bugzilla.redhat.com/show_bug.cgi?id=1581627

Comment 6 Zihan Tang 2018-06-13 06:56:53 UTC
I use the image: v3.9.31 in brew registry to pre-test. It passed. 
I will wait for image ready in stage registry , change the status to Modified .

Comment 7 Zihan Tang 2018-06-15 06:24:27 UTC
image is ready , change it to ON_QA

Comment 8 Zihan Tang 2018-06-15 06:26:12 UTC
verified.
version: mysql-apb:v3.9.31

Comment 10 errata-xmlrpc 2018-06-27 18:02:09 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-2018:2013