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

Feat dpdkevents fixes #2348

Merged
merged 3 commits into from Jul 6, 2017
Merged

Conversation

maryamtahhan
Copy link
Contributor

This PR contains the following fixes:

  • dpdkevents: detect primary DPDK application (re)start
  • dpdkevents: initialization fixes
  • dpdk plugins: bug fixes and improvements

pszczerx and others added 3 commits July 6, 2017 16:15
Current implementation attempts to open KA SHM only once during init callback.
If at the time primary DPDK application is not running shm_open will fail, which
will result in dpdkevents plugin being unloaded. Move KA SHM open logic to read
callback to allow plugin to attach to primary DPDK application later without a
need to restart collectd. Moreover, it will allow to determine if primary DPDK
application was killed and plugin should stop dispatching KA statistics.

Additionally modify dpdk_event_keep_alive_shm_open function to detect restart of
primary DPDK application. When primary DPDK application (with KA support) is
restarted it unlinks existing shared memory object and creates a new one. It's
necessary for the plugin to create a new SHM mapping in order to prevent reading
statistics from stale SHM block.

Change-Id: I7fc0047ba117db771ada58a40cbe0b2bddd00112
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
This patch removes impact of keep_alive init failure on
link_status processing. Also changed default behaviour in configless
mode, where no <Plugin/> stanza is defined. Now both keep_alive
and link_status are enabled by default. On the other hand if
<Plugin/> stanza is present, both features are disabled by default
and user is responsible for specifying which one is active or not.

Change-Id: I03f7ab88e89404e03532677d00a966ddb80d1552
Signed-off-by: Krzysztof Matczak <krzysztofx.matczak@intel.com>
- Do not return error in configuration callback, which will cause
  collectd to be stopped. Instead, report error in init callback, which
  will unload incorrectly configured plugin.
- Remove redundant ProcessType configuration option, which was always set to
  "secondary"
- Use functions from cf_util_get family for parsing config file
- In case of parsing errors perform plugin cleanup
- Correctly remove previously created shared memory object if user specified
  "SharedMemObj" option with different value than default
- Prevent segmentation fault in dpdk_shm_cleanup
- Change 'send_updated' and 'notify' variable types to _Bool

Change-Id: Id7dfc7f25d2cebf332d47bcd5afaaebf577945d6
Signed-off-by: Przemyslaw Szczerbik <przemyslawx.szczerbik@intel.com>
@rubenk rubenk merged commit bbfa295 into collectd:master Jul 6, 2017
@rubenk
Copy link
Contributor

rubenk commented Jul 6, 2017

Thanks @maryamtahhan!

@maryamtahhan maryamtahhan deleted the feat_dpdkevents_fixes branch July 10, 2017 15:36
@octo octo added this to the 5.8 milestone Oct 11, 2017
@maryamtahhan maryamtahhan mentioned this pull request Oct 12, 2017
19 tasks
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.

None yet

5 participants