Re: carp ip balancing (-current)

2007-09-25 Thread dane johansen
I went to colo, and checked what happened, as soon as a type:
ifconfig carp0 10.10.10.110 netmask 255.255.248.0 vhid 7 advskew 100
I get:
ifconfig carp0 10.10.10.110 netmask 255.255.248.0 vhid 7 advskew 100
uvm_fault(0xd6a07524, 0x0, 0, 3) - e
kernel: page fault trap, code=0
Stopped at carp_join_multicast+0x32:movl %eax, 0(%edx)
ddb

(i cann't type anything after that).
Version is:

OpenBSD 4.2-current as of Wed Sep 19, 2007

I tried it on two (identical IBM netvista desktops) (actually it's 4
netvistas, but 2 works perfectly well, but as soon as you try to add 3d
one...)

dmesg:

OpenBSD 4.2-current (GENERIC) #0: Wed Sep 19 08:48:10 PDT 2007
[EMAIL PROTECTED]
:/usr/src/sys/arch/i386/compile/GENERIC
cpu0: Intel(R) Pentium(R) 4 CPU 2.26GHz (GenuineIntel 686-class) 2.26 GHz
cpu0:
FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM
real mem  = 534802432 (510MB)
avail mem = 509419520 (485MB)
mainbus0 at root
bios0 at mainbus0: AT/286+ BIOS, date 12/02/02, BIOS32 rev. 0 @ 0xfd844,
SMBIOS rev. 2.31 @ 0xf01e0 (51 entries)
bios0: vendor IBM version 24KT33AUS date 12/02/2002
bios0: IBM 830531U
pcibios0 at bios0: rev 2.1 @ 0xfd700/0x900
pcibios0: PCI IRQ Routing Table rev 1.0 @ 0xfdf00/224 (12 entries)
pcibios0: PCI Interrupt Router at 000:31:0 (Intel 82371FB ISA rev 0x00)
pcibios0: PCI bus #2 is the last bus
bios0: ROM list: 0xc/0xb200! 0xcb800/0x1000 0xcc800/0x1000
0xe/0x1!
acpi at mainbus0 not configured
cpu0 at mainbus0
pci0 at mainbus0 bus 0: configuration mode 1 (no bios)
pchb0 at pci0 dev 0 function 0 Intel 82845G/GL rev 0x01
vga1 at pci0 dev 2 function 0 Intel 82845G/GL Video rev 0x01: aperture at
0x8800, size 0x800
wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation)
wsdisplay0: screen 1-5 added (80x25, vt100 emulation)
uhci0 at pci0 dev 29 function 0 Intel 82801DB USB rev 0x01: irq 11
uhci1 at pci0 dev 29 function 1 Intel 82801DB USB rev 0x01: irq 10
uhci2 at pci0 dev 29 function 2 Intel 82801DB USB rev 0x01: irq 5
ehci0 at pci0 dev 29 function 7 Intel 82801DB USB rev 0x01: irq 9
usb0 at ehci0: USB revision 2.0
uhub0 at usb0: Intel EHCI root hub, rev 2.00/1.00, addr 1
ppb0 at pci0 dev 30 function 0 Intel 82801BA AGP rev 0x81
pci1 at ppb0 bus 2
fxp0 at pci1 dev 8 function 0 Intel PRO/100 VE rev 0x81, i82562: irq 9,
address 00:09:6b:e1:d1:17
inphy0 at fxp0 phy 1: i82562EM 10/100 PHY, rev. 0
ichpcib0 at pci0 dev 31 function 0 Intel 82801DB LPC rev 0x01: 24-bit
timer at 3579545Hz
pciide0 at pci0 dev 31 function 1 Intel 82801DB IDE rev 0x01: DMA, channel
0 configured to compatibility, channel 1 configured to compatibility
wd0 at pciide0 channel 0 drive 0: IC35L040AVVN07-0
wd0: 16-sector PIO, LBA, 38162MB, 78156288 sectors
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 5
atapiscsi0 at pciide0 channel 1 drive 0
scsibus0 at atapiscsi0: 2 targets
cd0 at scsibus0 targ 0 lun 0: HL-DT-ST, CD-ROM GCR-8480B, 1.02 SCSI0
5/cdrom removable
cd0(pciide0:1:0): using PIO mode 4, Ultra-DMA mode 2
ichiic0 at pci0 dev 31 function 3 Intel 82801DB SMBus rev 0x01: irq 9
iic0 at ichiic0
admtemp0 at iic0 addr 0x4c: adm1032
auich0 at pci0 dev 31 function 5 Intel 82801DB AC97 rev 0x01: irq 9, ICH4
AC97
ac97: codec id 0x41445374 (Analog Devices AD1981B)
ac97: codec features headphone, 20 bit DAC, No 3D Stereo
audio0 at auich0
usb1 at uhci0: USB revision 1.0
uhub1 at usb1: Intel UHCI root hub, rev 1.00/1.00, addr 1
usb2 at uhci1: USB revision 1.0
uhub2 at usb2: Intel UHCI root hub, rev 1.00 /1.00, addr 1
usb3 at uhci2: USB revision 1.0
uhub3 at usb3: Intel UHCI root hub, rev 1.00/1.00, addr 1
isa0 at ichpcib0
isadma0 at isa0
pckbc0 at isa0 port 0x60/5
pckbd0 at pckbc0 (kbd slot)
pckbc0: using irq 1 for kbd slot
wskbd0 at pckbd0: console keyboard, using wsdisplay0
pcppi0 at isa0 port 0x61
midi0 at pcppi0: PC speaker
spkr0 at pcppi0
lpt0 at isa0 port 0x378/4 irq 7
npx0 at isa0 port 0xf0/16: reported by CPUID; using exception 16
pccom0 at isa0 port 0x3f8/8 irq 4: ns16550a, 16 byte fifo
pccom1 at isa0 port 0x2f8/8 irq 3: ns16550a, 16 byte fifo
fdc0 at isa0 port 0x3f0/6 irq 6 drq 2
fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
biomask ff65 netmask ff65 ttymask ffe7
pctr: user-level cycle counter enabled
mtrr: Pentium Pro MTRR support
uhidev0 at uhub1 port 2 configuration 1 interface 0
uhidev0: DELL DELL USB Keyboard, rev 1.10/1.05, addr 2, iclass 3/1
ukbd0 at uhidev0: 8 modifier keys, 6 key codes
wskbd1 at ukbd0 mux 1
wskbd1: connecting to wsdisplay0
dkcsum: wd0 matches BIOS drive 0x80
root on wd0a swap on wd0b dump on wd0b
WARNING: / was not properly unmounted- Hide quoted text -


On 9/20/07, Chad M Stewart [EMAIL PROTECTED] wrote:

 just a thought...  so you don't lose connectivity to the boxes, give
 each box its own IP.  Then use additional IPs for the carp
 interfaces.   Then you can lose connectivity to the carp IP but
 hopefully continue with the box IP.
 On my production pair I have assigned 172.16.0.0/16 to the physical
 

Re: carp ip balancing (-current)

2007-09-25 Thread Marco Pfatschbacher
On Tue, Sep 25, 2007 at 08:57:19AM -0700, dane johansen wrote:
 I went to colo, and checked what happened, as soon as a type:
 ifconfig carp0 10.10.10.110 netmask 255.255.248.0 vhid 7 advskew 100
 I get:
 ifconfig carp0 10.10.10.110 netmask 255.255.248.0 vhid 7 advskew 100
 uvm_fault(0xd6a07524, 0x0, 0, 3) - e
 kernel: page fault trap, code=0
 Stopped at carp_join_multicast+0x32:movl %eax, 0(%edx)
 ddb

You were unlucky and stepped on a bug in -current.
Claudio fixed that already:
 http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_carp.c?f=h#rev1.151



Re: carp ip balancing (-current)

2007-09-25 Thread dane johansen
Thanks.

On 9/25/07, Marco Pfatschbacher [EMAIL PROTECTED] wrote:

 On Tue, Sep 25, 2007 at 08:57:19AM -0700, dane johansen wrote:
  I went to colo, and checked what happened, as soon as a type:
  ifconfig carp0 10.10.10.110 netmask 255.255.248.0 vhid 7 advskew 100
  I get:
  ifconfig carp0 10.10.10.110 netmask 255.255.248.0 vhid 7 advskew 100
  uvm_fault(0xd6a07524, 0x0, 0, 3) - e
  kernel: page fault trap, code=0
  Stopped at carp_join_multicast+0x32:movl %eax, 0(%edx)
  ddb

 You were unlucky and stepped on a bug in -current.
 Claudio fixed that already:

 http://www.openbsd.org/cgi-bin/cvsweb/src/sys/netinet/ip_carp.c?f=h#rev1.151



Re: carp ip balancing (-current)

2007-09-23 Thread Marco Pfatschbacher
On Wed, Sep 19, 2007 at 09:07:52PM -0700, dane johansen wrote:
 Hi,
 
 I'm trying CARP ip balancing on openbsd 4.2 (-current). I have 3 boxes (host
 A, host B and host C) so I started configuring carp interfaces according
 manual:
 
 A# ifconfig carp0 10.10.10.100 netmask 255.255.248.0 vhid 7 link0 link1
 A# ifconfig carp1 10.10.10.100 netmask 255.255.248.0 vhid 8 advskew 100
 
 B# ifconfig carp0 10.10.10.100 netmask 255.255.248.0 vhid 7 advskew 100
 link0 link1
 B# ifconfig carp1 10.10.10.100 netmask 255.255.248.0 vhid
 
 At this point everything works but there is no IP load balancing, because on
 host B both interfaces are in backup mode. So I've enabled carp preempt on
 both hosts:
 
 A# sysctl net.inet.carp.preempt=1
 B# sysctl net.inet.carp.preempt=1
 
 Now carp1 is master on host B, and it's doing load balancing, so i decided
 to add host C (maybe we need to add this to example section in the manual,
 like it's done for arp load balancing? Or is it just coincidence and you
 don't really need carp preemtp?):

Looks all correct. And yes, you do need to enable carp preempt.

 C# ifconfig carp0 10.10.10.100 netmask 255.255.248.0 vhid 7 advskew 200
 link0 link1
 
Nothing wrong with that.
However, if you want to spread the load over 3 servers you'll need
3 carp interfaces each, where each server should be master for one
of them.

 As soon as I wrote this command I lost connection to host C (did that
 remotely), so I guess tomorrow I'll have to check what happened, but maybe
 someone knows what did I do wrong (maybe advskew should equal for all backup
 hosts in the pool? but I assumed that you have to manage priorities that's
 why I've set it to 200, or maybe the fact that I've set carp.preempt is
 messing around something?)
 
Not supposed to happen.
Do you have more infos about what went wrong on host C ?


Marco