On Tue, Apr 23, 2013 at 11:05 PM, <
mitc...@ucar.edu> wrote:
Hi,
> I'm trying to understand the usage of gnt-network and gnt-group and some
> stuff is not making sense. I'm not sure if it's something I'm doing or if
> I'm hitting some kind of bug. What I would like to accomplish (and I don't
> think the new network type really incorporates all of this) is for the
> 'network' to be something which is only active on one node at a time. My
> goal is to be able to move a group of instances and their associated subnet
> from one location to another where there is only layer 3 connectivity
> between them. To do so, I would have some concept of starting a network on a
> node before the instances associated with it were booted and if I needed to
> move the instances to a different node the network would have to be shutdown
> first. It would be a lot like what has to be done with the DRBD disks
> associated with an instance, only I imagine that usually the network would
> be used by multiple instances which would have to move as a group. I plan
> initially to try and kludge something together using the RAPI and wanted to
> get a good grip on how networks and groups work first.
Indeed, Ganeti doesn't do this yet. There is a Google Summer of Code
Idea to get this implemented.
The only other alternative would be hacking it up in the "ifup" script
for kvm (supposing you use kvm. if you use xen we have a xen hackathon
project to port the kvm ifup script to xen). Finally an option for
your case would be to connect and disconnect the network to all nodes
of a nodegroup at once. So your workload would be:
- connect the network to the second nodegroup
- migrate all instances from nodegroup1 to nodegroup2
- disconnect the network from nodegroup1
A hook at "connect" time could take care of bringing it up or down on
all the nodes of the target group.
If you have interested students (since you come from a .edu domain)
perhaps we can work together on a design for the GSoC project, and you
could mentor them together with us.
> One problem is I can't seem to get an instance to be associated with a
> network. I created an instance whose IP is defined inside of the range of
> the network, but that wasn't enough to make it associated. And when I try to
> add the network manually I get an error I don't really understand.
>
> # gnt-network info cnet1
> Network name: cnet1
> UUID: bcd9523d-bab6-4af0-acf2-5120ccb83559
> Serial number: 1
> Subnet:
192.168.5.0/24
> Gateway: 192.168.5.251
> IPv6 Subnet: None
> IPv6 Gateway: None
> Mac Prefix: None
> Size: 256
> Free: 253 (98.83%)
> Usage map:
> 0 X............................................................... 63
> 64 ................................................................
> 127
> 128 ................................................................
> 191
> 192 ...........................................................X...X
> 255
> (X) used (.) free
> externally reserved IPs:
> 192.168.5.0, 192.168.5.251, 192.168.5.255
> connected to node groups:
> ['default', 'bridged', 'xen-br1']
> ['mlgroup', 'bridged', 'xen-br1']
> ['nwscgroup', 'bridged', 'xen-br1']
> not used by any instances
>
> # gnt-instance modify --net 0:ip=192.168.5.5 testvm6.local
> Failure: prerequisites not met for this operation:
> error type: wrong_state, error details:
> Conflicting IP address found: '192.168.5.5' != 'cnet1'
Indeed this error could probably use some improvement.
What I think it means is that it won't allow you to use an ip from the
"cnet1" network unless the nic itself is actually connected to that
network. But this definitely deserves a bug so that it can be reworded
properly.
Can we see a gnt-instance info, to be sure?
Also you can try:
gnt-instance modify --net 0:network=cnet1
or
gnt-instance modify --net 0:network=cnet1,ip=192.168.5.5
(which one depends on which ip the nic already has configured)
> #
>
> I've also been trying to create some node groups but the output of gnt-group
> always says they are empty. This is despite the face that gnt-instance
> actually reports the instance as being in the group.
>
This is a bug introduced while moving the queries to confd. Will file an issue.
Thanks,
Guido