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

Fix cAdvisor constantly polls data that has been disabled #2900

Merged
merged 3 commits into from
Aug 20, 2021

Conversation

Creatone
Copy link
Collaborator

Fixes #2897

@google-cla google-cla bot added the cla: yes label Jun 29, 2021
@Creatone
Copy link
Collaborator Author

/ok-to-test

@Creatone
Copy link
Collaborator Author

/retest

build/integration.sh Outdated Show resolved Hide resolved
@Creatone Creatone force-pushed the creatone/disable-metrics branch 3 times, most recently from c552073 to 6260164 Compare July 1, 2021 11:06
@google google deleted a comment from k8s-ci-robot Jul 1, 2021
@@ -26,7 +26,8 @@ printf "" # Refresh sudo credentials if necessary.
function start {
set +e # We want to handle errors if cAdvisor crashes.
echo ">> starting cAdvisor locally"
GORACE="halt_on_error=1" ./cadvisor --docker_env_metadata_whitelist=TEST_VAR --v=6 --logtostderr $CADVISOR_ARGS &> "$log_file"
# This cpu, cpuset, percpu, app, memory, disk, diskIO, network, perf_event metrics should be enabled.
Copy link
Contributor

Choose a reason for hiding this comment

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

This -> The ?

Btw. If this PR would depend on PR#2902, it would be enough to change "disable_metrics" for "enable_metrics" option, to document what metrics the testing actually needs.

Signed-off-by: Paweł Szulik <pawel.szulik@intel.com>
Paweł Szulik added 2 commits July 15, 2021 11:35
Signed-off-by: Paweł Szulik <pawel.szulik@intel.com>
Signed-off-by: Paweł Szulik <pawel.szulik@intel.com>
@@ -26,7 +26,8 @@ printf "" # Refresh sudo credentials if necessary.
function start {
set +e # We want to handle errors if cAdvisor crashes.
echo ">> starting cAdvisor locally"
GORACE="halt_on_error=1" ./cadvisor --docker_env_metadata_whitelist=TEST_VAR --v=6 --logtostderr $CADVISOR_ARGS &> "$log_file"
# This cpuset, percpu, memory, disk, diskIO, network, perf_event metrics should be enabled.
Copy link
Contributor

Choose a reason for hiding this comment

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

Now that -enable_metrics is used, this could say e.g. "enable only metrics required by the test", or be even removed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In my opinion, that comment is more accurate than "enable only metrics required by the test".

Copy link
Contributor

Choose a reason for hiding this comment

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

Comment metrics list just duplicates -enable_metrics argument, so it's redundant / can get out of sync later. Comment is a bit weirdly at the moment too ("This" -> "The"?). But feel free to ignore my comment "bike-shedding", it's not really important, like rest of this PR.

@eero-t
Copy link
Contributor

eero-t commented Jul 15, 2021

Btw. Do integration tests need also "app" and "cpu" metrics?

Currently they are always enabled, as those two (are only ones that) are not in the ignoreWhitelist, but that is going to change with PR #2910.

@Creatone
Copy link
Collaborator Author

@bobbypage, @iwankgb, @dims, @mrunalp PTAL

@eero-t
Copy link
Contributor

eero-t commented Aug 20, 2021

I tested this earlier, and verified that it fixes the #2897 issue I filed.

@Creatone Now that you merged PR #2910 which made also app & cpu metrics optional, should those be added to the "-enable_metrics" option in integration.sh?

@bobbypage
Copy link
Collaborator

Thanks @Creatone for the fix. LGTM!

@bobbypage bobbypage merged commit 19df107 into google:master Aug 20, 2021
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.

cAdvisor constantly polls data that has been disabled
4 participants