r96992 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r96991‎ | r96992 | r96993 >
Date:19:03, 13 September 2011
Author:asher
Status:deferred (Comments)
Tags:
Comment:
reset slaving on new master
Modified paths:
  • /trunk/tools/switch-master/10-master-readonly (modified) (history)
  • /trunk/tools/switch-master/15-master-pos (modified) (history)
  • /trunk/tools/switch-master/20-newmaster-pos (modified) (history)
  • /trunk/tools/switch-master/30-slaves (modified) (history)
  • /trunk/tools/switch-master/40-newmaster-rw (modified) (history)

Diff [purge]

Index: trunk/tools/switch-master/20-newmaster-pos
@@ -1,4 +1,4 @@
2 -#!/bin/sh
 2+#!/bin/bash
33
44 . config
55
Index: trunk/tools/switch-master/10-master-readonly
@@ -1,4 +1,4 @@
2 -#!/bin/sh
 2+#!/bin/bash
33
44 . config
55
Index: trunk/tools/switch-master/40-newmaster-rw
@@ -1,4 +1,4 @@
2 -#!/bin/sh
 2+#!/bin/bash
33 . config
44
55 ssh root@$newmaster 'sed -i~ '\''s/^\s*read-only/#read-only/'\'' /etc/my.cnf'
Index: trunk/tools/switch-master/15-master-pos
@@ -1,4 +1,4 @@
2 -#!/bin/sh
 2+#!/bin/bash
33
44 . config
55
Index: trunk/tools/switch-master/30-slaves
@@ -1,9 +1,9 @@
2 -#!/bin/sh
 2+#!/bin/bash
33
44 . config
55
66 # Turn off slave on new master, to avoid replication loop
7 -echo "slave stop;" | mysql -h $newmaster
 7+echo "slave stop; change master to master_host=''" | mysql -h $newmaster
88
99 # Change slaves to use new master
1010 sql="

Comments

#Comment by Hashar (talk | contribs)   19:17, 13 September 2011

out of curiosity, did you encounter any issue with dash shell?

Status & tagging log