Re: Ganeti Structure

42 views
Skip to first unread message

Iustin Pop

unread,
Aug 31, 2012, 1:29:47 PM8/31/12
to gan...@googlegroups.com
On Fri, Aug 31, 2012 at 05:51:15AM -0700, j b wrote:
> Howdy all,
>
> I am playing around with Ganeti and I would like to clarify the structure
> of Ganeti and it's terminology, to ensure I can use it as I wish,
> or change my design if I am mistaken.
>
> Imagine two physical nodes (node1 & node2) and two different virtual
> machines (guest1 & guest2). If I have understood the Ganeti docs correctly,
> I would like to set up two clusters (cluster1 & cluster2).

No, not really. Each node can be in only one cluster at any point in
time.

> Cluster1 has two nodes (node1 & node2) and I would like to then set up an
> instance of guest1 on this cluster so that it runs on node1 as the primary
> node1, and would spin up on node2 if node1 failed.
>
> I would like cluster2 to also consist of two nodes (the same node1 & node2)
> and on here bring up an instance of guest2 where node2 is the primary node,
> and in a failure of node2 guest2 would spin up on node1. So these two
> physical servers are failing over to each other.
>
> Can Ganeti run more than one cluster on the same node1? Or have I
> miss-understood and under one cluster comprising of these two nodes I can
> run two different instances and have different primary nodes per instance?

Yes, indeed, you only need one cluster. The "primary" setting is a
per-instance one, not a per-cluster.

thanks,
iustin

j b

unread,
Aug 31, 2012, 1:36:11 PM8/31/12
to gan...@googlegroups.com
On Friday, August 31, 2012 6:29:51 PM UTC+1, Iustin Pop wrote:
Yes, indeed, you only need one cluster. The "primary" setting is a
per-instance one, not a per-cluster.

thanks,
iustin

Ah I see, so one cluster of two nodes, but I can fire up two instance with the opposing nodes as masters for each instance?

Many thanks :) 

Iustin Pop

unread,
Aug 31, 2012, 1:41:14 PM8/31/12
to gan...@googlegroups.com
Yes. Or a cluster with N nodes, hosting many more than N instances, with
each instance's placement differing.

regads,
iustin

Patrick Hahn

unread,
Aug 31, 2012, 1:12:42 PM8/31/12
to gan...@googlegroups.com
A node can only belong to one cluster at a time. However this is fine since the primary and secondary nodes are set on the per-instance (i.e. guest) level. You would do something like (on node1)

gnt-cluster init cluster1.domain.com
gnt-node add node2.domain.com
gnt-instance add -t drbd --node=node1.domain.com:node2.domain.com guest1.domain.com 
gnt-instance add -t drbd --node=node2.domain.com:node1.domain.com guest2.domain.com 

And that should do what you're describing (assuming I understood properly). 

Thanks,
Patrick

On Fri, Aug 31, 2012 at 8:51 AM, j b <jwbe...@gmail.com> wrote:
Howdy all,

I am playing around with Ganeti and I would like to clarify the structure of Ganeti and it's terminology, to ensure I can use it as I wish, or change my design if I am mistaken.

Imagine two physical nodes (node1 & node2) and two different virtual machines (guest1 & guest2). If I have understood the Ganeti docs correctly, I would like to set up two clusters (cluster1 & cluster2).

Cluster1 has two nodes (node1 & node2) and I would like to then set up an instance of guest1 on this cluster so that it runs on node1 as the primary node1, and would spin up on node2 if node1 failed.

I would like cluster2 to also consist of two nodes (the same node1 & node2) and on here bring up an instance of guest2 where node2 is the primary node, and in a failure of node2 guest2 would spin up on node1. So these two physical servers are failing over to each other.

Can Ganeti run more than one cluster on the same node1? Or have I miss-understood and under one cluster comprising of these two nodes I can run two different instances and have different primary nodes per instance?

Many thanks for your time all.

P.s. Loving Ganeti so far, I hope it can do what I require as it seems very powerful!

Lance Albertson

unread,
Sep 2, 2012, 2:42:10 PM9/2/12
to gan...@googlegroups.com


On Fri, Aug 31, 2012 at 5:51 AM, j b <jwbe...@gmail.com> wrote:
I am playing around with Ganeti and I would like to clarify the structure of Ganeti and it's terminology, to ensure I can use it as I wish, or change my design if I am mistaken.

I just uploaded my slides from my Ganeti tutorial at LinuxCon 2012 [1][2] which may help clarify some of it. I included some diagrams as well. The hands on section might be useful for you as it walks you through using ganeti with its primary features under a vagrant environment that you can run on your laptop/workstation.

Cheers-


--
Lance Albertson
Associate Director of Operations
Oregon State University | Open Source Lab 

Reply all
Reply to author
Forward
0 new messages