Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

networking: apply CNI args to the default networks as well #2985

Merged
merged 1 commit into from Aug 3, 2016

Conversation

squeed
Copy link
Contributor

@squeed squeed commented Jul 26, 2016

Fixes #2980

// We don't do this earlier because we also load networks in other contexts
for _, n := range nets {
n.runtime.Args = e.netsLoadList.SpecificArgs(n.conf.Name)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.02$: I would've inserted a newline here

@steveej
Copy link
Contributor

steveej commented Jul 26, 2016

Please add a test for this functionality for

  • --net=default:IP=...
  • --net=default-restricted:IP=...
  • --net=some-non-default:IP=...

and checks if that IP has actually been allocated.
Also please make sure that we error out correctly in case the IP is already in use.

@squeed
Copy link
Contributor Author

squeed commented Aug 2, 2016

Tests done - ready for review ( @steveej )


func TestNetIPConflict(t *testing.T) {
NewNetIPConflictTest().Execute(t)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same tests imo should be added into rkt_net_kvm_test.go

@jellonek
Copy link
Contributor

jellonek commented Aug 2, 2016

These tests are only for first mentioned by @steveej bullet, but IMO they look really good.

@squeed
Copy link
Contributor Author

squeed commented Aug 2, 2016

@jellonek We already tested the non-default-network case before this PR. So we should have everything covered.

@jellonek
Copy link
Contributor

jellonek commented Aug 2, 2016

Ack, but what about default-restricted?

@squeed
Copy link
Contributor Author

squeed commented Aug 2, 2016

@jellonek
Copy link
Contributor

jellonek commented Aug 3, 2016

Ack. LGTM.

@lucab lucab merged commit 1547ae6 into rkt:master Aug 3, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants