[one-users] Unable to auto start one and sunstone service in Ubuntu 13.10

kiran ranjane kiran.ranjane at gmail.com
Thu Jan 30 12:57:30 PST 2014


Hi Jaime,

The setup is quite simple, Tools needed are ucarp, rsync, Mysql
master-master replication.

We need to use a virtual IP which is configured using ucarp and that
virtual IP can be used to access Sunstone. I have setup this with 2 servers
but can configure ucarp with 3 or 4 servers. We need to modify the VIP-up
and VIP-down script in ucarp by adding "One" and Sunstone start script in
vip-up and one and Sun-stone stop scrip in vip-down script of ucarp. These
script makes sure that the IP is fail-over and fail-back between nodes and
also the one services are started or stopped on the nodes accordingly while
fail-over or fail-back happens.

Rsync is used to sync "ONE" (self-contained mode) folder from SERVER
A(MASTER NODE) to SERVER B , You can setup a cron job to sync the folder
once a day.

You can also use system-wide mode but you need to make sure all the folder
are synced between both the servers which are located in different location
in system-wide mode and also you will not face the start-up issue that I am
facing in contained-mode. However keep in mind you also need to exclude few
folders in rsync command so that they should not be synced between servers
like the var/datastore and logs files.
Open-nebula and mysql should be install on both the servers and they need
to be in sync from Server A to Server B. Open-nebula can be synced using
rync command and Mysql through Master-Master replication.

Next step is to create password-less ssh between serverA and serverB  and
password-less ssh between serverA and all kvm nodes, serverB and all KVM
node. (In my setup I have dedicated KVM nodes and dedicated cloud storage
management nodes which have Open-nebula and glustefs installed on same
node) So that when fail-over is triggered the ONE Server is able to
communicate from Server B with all the KVM nodes.

After you have installed open-nebula and configured rsync properly then we
can start with MYSQL Master-Master replication from Server A to Server B.
You need to replicated the database that was created while open-nebula was
installed. Make sure you check mysql version before setting up the M/M
replication because there are few variation in setup and parameters in
config file after 5.5 and up.

After the M/M replication is setup we need to make sure that it is always
running from server A to Server B and from server B to server A. We have
setup M/M replication so that any changes on open-nebula DB on server A is
synced on server B.

Next we need to make sure that "One" and Sunstone service are not running
on Server B at all that means it should also not run in start-up. Only
MySQL service should be running on server B, When fail over is triggered
ucarp vip-up script assigns virtual Ip to server B and then starts "one"
and Sunstone service on Server B and when fail-back is triggered then
vip-down scrip will stop the services and removes the virtual ip and
assigns it back to master node (Server A).

I have tested this and it works well. I get only 3 to 4 timeout request
when fail-over is triggered so this is quite instant and simple to
troubleshoot in-case of issues, No split brain as M/M replication is used
and both the database and always in sync, Mostly all the sync is from one
side Server A to B because server A is the master node and services are
running on one server at a time. Services on Server B starts only after
fail-over is triggered so the syncing of data from B to A is always less
because it is used as standby cloud storage server.

This Setup is simple and works well and do not need any complex packages
like lucci/ricci or corosync/pacemaker. Ucarp is also available on Centos
and Fedora you can also try on them

If you have any questions then you can get back to me.

Thanks and Regards
Kiran Ranjane



On Thu, Jan 30, 2014 at 2:59 PM, Jaime Melis <jmelis at opennebula.org> wrote:

> Hi Kiran,
>
> That sounds very interesting, at some point it would be great if you could
> elaborate a bit more on exactly how you have done it, but it looks really
> nice.
>
> The thing about self contained mode is that it's desgined for development
> or for custom solutions, such as yours. It's not intented for packaging or
> to provide commercial supoprt.
>
> So, in your particular case, I think you can fix this quite easily.
> Continue with the self-contained mode, but instead of copying those scripts
> (one and sunstone-server), install these files to /etc/init.d:
> https://github.com/OpenNebula/one/blob/master/share/pkgs/Ubuntu/opennebula
>
> https://github.com/OpenNebula/one/blob/master/share/pkgs/Ubuntu/opennebula-sunstone
>
> Then, make some changes to them so they work for system contained mode. It
> shouldn't be much change, maybe just sourcing the file were you have the
> ONE_LOCATION variable defined before doing one start and one stop.
>
> Let us know how it goes.
>
> Cheers,
> Jaime
>
>
>
>
>
>
> On Mon, Jan 27, 2014 at 8:06 PM, kiran ranjane <kiran.ranjane at gmail.com>wrote:
>
>> Hi Jaime,
>>
>> May I know which version of Ubuntu is officially supported for self
>> contained mode as we will be only using self-contain mode for Opennebula
>> because we have setup Automatic failover and failback of cloud management
>> without using luci/ricci or pacemaker/corosync.
>>
>> This setup is simple and very robust using ucarp,rsync and master-master
>> mysql replication, easy to setup and maintain, no complex things, no split
>> brain and works like a charm.
>>
>> Thanks and Regards
>> Kiran Ranjane
>>
>>
>> On Mon, Jan 27, 2014 at 3:39 PM, Jaime Melis <j.melis at gmail.com> wrote:
>>
>>> Hi,
>>>
>>> 13.10 is not yet supported. Can you instead use 13.04? You would be able
>>> to use packages then.
>>>
>>> If you must use 13.10, you should install from source in *system-wide*
>>> mode, not self-contained, and the copy these scripts to /etc/init.d (no the
>>> ones in the bin folder):
>>> https://github.com/OpenNebula/one/tree/master/share/pkgs/Ubuntu
>>>
>>> regards,
>>> Jaime
>>>
>>>
>>> On Fri, Jan 24, 2014 at 1:25 PM, kiran ranjane <kiran.ranjane at gmail.com>wrote:
>>>
>>>> Hello,
>>>>
>>>> I have installed ONE 4.4 from source and it is working fine, However
>>>> After reboot of the server one and sunstone service does not start, I have
>>>> to start it manually.
>>>>
>>>> -- I have copied the one and sunstone script from the bin folder to
>>>> /etc/init.d/ and also updated it in rc using update-rc.d one defaults and
>>>> same for sunstone but it still does not start after a reboot.
>>>>
>>>> -- I have install 4.4 in self-contained mode and variables are properly
>>>> configured as I can get the one command from shell prompt.
>>>>
>>>> Kindly let me know what else I can do to start the service after a
>>>> reboot
>>>>
>>>> Thanks and Regards
>>>> Kiran Ranjane
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opennebula.org
>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>>
>>>>
>>>
>>
>
>
> --
> Jaime Melis
> Project Engineer
> OpenNebula - Flexible Enterprise Cloud Made Simple
> www.OpenNebula.org | jmelis at opennebula.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20140131/eb1c7c2e/attachment-0002.htm>


More information about the Users mailing list