Set up three vnet jails, bridged together. Run carp between two of them.
Attempt to provoke locking / epoch issues.
Details
- Reviewers
mav emaste melifaro asomers - Group Reviewers
network - Commits
- rG64bb05e04fc3: carp tests: Basic functionality test
rS359828: carp tests: Basic functionality test
Diff Detail
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 30301 Build 28074: arc lint + arc unit
Event Timeline
LGTM, please see comment inline.
tests/sys/net/if_carp.sh | ||
---|---|---|
49 | Would it be possible to prefix jail names with the the test name to reduce the possibility of jail name clashes? |
tests/sys/net/if_carp.sh | ||
---|---|---|
58 | Maybe worth moving this test to netinet/, as it doesn't share any ipv4/ipv6 code? |
Would it be possible to add IPv6 counterpart to this test, so both IPv4 and IPv6 control plane parts gets covered?
Generally looks good to me, especially if we just test locking. For genera-purpose testing would be good to test master election, failover, etc.
tests/sys/net/if_carp.sh | ||
---|---|---|
59 | Shouldn't this have /32 mask? I am curios how it works for routing table with another IP from the same subnet with /29, if it works. |
That'll hopefully be pretty straightforward. I'll give that a try.
tests/sys/net/if_carp.sh | ||
---|---|---|
49 | Possibly, but I'm not sure it'll help. Many of these tests mess with the host system routing table (by keeping epair interfaces in the host vnet, and assigning addresses). So we'd have to do more than just change the jail names. We'd also want to do that manually (or at least deterministically), because debugging tests with random jail names is painful. | |
58 | Yeah, that makes sense. I'd put it here because it's somewhat similar in nature to the bridge and epair tests, but that code does live in net/. | |
59 | I have no idea. I don't pretend to understand carp. I mostly transposed the test script I initially used to trigger the panics this test tries to provoke. |
tests/sys/netinet/carp.sh | ||
---|---|---|
63 ↗ | (On Diff #70265) | That gives carp a bit of time to come up. Otherwise we risk trying to ping an address that's not there yet. |
tests/sys/netinet/carp.sh | ||
---|---|---|
63 ↗ | (On Diff #70265) | It's unnecessarily slow on fast systems, and could potentially cause false negatives on slow systems. Please change it to a polling loop. |
tests/sys/net/if_carp.sh | ||
---|---|---|
49 | Indeed, there are a bunch of tests that changes routing in the host system. Ideally we'd want to reduce the number of such tests or at least not increase it :-) I've changed a bunch of mine tests to use dual jail configuration to avoid changes in the host system and I plan to convert more. I totally agree that random jail names complicates debugging a lot. | |
58 | Thank you! |
Wait until one of the two jails has become carp master
Waiting until one of them leaves INIT state is insufficient. There's a
transition period where both carp jails are in BACKUP state, and the carp
address is unreachable.