Vcenter-as-compute: setup-vnc-galera fails when executing mysql_install_db

Bug #1694570 reported by Sarath
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R4.0
Fix Committed
Critical
amudhar
Trunk
Fix Committed
Critical
amudhar

Bug Description

This issue seen on Vcenter-as-compute sanity setup with latest #16 (newton) during fab setup_all
Please find below the details,

::
::
2017-05-30 17:04:18:015149: [root@10.87.36.10] out: [localhost] local: sudo mv /tmp/tmprfc2IB/cmon.cnf /etc/cmon.cnf
2017-05-30 17:04:18:030836: [root@10.87.36.10] out: [localhost] local: echo 1 > /etc/contrail/galeraid
2017-05-30 17:04:18:038368: [root@10.87.36.10] out: [localhost] local: chkconfig mysql on
2017-05-30 17:04:18:041122: [root@10.87.36.10] out: [localhost] local: chown -R mysql:mysql /var/lib/mysql/
2017-05-30 17:04:18:044572: [root@10.87.36.10] out: [localhost] local: service mysql restart
2017-05-30 17:04:18:052176: [root@10.87.36.10] out: Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details.
2017-05-30 17:04:55:406122: [root@10.87.36.10] out:
2017-05-30 17:04:55:406271: [root@10.87.36.10] out: Warning: local() encountered an error (return code 1) while executing 'service mysql restart'
2017-05-30 17:04:55:406343: [root@10.87.36.10] out:
2017-05-30 17:04:55:406414: [root@10.87.36.10] out: [localhost] local: mysql_install_db --user=mysql --ldata=/var/lib/mysql
2017-05-30 17:04:55:406487: [root@10.87.36.10] out: mysql_install_db: [ERROR] unknown variable 'ldata=/var/lib/mysql'
2017-05-30 17:04:55:410246: [root@10.87.36.10] out: 2017-05-30 17:04:55 [ERROR] Unrecognized options
2017-05-30 17:04:55:410370: [root@10.87.36.10] out:
2017-05-30 17:04:55:410449: [root@10.87.36.10] out: Fatal error: local() encountered an error (return code 1) while executing 'mysql_install_db --user=mysql --ldata=/var/lib/mysql'
2017-05-30 17:04:55:410514: [root@10.87.36.10] out:
2017-05-30 17:04:55:410579: [root@10.87.36.10] out: Aborting.
2017-05-30 17:04:55:410639: [root@10.87.36.10] out:
2017-05-30 17:04:55:442570:
2017-05-30 17:04:55:442983: Disconnecting from 10.87.36.20... done.
2017-05-30 17:04:55:507218: Disconnecting from 10.87.36.15... done.
2017-05-30 17:04:55:621216: Disconnecting from 10.87.36.19... done.
2017-05-30 17:04:55:735081: Disconnecting from 10.87.36.18... done.
2017-05-30 17:04:55:798946: Disconnecting from 10.87.36.12... done.
2017-05-30 17:04:55:814656: Disconnecting from 10.87.36.21... done.
2017-05-30 17:04:55:928859: Disconnecting from 10.87.36.11... done.
2017-05-30 17:04:55:960760: Disconnecting from 10.87.36.10... done.
2017-05-30 17:04:56:074927:
2017-05-30 17:03:58:572925: Warning: sudo() received nonzero return code 1 while executing 'ip addr | grep 10.87.36.25'!
2017-05-30 17:03:58:572925:
2017-05-30 17:03:58:572925:
2017-05-30 17:04:09:833724: Warning: sudo() received nonzero return code 1 while executing 'service haproxy restart'!
2017-05-30 17:04:09:833724:
2017-05-30 17:04:09:833724:
2017-05-30 17:04:10:568258: Warning: sudo() received nonzero return code 1 while executing 'service haproxy restart'!
2017-05-30 17:04:10:568258:
2017-05-30 17:04:10:568258:
2017-05-30 17:04:11:348750: Warning: sudo() received nonzero return code 1 while executing 'service haproxy restart'!
2017-05-30 17:04:11:348750:
2017-05-30 17:04:11:348750:
2017-05-30 17:04:55:443106: Fatal error: sudo() received nonzero return code 1 while executing!
2017-05-30 17:04:55:443106:
2017-05-30 17:04:55:443106: Requested: setup-vnc-galera --self_ip 10.87.36.10 --keystone_ip 10.87.36.25 --galera_ip_list 10.87.36.10 10.87.36.11 10.87.36.12 --internal_vip 10.87.36.25 --openstack_index 1 --zoo_ip_list 10.87.36.10 10.87.36.11 10.87.36.12 --keystone_user keystone --keystone_pass keystone --cmon_user cmon --cmon_pass cmon --monitor_galera True
2017-05-30 17:04:55:443106: Executed: sudo -S -p 'sudo password:' /bin/bash -l -c "cd /opt/contrail/bin && setup-vnc-galera --self_ip 10.87.36.10 --keystone_ip 10.87.36.25 --galera_ip_list 10.87.36.10 10.87.36.11 10.87.36.12 --internal_vip 10.87.36.25 --openstack_index 1 --zoo_ip_list 10.87.36.10 10.87.36.11 10.87.36.12 --keystone_user keystone --keystone_pass keystone --cmon_user cmon --cmon_pass cmon --monitor_galera True"
2017-05-30 17:04:55:443106:
2017-05-30 17:04:55:443142: Aborting.

Revision history for this message
Sarath (nsarath) wrote :

nsarath@ubuntu-build04:/auto/cores/1694570$ ls -ltrd *
-rw-r--r-- 1 nsarath test 24309760 May 30 17:44 Esxi-2-log.tar
-rw-r--r-- 1 nsarath test 251525120 May 30 17:45 Ctrl-A-log.tar
-rw-r--r-- 1 nsarath test 290150400 May 30 17:45 Ctrl-B-log.tar
-rw-r--r-- 1 nsarath test 24064000 May 30 17:45 Esxi-1-log.tar
-rw-r--r-- 1 nsarath test 272128000 May 30 17:45 Ctrl-C-log.tar
-rw-r--r-- 1 nsarath test 15626240 May 30 17:45 Kvm-1-log.tar
-rw-r--r-- 1 nsarath test 8253440 May 30 17:46 Ctrl-A-Utils.tar

Revision history for this message
Rudra Rugge (rrugge) wrote :

Sachin - can you reassign this bug for galera provisioning issue. Ignatious might know the issue.

Revision history for this message
Ignatious Johnson Christopher (ijohnson-x) wrote :

As per the mysql documentation,

https://dev.mysql.com/doc/refman/5.6/en/mysql-install-db.html,
--ldata option for mysql_install_db is deprecated from 5.6.20 of mysql

Should replace it with --datadir

Revision history for this message
Ranjeet R (rranjeet-n) wrote :

https://dev.mysql.com/doc/refman/5.7/en/mysql-install-db.html

In Ubuntu 16.04, MySQL version is 5.7 where mysql_install_db is deprecated and the functionality has been integrated into mysqld itself. To initialize a MySQL installation, call "mysqld --initialize". Note that having an existing /var/lib/mysql directory will fail the initialization.

https://dev.mysql.com/doc/refman/5.7/en/mysql-install-db.html has the steps.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/32318
Submitter: amudha ramachandran (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/32320
Submitter: amudha ramachandran (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/32318
Submitter: amudha ramachandran (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32320
Committed: http://github.com/Juniper/contrail-provisioning/commit/79d644c3a0c7bed176c1806427ef920b2403d971
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 79d644c3a0c7bed176c1806427ef920b2403d971
Author: Amudha <email address hidden>
Date: Wed May 31 13:39:17 2017 -0700

Fix mysql_install_db for 16.04 in setup-vnc-galera

In Ubuntu 16.04, MySQL version is 5.7 where mysql_install_db
is deprecated, update setup-vnc-galera to accomodate this.

Change-Id: I5aab27b2b737e3aacf75e3f44772efcdde0b4c94
Closes-Bug: #1694570

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R4.0

Review in progress for https://review.opencontrail.org/32338
Submitter: amudha ramachandran (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32338
Committed: http://github.com/Juniper/contrail-provisioning/commit/29e9bde88d5fec9035d7d89969d2e544404d6f9d
Submitter: Zuul (<email address hidden>)
Branch: R4.0

commit 29e9bde88d5fec9035d7d89969d2e544404d6f9d
Author: Amudha <email address hidden>
Date: Wed May 31 20:46:47 2017 -0700

Fix mysql_install_db for 16.04 in setup-vnc-galera

Remove /var/lib/mysql before calling mysql_install_db in Ubuntu 16.04

Change-Id: I49cb3cd0f5986432cf78d962edbc37be08adbf16
Closes-Bug: #1694570

Revision history for this message
amudhar (amudha) wrote :

mysql_install_db in galera_setup.py needs additional fix. Ranjeet is looking into it.

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/32318
Submitter: amudha ramachandran (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/32318
Committed: http://github.com/Juniper/contrail-provisioning/commit/c35cc10eccb66a54bf51770e771d3b6c2e5ef64e
Submitter: Zuul (<email address hidden>)
Branch: master

commit c35cc10eccb66a54bf51770e771d3b6c2e5ef64e
Author: Amudha <email address hidden>
Date: Thu Jun 8 09:26:33 2017 -0700

Fix mysql_install_db for 16.04 in setup-vnc-galera

Fix missing commit from R4.0 into master
In Ubuntu 16.04, MySQL version is 5.7 where mysql_install_db
is deprecated, update setup-vnc-galera to accomodate this.

Change-Id: Ib9254b4e209ade5a4ce149359e6f0276763875f4
Closes-Bug: #1694570

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.