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

External ids buffer #3927

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

External ids buffer #3927

wants to merge 5 commits into from

Conversation

supalik
Copy link
Contributor

@supalik supalik commented Oct 6, 2021

ChangeLog: ovs_stas plugin:These changes will enhance the feature of receiving the data in buffer.

By including "ExternalIds true" as a New Config parameter all the external ids will be populated in the buffer
O/P: ovs_stats="vmId=3979a0b0-bddc-4cdd-ae87-0a4c2071d1f9,ifaceId=7e0607f6-9179-4852-aa36-b56279c3310,mac=fa:16:3e:18:a1:ff",instance=""}

which can provide the visibility of external ids if exists.

@supalik supalik requested a review from a team as a code owner October 6, 2021 11:11
@supalik
Copy link
Contributor Author

supalik commented Oct 13, 2021

Can I get some comments on these changes

@mrunge
Copy link
Member

mrunge commented Oct 14, 2021

So, for me to get this straight: I asked you to separate the change for #3924 and this enhancement. You agreed to that.
This enhancement now also contains your change for #3924.

Copy link
Member

@mrunge mrunge left a comment

Choose a reason for hiding this comment

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

as agreed in the other PR, let's separate bug fixes and enhancements.

Copy link
Contributor Author

@supalik supalik left a comment

Choose a reason for hiding this comment

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

Hi,
I have removed the #3924 changes, but now test_plugin_capabilities is getting FAILED .
Could you please assist here.

@supalik
Copy link
Contributor Author

supalik commented Oct 20, 2021

Hi,
I have executed CI Test cases in collectd/ci:trusty_amd64 on main branch, without my changes, but "test_plugin_capabilities" is failing there as well.

@gyanranjan
Copy link

@Supali-Kash the issue seems to be due to capability plugin

Success.
==28070== Invalid free() / delete / delete[] / realloc()
==28070== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28070== by 0x55CEE2B: __libc_freeres (in /lib/x86_64-linux-gnu/libc-2.19.so)
==28070== by 0x4A256BC: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
==28070== by 0x54A216A: __run_exit_handlers (exit.c:97)
==28070== by 0x54A21F4: exit (exit.c:104)
==28070== by 0x4021DF: main (capabilities_test.c:282)
==28070== Address 0x58283c0 is 0 bytes inside data symbol "noai6ai_cached"
==28070==
{
<insert_a_suppression_name_here>
Memcheck:Free
fun:free
fun:__libc_freeres
fun:_vgnU_freeres
fun:__run_exit_handlers
fun:exit
fun:main
}

@supalik
Copy link
Contributor Author

supalik commented Oct 27, 2021

Hi, @paul/@mrunge /@bernd ,

I would be really grateful if you could assist me handling this PR.
This PR CI is failing but I could not get the exact reason of the ci:trusty_amd64 failure

Copy link
Contributor Author

@supalik supalik left a comment

Choose a reason for hiding this comment

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

@mrunge suggested change is done and present in last commit

@elfiesmelfie
Copy link
Contributor

Hi, @paul/@mrunge /@bernd ,

I would be really grateful if you could assist me handling this PR. This PR CI is failing but I could not get the exact reason of the ci:trusty_amd64 failure

The failure here looks like it is due to test_capabilities failing when make check is run.
I'm investigating these failures, and it might be because the trusty container has not been updated in a while.
The CI is undergoing some updating at the moment, please bear with us while that happens.

This failure is probably nothing to worry about, I'll try to verify it manually today, to see if I can reproduce the error.

@gyanranjan
Copy link

gyanranjan commented Oct 27, 2021

Hi Emma
You are right!
Valgrind error seems to come probably due to old glibc

cap_config -> cf_util_get_port_number -> service_name_to_port_number (probably getaddrinfo)

root@e185e03cf263:/collectd# ldd --version
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.15) 2.19
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

https://bugs.gentoo.org/472544

Unfortunately, Ubuntu 14.04 is stuck with 2.19

Confirmed it is glib Issue

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

// Trimmed from libaudit.
static void _resolve_addr(char buf[], const char *host)
{
	struct addrinfo *ai;
	struct addrinfo hints;
	int e;

	memset(&hints, 0, sizeof(hints));
	hints.ai_flags = AI_ADDRCONFIG;
	hints.ai_socktype = SOCK_STREAM;

	e = getaddrinfo(host, NULL, &hints, &ai);
	if (e != 0) {
		printf("error\n");
		return;
	}
	freeaddrinfo(ai);
	printf("resolve one\n", buf);
}

int main() {
	char buf[INET6_ADDRSTRLEN];
	int i;
	for (i = 0; i < 3; i++) {
		_resolve_addr(buf, "localhost");
	}
}

root@e185e03cf263:/collectd#
root@e185e03cf263:/collectd# valgrind ./a.out
==30519== Memcheck, a memory error detector
==30519== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al.
==30519== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info
==30519== Command: ./a.out
==30519==
resolve one
resolve one
resolve one
==30519== Invalid free() / delete / delete[] / realloc()
==30519== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==30519== by 0x4F9FE2B: __libc_freeres (in /lib/x86_64-linux-gnu/libc-2.19.so)
==30519== by 0x4A256BC: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so)
==30519== by 0x4E7316A: __run_exit_handlers (exit.c:97)
==30519== by 0x4E731F4: exit (exit.c:104)
==30519== by 0x4E58F4B: (below main) (libc-start.c:321)
==30519== Address 0x51f93c0 is 0 bytes inside data symbol "noai6ai_cached"
==30519==
==30519==
==30519== HEAP SUMMARY:
==30519== in use at exit: 0 bytes in 0 blocks
==30519== total heap usage: 53 allocs, 54 frees, 8,217 bytes allocated
==30519==
==30519== All heap blocks were freed -- no leaks are possible
==30519==
==30519== For counts of detected and suppressed errors, rerun with: -v
==30519== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

elfiesmelfie pushed a commit to elfiesmelfie/collectd that referenced this pull request Nov 5, 2021
Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
elfiesmelfie pushed a commit to elfiesmelfie/collectd that referenced this pull request Nov 5, 2021
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

ChangeLog: cirrus-ci: Update debian_default_toolchain to remove trusty
and add bionic and focal

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
elfiesmelfie pushed a commit to elfiesmelfie/collectd that referenced this pull request Nov 5, 2021
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
@elfiesmelfie
Copy link
Contributor

Hi Emma You are right! Valgrind error seems to come probably due to old glibc

cap_config -> cf_util_get_port_number -> service_name_to_port_number (probably getaddrinfo)

root@e185e03cf263:/collectd# ldd --version ldd (Ubuntu EGLIBC 2.19-0ubuntu6.15) 2.19 Copyright (C) 2014 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Written by Roland McGrath and Ulrich Drepper.

https://bugs.gentoo.org/472544

Unfortunately, Ubuntu 14.04 is stuck with 2.19

Confirmed it is glib Issue

#include <sys/types.h>
#include <sys/socket.h>
#include <netdb.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>

// Trimmed from libaudit.
static void _resolve_addr(char buf[], const char *host)
{
	struct addrinfo *ai;
	struct addrinfo hints;
	int e;

	memset(&hints, 0, sizeof(hints));
	hints.ai_flags = AI_ADDRCONFIG;
	hints.ai_socktype = SOCK_STREAM;

	e = getaddrinfo(host, NULL, &hints, &ai);
	if (e != 0) {
		printf("error\n");
		return;
	}
	freeaddrinfo(ai);
	printf("resolve one\n", buf);
}

int main() {
	char buf[INET6_ADDRSTRLEN];
	int i;
	for (i = 0; i < 3; i++) {
		_resolve_addr(buf, "localhost");
	}
}

root@e185e03cf263:/collectd# root@e185e03cf263:/collectd# valgrind ./a.out ==30519== Memcheck, a memory error detector ==30519== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. ==30519== Using Valgrind-3.10.1 and LibVEX; rerun with -h for copyright info ==30519== Command: ./a.out ==30519== resolve one resolve one resolve one ==30519== Invalid free() / delete / delete[] / realloc() ==30519== at 0x4C2BDEC: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) ==30519== by 0x4F9FE2B: __libc_freeres (in /lib/x86_64-linux-gnu/libc-2.19.so) ==30519== by 0x4A256BC: _vgnU_freeres (in /usr/lib/valgrind/vgpreload_core-amd64-linux.so) ==30519== by 0x4E7316A: __run_exit_handlers (exit.c:97) ==30519== by 0x4E731F4: exit (exit.c:104) ==30519== by 0x4E58F4B: (below main) (libc-start.c:321) ==30519== Address 0x51f93c0 is 0 bytes inside data symbol "noai6ai_cached" ==30519== ==30519== ==30519== HEAP SUMMARY: ==30519== in use at exit: 0 bytes in 0 blocks ==30519== total heap usage: 53 allocs, 54 frees, 8,217 bytes allocated ==30519== ==30519== All heap blocks were freed -- no leaks are possible ==30519== ==30519== For counts of detected and suppressed errors, rerun with: -v ==30519== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 0 from 0)

Since trusty is out of support, it's reasonable to not use it in the CI, so I'll remove it.
#3927 should address the failing CI

Thanks for triaging the issue!

elfiesmelfie added a commit to elfiesmelfie/collectd that referenced this pull request Nov 5, 2021
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
@supalik
Copy link
Contributor Author

supalik commented Nov 10, 2021

thank you @elfiesmelfie for the response.
Could you please help me in getting review comments for the PR.

@mrunge
Copy link
Member

mrunge commented Nov 10, 2021

Thank you for your PR! You could help us by reviewing other PRs. That would lower the amount of work and would help you in getting a review for this PR.

elfiesmelfie added a commit to elfiesmelfie/collectd that referenced this pull request Dec 1, 2021
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
mrunge pushed a commit that referenced this pull request Feb 4, 2022
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] #3936
[3] #3927 (comment)
mrunge pushed a commit to mrunge/collectd that referenced this pull request Feb 8, 2022
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)

(cherry picked from commit b5d8ad1)
elfiesmelfie added a commit to elfiesmelfie/collectd that referenced this pull request Feb 14, 2022
Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
mrunge pushed a commit that referenced this pull request Feb 15, 2022
…cies (#3975)

* [ci][gha] Replace trusy with Bionic and Focal

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] #3936
[3] #3927 (comment)

* [ci][cirrus] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.

* [ci][gha] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.
mrunge added a commit that referenced this pull request Feb 15, 2022
…hain (#3972)

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] #3936
[3] #3927 (comment)

(cherry picked from commit b5d8ad1)

Co-authored-by: Emma Foley <efoley@redhat.com>
mrunge added a commit that referenced this pull request Feb 24, 2022
* [ci][cirrus] Replace trusty with bionic/focal in debian_default_toolchain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] #3936
[3] #3927 (comment)

(cherry picked from commit b5d8ad1)

* [ci][cirrus] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.

Co-authored-by: Matthias Runge <mrunge@redhat.com>
mrunge pushed a commit to mrunge/collectd that referenced this pull request Mar 17, 2022
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)

(cherry picked from commit b5d8ad1)
mrunge added a commit that referenced this pull request Mar 17, 2022
…hain (#3986)

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] #3936
[3] #3927 (comment)

(cherry picked from commit b5d8ad1)

Co-authored-by: Emma Foley <efoley@redhat.com>
carlospeon pushed a commit to carlospeon/collectd that referenced this pull request Oct 17, 2022
…hain

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)
carlospeon pushed a commit to carlospeon/collectd that referenced this pull request Oct 17, 2022
…cies (collectd#3975)

* [ci][gha] Replace trusy with Bionic and Focal

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)

* [ci][cirrus] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.

* [ci][gha] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.
hnez pushed a commit to hnez/collectd that referenced this pull request Jan 30, 2023
…cies (collectd#3975)

* [ci][gha] Replace trusy with Bionic and Focal

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)

* [ci][cirrus] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.

* [ci][gha] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.
hnez pushed a commit to hnez/collectd that referenced this pull request Jan 30, 2023
…cies (collectd#3975)

* [ci][gha] Replace trusy with Bionic and Focal

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] collectd#3936
[3] collectd#3927 (comment)

* [ci][cirrus] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.

* [ci][gha] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.
mrunge pushed a commit that referenced this pull request Feb 1, 2023
…cies (#3975)

* [ci][gha] Replace trusy with Bionic and Focal

Ubuntu 14.04 (Trusty) is out of standard support [1].
``make check`` fails for test_capabilities, as noted in [2].
[3] indicates that the cause is glibc, but that updates are not expected
to the version in trusty.

This PR replaces trusty with Ubuntu 18.04 (Bionic) and 20.04 (Focal).

[1] https://wiki.ubuntu.com/Releases
[2] #3936
[3] #3927 (comment)

* [ci][cirrus] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.

* [ci][gha] Make Valgrind error on defininte memory leaks only

Valgrind gives errors when it find possible leaks;
update the options to only error on definite leaks.

This is done using the VALGRIND_OPTS env var, which is used by valgrind
when it is invoked.
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

4 participants