hello junko-san!
On 2011-11-14 11:00, Junko IKEDA wrote:
> diff --git a/heartbeat/mysql b/heartbeat/mysql
> index eb14ac8..56a7b17 100755
> --- a/heartbeat/mysql
> +++ b/heartbeat/mysql
...
> @@ -281,6 +283,30 @@ The port on which the Master MySQL instance is listening.
> <content type="string" default="${OCF_RESKEY_replication_port_default}" />
> </parameter>
>
> +<parameter name="replication_hostname_suffix" unique="0" required="0">
> +<longdesc lang="en">
> +The hostname for MySQL replication.
> +For example, suppose the following situcation;
> +
> +# uname -n
> +node01
> +
> +# cat /etc/hosts
> +192.168.100.101 node01
> +192.168.100.102 node02
> +
> +192.168.200.101 node01-mysqlrep
> +192.168.200.102 node02-mysqlrep
in my setup, hostnames are like node01xxx, e.g. node01c (crossover)
or node01i (internal).
> @@ -548,8 +574,9 @@ set_master() {
> # from the laste master the slave replicated from, or freshly
> # reset with RESET MASTER.
>
> + master_host=$1-$OCF_RESKEY_replication_hostname_suffix
> ocf_run $MYSQL $MYSQL_OPTIONS_LOCAL $MYSQL_OPTIONS_REPL \
> - -e "CHANGE MASTER TO MASTER_HOST='$new_master_host', \
> + -e "CHANGE MASTER TO MASTER_HOST='$master_host', \
> MASTER_USER='$OCF_RESKEY_replication_user', \
>
> MASTER_PASSWORD='$OCF_RESKEY_replication_passwd' $master_params"
because i'm not using a "-" between the hostname and the suffix,
i would change the master_host generation part to something like:
> master_host="${new_master_host}${OCF_RESKEY_replication_hostname_suffix}"
also, is there/should there be any implication of the suffix on
the log files, e.g.
> master_log_file=`$CRM_ATTR -n $new_master_host-log-file-${INSTANCE_ATTR_NAME}
> -q -G`
vs.
> master_log_file=`$CRM_ATTR -n
> ${new_master_host}${OCF_RESKEY_replication_hostname_suffix}-log-file-${INSTANCE_ATTR_NAME}
> -q -G`
?
thanks for your contribution!
raoul
--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. [email protected]
Technischer Leiter
IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. [email protected]
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________
_______________________________________________________
Linux-HA-Dev: [email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/