engineyard / eydr

EY Disaster Recovery Recipes (Unsupported)
http://www.engineyard.com
3 stars 3 forks source link

Position verification may not match in all cases #2

Closed jahio closed 9 years ago

jahio commented 11 years ago
The following positions will match if replication is caught up
Master: sender
Slave:  169/EB0255C8

This may not exactly match in all cases. Looking at the code, it's relying on awk to figure out the position of where each item is:

      receiver = `ssh deploy@#{@slave_public_hostname} "ps -efa | pgrep -fl receiver | head -1" |  awk '{print $7}'`
      sender = `ssh deploy@#{@master_public_hostname} "ps -efa | pgrep -fl sender | head -1" |  awk '{print $9}'`

This can be rather fragile and may not actually work as expected, as we've seen above. I'd recommend refactoring this step to get the actual position from both master and slave via direct query to each and print that out instead of relying on ps output piped through three different commands.

mdolian commented 9 years ago

Closing because outdated.