mysql RA improvements #98

Closed
wants to merge 5 commits into from

5 participants

@m0n5t3r

This patch

  • fixes an error that comes up when replication is not working: $secs_behind is NULL, which causes an error in numerical comparisons and leads if to choose the wrong branch (thus leaving the reader attribute on)
  • adds a writable attribute for the master
  • fixes a line indent in check_slave (sorry, I just had to do it :-/)
@fghaas
Cluster Labs member

NACK. This part has to go; it was in Yves' original draft and was thrown out. It's pointless; you don't need this attribute. You just tie your colo constraints to the Master role of the M/S set.

all righty... I'll have to find how to do that in the wonderfully clear and concise documentation, I guess :P

Cluster Labs member
colocation c_writer_ip_on_master inf: p_ip ms_mysql:Master

... where p_ip is your "writer VIP" and ms_mysqlis your MySQL master/slave set.

@fghaas
Cluster Labs member

This makes sense to me, I'd just prefer [ "$secs_behind" = "NULL" ] (with quotes). Or just do [ "$secs_behind" = "NULL" ] && secs_behind = 0, and then leave the comparison to $OCF_RESKEY_max_slave_lag as is.

setting it to zero is not a good idea, you want infinity ;)

I'll just quote it (I actually stood on the fence a bit, but then I figured it should have a value at all times...)

@fghaas
Cluster Labs member

Fair enough. :)

@dmuhamedagic

I think there's no contest here. For once :) @m0n5t3r, it would be great if you could issue a new pull request, so that we don't have patch, patch back. Thanks!

@grooverdan

can be closed as per #387

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment