MT#9573 ngcp-sync-constants: [CARRIER] add sp1, sp2 to the list of hosts to copy perms from localhost

In carrier central.dbhost points to db01a so any connection will use network even db01a|db01b. This connections will be resolved by mysql as sp1|sp2. So we need to add those perms too


Change-Id: Ie09aa15209a9aa5170849a17e383df1d6fc07c4c
changes/59/359/2
Victor Seva 11 years ago committed by Víctor Seva
parent 0e77003df4
commit 8afc87d5e2

@ -574,6 +574,8 @@ sub do_grant_slaves
print "skip do_grant_slaves\n";
return;
}
push @hosts, 'sp1';
push @hosts, 'sp2';
print "--> db cluster node $hostname detected. grant repo user\n" if $debug;
my $dbh = connect_db($dbhost, $dbport, $mysql_root);
@ -627,7 +629,7 @@ sub do_slave_sync
);
# mysql sipwise user
my ($mysql_user, $mysql_pass) = get_mysql_credentials();
my @hosts = ('localhost');
my @hosts = ('localhost', 'sp1', 'sp2');
grant_user(dbh => $dbh, user => $mysql_user, hosts => \@hosts, repuser => 0 );
sync_user( dbh => $dbh, user => $mysql_user, pass => $mysql_pass );
# create localhost users if we need to recreate grants after dump excluding mysql table

Loading…
Cancel
Save