Bug 183047 - [carp] carp stuck in INIT state
Summary: [carp] carp stuck in INIT state
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.0-BETA1
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-17 11:50 UTC by Ole Myhre
Modified: 2019-10-11 10:05 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ole Myhre 2013-10-17 11:50:00 UTC
When configuring carp on an interface that has no previous configuration (such as during boot), carp is stuck in INIT until vhid and inet address are set two more times.

How-To-Repeat: [root@fw1 ~]# ifconfig lagg0.1200 create
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24
[root@fw1 ~]# ifconfig lagg0.1200
lagg0.1200: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:25:90:9a:a6:e0
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 vhid 1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        vlan: 1200 parent interface: lagg0
        carp: INIT vhid 1 advbase 1 advskew 0
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24
ifconfig: ioctl (SIOCAIFADDR): Protocol not available
[root@fw1 ~]# ifconfig lagg0.1200
lagg0.1200: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:25:90:9a:a6:e0
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        vlan: 1200 parent interface: lagg0
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24
[root@fw1 ~]# ifconfig lagg0.1200
lagg0.1200: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:25:90:9a:a6:e0
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 vhid 1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        vlan: 1200 parent interface: lagg0
        carp: MASTER vhid 1 advbase 1 advskew 0
[root@fw1 ~]#
Comment 1 Gleb Smirnoff freebsd_committer freebsd_triage 2013-10-17 15:49:51 UTC
  Ole,

O> When configuring carp on an interface that has no previous configuration (such as during boot), carp is stuck in INIT until vhid and inet address are set two more times.

Yep, known problem. :( I tried to fix it a year ago, but backed out
fix due to some fallouts. I promise to get back to it, but won't
be in time before 10.0-RELEASE.

Meanwhile, the working command sequence would be:

[root@fw1 ~]# ifconfig lagg0.1200 create
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24 up

Notice the "up" keyword. It will make ifconfig(8) to do SIOCSIFFLAGS
kick to the interface.

In rc.conf you need to specify it too:

ifconfig_lagg0="vhid 1 10.0.0.1/24 up"

P.S. For reference, here is my bad attempt on fixing this:

http://freshbsd.org/commit/freebsd/r244678

It was reverted later.

-- 
Totus tuus, Glebius.
Comment 2 Gleb Smirnoff freebsd_committer freebsd_triage 2013-10-17 15:50:17 UTC
Responsible Changed
From-To: freebsd-bugs->glebius

Mine
Comment 3 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:17 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 4 WHR 2019-10-11 10:05:36 UTC
(In reply to Gleb Smirnoff from comment #1)

Thanks for the workaround.