Bug 1247077
Summary: | [origin_devexp_625]Cannot sync user and db info to slave host for mysql | ||
---|---|---|---|
Product: | OKD | Reporter: | Wenjing Zheng <wzheng> |
Component: | Image | Assignee: | Martin Nagy <mnagy> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Wenjing Zheng <wzheng> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 3.x | CC: | bparees, dma, hripps, libra-bugs, mmccomas, xiuwang |
Target Milestone: | --- | Keywords: | UpcomingRelease |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2015-11-23 21:18:18 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
Wenjing Zheng
2015-07-27 09:43:33 UTC
Seems like the problem is that we replicate the created DB exclusively. From MySQL configuration file: binlog_do_db = ${MYSQL_DATABASE} If I understand the documentation correctly, this excludes all other databases. This will be problematic also if the user decides to use the admin account to create a new DB. The obvious fix will probably be to remove the offending line. still can't sync userdb to slave.The db "userdb" exist on master, but can't find it on slave. 1.On slave there is no db "userdb" [fedora@ip-10-150-81-42 mysql]$ oc rsh mysql-slave-3-vcwh1 -n dma1 bash-4.2$ mysql -u root mysql> show master status; +------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+------------------+ | mysql-bin.000002 | 107 | userdb | | +------------------+----------+--------------+------------------+ 1 row in set (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | test | +--------------------+ 4 rows in set (0.01 sec) 2. On master the db "userdb" exist [fedora@ip-10-150-81-42 mysql]$ oc rsh mysql-master-3-vhplg -n dma1 mysql> show master status; +------------------+----------+--------------+------------------+ | File | Position | Binlog_Do_DB | Binlog_Ignore_DB | +------------------+----------+--------------+------------------+ | mysql-bin.000004 | 401 | userdb | | +------------------+----------+--------------+------------------+ 1 row in set (0.00 sec) mysql> show slave hosts; +------------+-------------+------+------------+ | Server_id | Host | Port | Master_id | +------------+-------------+------+------------+ | 1183187913 | 172.17.0.68 | 3306 | 3769513643 | +------------+-------------+------+------------+ 1 row in set (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | userdb | +--------------------+ 4 rows in set (0.01 sec) mysql> exit We should now be syncing the user info database. This bug is blocked to verify by bug https://bugzilla.redhat.com/show_bug.cgi?id=1258423. If add pv to pod, the mysql-master can't be running, will hold to verify this bug. # oc get pods NAME READY STATUS RESTARTS AGE mysql-master-1-dc1g0 0/1 Image: openshift/mysql-55-centos7 is ready, container is creating 0 4m mysql-slave-1-6fo83 1/1 Running 0 5m Verified on below version: openshift v1.0.5-264-g11321c4 kubernetes v1.1.0-alpha.0-1605-g44c91b1 In slave pod: mysql> select Host,User,Password from mysql.user; +----------------------+--------+-------------------------------------------+ | Host | User | Password | +----------------------+--------+-------------------------------------------+ | localhost | root | | | mysql-master-1-ikrg3 | root | | | 127.0.0.1 | root | | | ::1 | root | | | localhost | | | | mysql-master-1-ikrg3 | | | | % | user | *1D187AFA5015ED7C5BB740D36D5DF0C367FF3872 | | % | root | *C4755A3CB3D1E519C5841771C7CD7BEB8A96AE24 | | % | master | *EC00D5C7300586463CDE5EB2DD9B2D0F4D7A1467 | +----------------------+--------+-------------------------------------------+ 9 rows in set (0.00 sec) mysql> show databases; +--------------------+ | Database | +--------------------+ | information_schema | | mysql | | performance_schema | | replication | | userdb | +--------------------+ 5 rows in set (0.00 sec) |