Bug 1505037

Summary: mysql pod is not debug friendly when passwd-change.sh failed
Product: Red Hat Software Collections Reporter: Kenjiro Nakayama <knakayam>
Component: rh-mysql57-containerAssignee: Augusto Caringi <acaringi>
Status: CLOSED UPSTREAM QA Contact: qe-baseos-daemons
Severity: high Docs Contact:
Priority: unspecified    
Version: rh-mysql57CC: aos-bugs, hhorak, jokerman, mmccomas, mmuzila
Target Milestone: ---   
Target Release: 3.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-02-26 16:09:26 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 Kenjiro Nakayama 2017-10-21 10:41:40 UTC
Description of problem:
- When passwd-change.sh in mysql pod failed, mysql pod will never starts and we cannnt debug.
- One customer hit following error and we cannot debug it.

  $ oc logs mysql-1-x95v8 -c mysql
  ~~~
  OUTPUT:
  ---> 14:16:58     Processing MySQL configuration files ...
   
   ... snip ...
   
  2017-10-18T14:16:59.149617Z 0 [Note] /opt/rh/rh-mysql57/root/usr/libexec/mysqld: ready for connections.
  Version: '5.7.16'  socket: '/tmp/mysql.sock'  port: 0  MySQL Community Server (GPL)
  2017-10-18T14:16:59.535076Z 2 [Note] Access denied for user 'UNKNOWN_USER'@'localhost' (using password: NO)
  ---> 14:16:59     MySQL started successfully
  ---> 14:16:59     Setting passwords ...
  2017-10-18T14:16:59.558903Z 3 [Note] Access denied for user 'root'@'localhost' (using password: NO)
  ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
  ~~~

Version-Release number of selected component (if applicable):
- registry.access.redhat.com/rhscl/mysql-57-rhel7 (4ae3a3f4f409)

How reproducible:
- We still don't know why "Access denied for user 'root'@'localhost'" happened.

Actual results:
- We had to rebuild MySQL image and put it on public registry.

Expected results:
- Script continue to run and start mysql process. Then, we can debug it.

Additional info:
- Proposal patch https://github.com/sclorg/mysql-container/pull/199

Comment 4 Honza Horak 2018-01-16 08:44:46 UTC
PR merged: https://github.com/sclorg/mysql-container/pull/199