Safely pairing HA-Proxy with virtual network interface providers like Keepalived or Heartbeat

Nathan Evans' Nemesis of the Moment

This is sort of a follow-up to the Deploying HA-Proxy + Keepalived with Mercurial for distributed config post.

During testing we were coming across an issue where the HA-Proxy instance running on the slave member of our cluster would fail to bind some of its frontend proxies:

After some head scratching I noticed that the problem was only arising on those proxies that explicitly defined the IP address of a virtual interface that was being managed by Keepalived (or maybe Heartbeat for you).

This is because both of these High-Availability clustering systems use a rather simplistic design whereby the “shared” virtual IP is only installed on the active node in the cluster. While the nodes that are in a dormant state (i.e. the slaves) do not actually have those virtual IPs assigned to them during that state. It’s a sort of “IP address hot-swapping” design. I learnt this by executing…

View original post 241 more words

Advertisements

rpmbuild behaviour: CentOS5 vs. CentOS6

nareshovの日記

Those of you who’ve tried building RPMs for c5 on a c6 machine might’ve faced the symptoms described in http://samixblog.blogspot.com/2011/11/yum-errno-3-error-performing-checksum.html

The cause seems to involve a couple of things: 1. c6 having adopted a stronger file digest algorithm (sha256 as opposed to md5 in c5) and 2. compressing the payload with xz (as opposed to nothing in c5).

This is easily remedied by passing relevant options to `rpmbuild’ and `createrepo’.

If you’re using fpm in your CI, you can now append the following to your fpm command invocation:

--rpm-rpmbuild-define '_source_filedigest_algorithm md5' 
--rpm-rpmbuild-define '_binary_filedigest_algorithm md5' 
--rpm-rpmbuild-define '_source_payload nil' 
--rpm-rpmbuild-define '_binary_payload nil' 

And invoke createrepo as `createrepo -d -s sha1 –update /path/to/rpms/for/c5′

UPDATE (2012-04-23):

fpm now supports quick shortcuts to the above:

% fpm --help [...] --rpm-digest sha512|md5|sha384|sha256|sha1 (rpm only) Select a digest algorithm. md5 works on the most platforms. (default: "md5") --rpm-compression xz|gzip|bzip2 (rpm only) Select a compression method. gzip…

View original post 7 more words