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

Re: Help with Scaled Cartridges Racing (mariadb galera)



Hi.
You could test for node and app uuids:

if [ $OPENSHIFT_APP_UUID == $OPENSHIFT_GEAR_UUID ]; then
   # this is the first great
else
    # this is no the first gear
fi

Also,  you could try to user ssh instead telnet. AFAIK, when app is scalable, it has an env var which holds a private key used to inter-gear communication.

Em 25/02/2014 06:48, "Andrew Lau" <andrew andrewklau com> escreveu:
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.

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!

Thanks,
Andrew


_______________________________________________
dev mailing list
dev lists openshift redhat com
http://lists.openshift.redhat.com/openshiftmm/listinfo/dev


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