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

[Calico/VPP NSM integration] memif and memifproxy files should be shared with VPP pod #357

Closed
Bolodya1997 opened this issue Aug 26, 2021 · 4 comments
Assignees
Labels
bug Something isn't working Planning Issue related to SOW question Further information is requested

Comments

@Bolodya1997
Copy link

Bolodya1997 commented Aug 26, 2021

Issue

Currently memif and memifproxy uses /tmp/memif and /tmp/memifproxy directories for storing socket files. VPP pod has no access to these files, so it work with them.

func socketFile(conn *networkservice.Connection) string {
return filepath.Join(os.TempDir(), "memif", conn.GetId(), "memif.socket")
}

func listenSocketFilename(conn *networkservice.Connection) string {
return filepath.Join(os.TempDir(), "memifproxy", conn.GetId(), "memif.socket")
}

Parent issue

networkservicemesh/integration-k8s-kind#325

Possible solution

Use shared directory

We can use /var/run/vpp directory instead of /tmp as a base for creating directories for memif socket files.

Use /proc/x/fd/y path

We can replace common /tmp/... path with /proc/x/fd/y path before making VPP API request - such path is already shared, but it will additionally force us to use hostPid: true for the Client applications.
Currently VPP is responsible for creating memif sockets - we are only providing the path where they should be located. With this solution we need to perform additional actions for creating memif socket by ourselves before requesting VPP.

@Bolodya1997 Bolodya1997 self-assigned this Aug 26, 2021
@Bolodya1997 Bolodya1997 added bug Something isn't working Planning Issue related to SOW question Further information is requested labels Aug 26, 2021
@Bolodya1997
Copy link
Author

@edwarnicke @denis-tingaikin
cc

@Bolodya1997
Copy link
Author

Possible solution with using abstract sockets - https://gerrit.fd.io/r/c/vpp/+/32271/6/src/plugins/memif/memif.api#43.

@Bolodya1997
Copy link
Author

Should be closed with #370

@denis-tingaikin
Copy link
Member

It seems like all PRs have merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Planning Issue related to SOW question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants