Hi Thomas,
On Thu, Mar 27, 2008 at 7:01 PM, Thomas Glanzmann <[EMAIL PROTECTED]> wrote:
> Hello Chris,
> there is no need to put the vlan logic into the resource agent. Just
> configure the interface _before_ and use it _afterwards_. I have it
> running for ages on two different machines and it just works.
I'm a bit unsure what you mean. The vlan logic as far as I know is
done via the network start scripts in redhat, and debian. I would
guess some systems use ifconfig still, and some use ip. I'm unsure of
what the behaviour is when it comes to redhat, and debian.
If you use ifconfig, you still need to run vconfig before ifconfig
to create the interface for the vlan... eg:
# ifconfig eth0.65 1.2.3.4
SIOCSIFADDR: No such device
eth0.65: ERROR while getting interface flags: No such device
With ip it is very much the same, just a different error, but meaning
the same thing... eg:
# ip addr add 1.2.3.4 dev eth0.65
Cannot find device "eth0.65"
Of course once I run vconfig both of the above commands work as I want
them too... eg:
# vconfig add eth0 65
Added VLAN with VID == 65 to IF -:eth0:-
# ifconfig eth0.65 1.2.3.4
[EMAIL PROTECTED] ~ #ifconfig eth0.65
eth0.65 Link encap:Ethernet HWaddr 08:00:20:C0:FF:EE
inet addr:1.2.3.4 Bcast:1.255.255.255 Mask:255.0.0.0
inet6 addr: fe80::216:e6ff:fe86:865c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:26 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:4165 (4.0 KB)
Now I think what you're saying is that _you_ are quite fine having
this controlled externally from the heartbeat2 resource agents? This
seems weird to me. If either machine is rebooted (2 node cluster)
there is no automatic vlan config steps taken by heartbeat. That is
unless you configure the interfaces to come up at boot time, which of
course would be a bad thing. I do realize how easy it would be to put
a start script in there, and equally as easy to write a system daemon
myself to watch things that I want watched, and if it doesn't like
what it seems it contacts the other machine and tells it to take
over... Personally that's why I use heartbeat2, so I don't have to
write my own apps, and I am not saying heartbeat2 sucks, I am merely
saying that your idea defeats (in my opinion) the purpose of having
resources being able to come up on their own under heartbeat2's
control automagically.
It's quite possible that I'm missing something in the way I set up
VLAN trunked interfaces, and if there is a way that heartbeat2 can run
the vconfig stuff for me, then that would be great, and if not then
I'll probably write my own patch for it, and see how if I can
incorporate that into the main branch/tree whatever. As I said I'd be
happy to know how I could write my own pre-up-resource for a specific
resource, and if need be put my static routes, and vlan commands in
there. I just want things done cleanly, and using heartbeat2 is, in
my opinion, they way it should be done.
At the end of the day I want something that reduces the need for me to
manage another custom script in my already large enough collection of
custom scripts, and for heartbeat2 to utilize the OS built-in vconfig
tool. Just in case anyone is wondering vconfig is in the ubuntu
package "vlan".
Thanks,
Chris-
_______________________________________________
Linux-HA mailing list
[email protected]
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems