Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add multicast support. #885

Merged
merged 1 commit into from
Nov 5, 2019
Merged

Add multicast support. #885

merged 1 commit into from
Nov 5, 2019

Conversation

dceara
Copy link
Collaborator

@dceara dceara commented Oct 25, 2019

Enable IGMP Snoop (when supported) and IGMP relay to allow multicast
connectivity across nodes.

Enforce the following network policies for IP multicast traffic:

  • a default deny-all network policy is applied to all IP multicast
    traffic. This is implemented with two ACLs:
    a) one ACL dropping egress multicast traffic from all pods:
    this is to protect OVN controller from processing IP multicast
    reports from nodes that are not allowed to receive multicast
    traffic.
    b) one ACL dropping ingress multicast traffic to all pods.
  • when multicast is explicitly enabled in the namespace, IP multicast
    traffic is forwarded only to pods in the same namespace. This is done
    by adding:
    a) a port group containing all logical ports associated with the
    namespace.
    b) one "from-lport" ACL allowing egress multicast traffic from the
    in the namespace.
    c) one "to-lport" ACL allowing ingress multicast traffic to pods in
    the namespace. This matches only traffic originated by pods in
    the same namespace (based on the namespace address set).

Add a new namespace annotation to allow enabling of multicast:
"k8s.ovn.org/multicast-enabled".

Signed-off-by: Dumitru Ceara [email protected]

@dceara dceara force-pushed the multicast branch 2 times, most recently from 5796456 to c974e72 Compare October 30, 2019 10:30
@dceara dceara force-pushed the multicast branch 2 times, most recently from 70eace2 to 49cf249 Compare October 30, 2019 16:02
go-controller/pkg/ovn/policy.go Outdated Show resolved Hide resolved
go-controller/pkg/ovn/namespace.go Show resolved Hide resolved
go-controller/pkg/ovn/namespace.go Outdated Show resolved Hide resolved
go-controller/pkg/ovn/ovn.go Show resolved Hide resolved
@dceara dceara force-pushed the multicast branch 2 times, most recently from 0b10fb3 to 292110d Compare October 31, 2019 00:27
Enable IGMP Snoop (when supported) and IGMP relay to allow multicast
connectivity across nodes.

Enforce the following network policies for IP multicast traffic:
- a default deny-all network policy is applied to all IP multicast
  traffic. This is implemented with two ACLs:
  a) one ACL dropping egress multicast traffic from all pods:
     this is to protect OVN controller from processing IP multicast
     reports from nodes that are not allowed to receive multicast
     traffic.
  b) one ACL dropping ingress multicast traffic to all pods.
- when multicast is explicitly enabled in the namespace, IP multicast
  traffic is forwarded only to pods in the same namespace. This is done
  by adding:
  a) a port group containing all logical ports associated with the
     namespace.
  b) one "from-lport" ACL allowing egress multicast traffic from the
     in the namespace.
  c) one "to-lport" ACL allowing ingress multicast traffic to pods in
     the namespace. This matches only traffic originated by pods in
     the same namespace (based on the namespace address set).

Add a new namespace annotation to allow enabling of multicast:
"k8s.ovn.org/multicast-enabled".

Signed-off-by: Dumitru Ceara <[email protected]>
@dcbw
Copy link
Contributor

dcbw commented Nov 1, 2019

@girishmg this passed OpenShift CI FWIW

@girishmg
Copy link
Contributor

girishmg commented Nov 2, 2019

@dcbw I will not be able to look at these changes immediately (I will look at it later), so please go ahead if you think it is good.

FYI, I quickly gave the changes in this PR a spin on my cluster and there is no regression from the tests I ran.

@dcbw dcbw merged commit abf57d3 into ovn-kubernetes:master Nov 5, 2019
dcbw added a commit to dcbw/ovn-kubernetes that referenced this pull request Nov 16, 2019
First, updateNamespace() didn't have locking for oc.namespaceMutex
Introduced by c3def15 (PR ovn-kubernetes#885).

Second, getNamespaceLock() didn't protect against concurrent
access of oc.namespaceMutex when it checked it the second time.
That's fishy anyway; we serialize Namespace events from the
watch factory and getNamespaceLock() is only called from event
handler functions, so it doesn't seem possible for the namespace
to be deleted between grabbing these two locks.

Signed-off-by: Dan Williams <[email protected]>
@dceara dceara deleted the multicast branch November 27, 2019 13:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants