From 9aa70372ac965781e0ed8730f897658eba3534aa Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Tue, 14 Oct 2014 18:43:43 +0200 Subject: [PATCH] MT#9579 [CARRIER] use database.central.dbmaster config as MASTER on local MySQL instance database.central.dbhost must point to db01 ( share IP ) Change-Id: Ib57e525381859d8d2820c70bd28837bfa6b36e6d (cherry picked from commit 872ded0c1d775cc9973863b69547e90c8a81a36a) --- sbin/ngcp-sync-constants | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/sbin/ngcp-sync-constants b/sbin/ngcp-sync-constants index 761ec6e4..6aca6832 100755 --- a/sbin/ngcp-sync-constants +++ b/sbin/ngcp-sync-constants @@ -602,17 +602,16 @@ sub do_slave_sync { my $dbhost = $yml->[0]->{database}->{local}->{dbhost}; my $dbport = $yml->[0]->{database}->{local}->{dbport}; - my $mhost = $yml->[0]->{database}->{central}->{dbhost} || "localhost"; - my $mport = $yml->[0]->{database}->{central}->{dbport} || 3306; + my $mhost = $yml->[0]->{database}->{central}->{dbmaster}; + my $mport = $yml->[0]->{database}->{central}->{dbport}; my $user = $yml->[0]->{mysql}->{repuser}; my $pass = $yml->[0]->{mysql}->{reppassword}; my $hostname = hostname(); - if ( $mhost eq "localhost" ) { + if ( $yml->[0]->{database}->{central}->{dbhost} eq "localhost" ) { print "database.central.dbhost is localhost. skipping.\n"; return } - #system('ssh -o "StrictHostKeyChecking=no" -o "UserKnownHostsFile=/dev/null" root@'. $mhost ." /usr/share/ngcp-ngcpcfg/helper/check-for-mysql"); my $dbh = connect_db($dbhost, $dbport, 1); eval {