antrea icon indicating copy to clipboard operation
antrea copied to clipboard

doc magic constants for winpipe:// and unix:// to our ovsdb wrapper

Open jayunit100 opened this issue 3 years ago • 1 comments

I spent some time trying to understand wether or not we use (or can use) SSL to talk to openvswitch, when investigating https://github.com/kubernetes-sigs/sig-windows-dev-tools/issues/198 .

I've written this up here... https://jayunit100.blogspot.com/2022/07/how-does-antrea-talk-to-ovsdb.html .. just my thoughts exploring the codebase.

I found in the process that , it looks like we hardcode winpipe and unix because they are hardcoded in TomCodeLV/OVSDB-golang-lib.

Lets

  1. move these constants over to be documented explicitly, i.e.
TOMCODELV_SOCKET_WINDOWS = "winpipe"
TOMCODELV_SOCKET_UNIX = "unix"

or just add comments like

// We use winpipe here because it is hardcoded as the socket value that is parsed in our openvswitch db library, github.com/TomCodeLV/OVSDB-golang-lib/pkg/ovsdb . 
    defaultConnNetwork = "winpipe"
  1. Lets also comment the NewOVSDBConnectionUDS(...) function to clarify that we connect directly to ovsdb using unix or windows sockets , never using any SSL connection options.

... so that the way we hardcoded the default networks

  1. I think in the process we should ask wether there are times we DO want to connect to OVDSB using ssl maybe, and if so, outline when that would be or add follow on issue for documenting this ? but im not sure really wether there are situations where antrea ever would use a secure / separate ovsdb (im not an ovs person, so if this bullet makes no sense ignore it)

jayunit100 avatar Jul 19 '22 03:07 jayunit100

/good-first-issue

jayunit100 avatar Jul 19 '22 03:07 jayunit100

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days

github-actions[bot] avatar Dec 06 '22 00:12 github-actions[bot]