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

engine: Set shm path to "app/$name" #766

Closed
wants to merge 1 commit into from

Conversation

lukego
Copy link
Member

@lukego lukego commented Feb 22, 2016

Set the shared memory path (shm.path) to a private namespace for each app with prefix "app/$name".

This means that apps can create shm objects such as counters and by default these will appear in a local namespace for that app.

Example (for an app update that will be submitted separately):

$ sudo ls -1 /var/run/snabb/10773/app/tunnel
drop_bad_cookie
drop_bad_length
drop_bad_local_address
drop_bad_protocol
drop_bad_remote_address

Set the shared memory path (shm.path) to a private namespace for each
app with prefix "app/$name".

This means that apps can create shm objects such as counters and by
default these will appear in a local namespace for that app.
@mention-bot
Copy link

By analyzing the blame information on this pull request, we identified @eugeneia, @javierguerragiraldez and @nnikolaev-virtualopensystems to be potential reviewers

@@ -65,6 +66,8 @@ end
-- Run app:methodname() in protected mode (pcall). If it throws an
-- error app will be marked as dead and restarted eventually.
local function with_restart (app, method)
Copy link
Member

Choose a reason for hiding this comment

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

I guess we should rename with_restart to something like invoke_app_method. Nothing critical but this change makes the functions name a misnomer.

Copy link
Member

Choose a reason for hiding this comment

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

@lukego Do you want to rename with_restart before I merge this or leave it as is?

@eugeneia eugeneia self-assigned this Feb 22, 2016
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
 - Use "apps/" instead of "app/" for uniformity
 - Set shm path to "apps/$name" when calling `app:stop' too
 - Unlink "apps/$name" after `app:stop' using `shm.unlink'
 - Add a test case to core.app selftest
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
 - Use "apps/" instead of "app/" for uniformity
 - Set shm path to "apps/$name" when calling `app:stop' too
 - Unlink "apps/$name" after `app:stop' using `shm.unlink'
 - Add a test case to core.app selftest
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
 - Use "apps/" instead of "app/" for uniformity
 - Set shm path to "apps/$name" when calling `app:stop' too
 - Unlink "apps/$name" after `app:stop' using `shm.unlink'
 - Add a test case to core.app selftest
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
 - Use "apps/" instead of "app/" for uniformity
 - Set shm path to "apps/$name" when calling `app:stop' too
 - Unlink "apps/$name" after `app:stop' using `shm.unlink'
 - Add a test case to core.app selftest
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
 - Use "apps/" instead of "app/" for uniformity
 - Set shm path to "apps/$name" when calling `app:stop' too
 - Unlink "apps/$name" after `app:stop' using `shm.unlink'
 - Add a test case to core.app selftest
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
 - Use "apps/" instead of "app/" for uniformity
 - Set shm path to "apps/$name" when calling `app:stop' too
 - Unlink "apps/$name" after `app:stop' using `shm.unlink'
 - Add a test case to core.app selftest
eugeneia added a commit to eugeneia/snabb that referenced this pull request Apr 12, 2016
eugeneia added a commit to eugeneia/snabb that referenced this pull request Jun 10, 2016
eugeneia added a commit to eugeneia/snabb that referenced this pull request Jun 10, 2016
@eugeneia
Copy link
Member

Closing in favor of #931.

@eugeneia eugeneia closed this Jun 16, 2016
dpino added a commit to dpino/snabb that referenced this pull request Mar 10, 2017
nh_fwd cache refresh packets need entropy
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.

3 participants