8000 virt plugin: handle disconnect on inst#0 · Pull Request #2100 · collectd/collectd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

virt plugin: handle disconnect on inst#0 #2100

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

Merged
merged 2 commits into from
Dec 13, 2016

Conversation

ghost
Copy link
@ghost ghost commented Dec 12, 2016

Only one virt reader instance should take care of connection
handling (connection/disconnection) to avoid races and plugin
data corruption, potentially crashing collectd.

This bug cannot be triggered with instances=1 (default settings).

Signed-off-by: Francesco Romani fromani@redhat.com

@rubenk
Copy link
Contributor
rubenk commented Dec 12, 2016

This breaks CI.

if (conn != NULL)
virConnectClose(conn);
conn = NULL;
if (inst->id == 0) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the braces.

Copy link
Author

Choose a reason for hiding this comment

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

oops, sorry. Funny that clang-format doesn't complain.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, that's what I thought. Especially since it got it right a few lines higher.

@ghost ghost force-pushed the pr-virt-disconnect-on-inst0 branch from 7461bde to b102d28 Compare December 12, 2016 14:57
@rubenk rubenk changed the title virt plugin: handle discconnect on inst#0 virt plugin: handle disconnect on inst#0 Dec 12, 2016
@rubenk
Copy link
Contributor
rubenk commented Dec 12, 2016
virt.c: In function 'lv_disconnect':
virt.c:512:1: error: expected ';' before '}' token
 }
 ^
Makefile:4888: recipe for target 'virt_la-virt.lo' failed
make[3]: *** [virt_la-virt.lo] Error 1

@ghost ghost force-pushed the pr-virt-disconnect-on-inst0 branch from b102d28 to 0561a6f Compare December 13, 2016 07:36
@ghost
Copy link
Author
ghost commented Dec 13, 2016

I think the only way to unlock this is to rebase: the "resolve conflicts" button on the github UI leads me to 404 :)

Only one virt reader instance should take care of connection
handling (connection/disconnection) to avoid races and plugin
data corruption, potentially crashing collectd.

This bug cannot be triggered with instances=1 (default settings).

Signed-off-by: Francesco Romani <fromani@redhat.com>
Avoiding duplication of the code and let's use
the new lv_disconnect() helper in the lv_shutdown() callback.

Signed-off-by: Francesco Romani <fromani@redhat.com>
@ghost ghost force-pushed the pr-virt-disconnect-on-inst0 branch from 0561a6f to c502181 Compare December 13, 2016 15:35
@rubenk
Copy link
Contributor
rubenk commented Dec 13, 2016

The button worked for me, looks like GitHub is A/B testing it ;)

Thanks!

@rubenk rubenk merged commit c1b5ab5 into collectd:master Dec 13, 2016
@octo octo added this to the 5.8 milestone Oct 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0