[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Help with Scaled Cartridges Racing (mariadb galera)

On Wed, Feb 26, 2014 at 1:20 AM, Clayton Coleman <ccoleman redhat com> wrote:

On Feb 25, 2014, at 4:48 AM, Andrew Lau <andrew andrewklau com> wrote:

Hi guys,

I've been working on bringing MariaDB Galera [1] to OpenShift and so far I've quite successful with the help from many different people. I'm stuck on a few things though which I'm hoping someone could help me with.

- Determining a master gear for the database initialization
With the galera cluster, we need to have one gear create the database, drop test user. etc. all the normal stuff, however only one needs to do this. The problem is, starting the cartridge with min 3 gears, they will all race to start, this makes using a hook method not possible because there'll be too many inconsistencies. I'd ideally not want to be creating two separate cartridges just for this.

On your initial connection hook call you can sort the recieved ids and store an env var marking that id as your "elected" master.  Then to reelect just delete that env and restart.

So then this is a little like what I mentioned below, starting with one cartridge then going to the scale option and increasing the minimum gears? If not could you elaborate a little, I'm a little confused.. thanks!


So far the only option I can think of is starting the cartridge as one gear, and then adding the others after. But I'd ideally like to reduce the amount of work the user needs to do to get this up and running.

If anyone wants to take it for a spin, you'll need to put it behind a scaled web cartridge (eg. php). Right now you'll end up with X instances of mariadb in separate gears.

- Is telnet safe to use
I know with all recent OS installs, telnet is not bundled as a pre-installed package, and neither is nc. However openshift online nodes seem to have telnet accessible. Right now, I'm just using it to do inte-gear testing. ie. before we start the cluster, let's check which hosts are online so we don't try connect to a dead host. [2]

Any help would be much appreciated!



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]