Skip to content

Commit

Permalink
mod_containerd and mod_k8s: Env list it at top level, not under Metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Sep 19, 2023
1 parent 391de23 commit d1453b3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Linux/hsflowd.c
Expand Up @@ -716,8 +716,9 @@ extern "C" {
int debugLevel = strtol(valBuf, NULL, 0);
EVMod *mod = EVGetModule(sp->rootModule, keyBuf);
if(mod) {
myDebug(1, "setting mod=%s debugLevel=%u", mod->name, debugLevel);
mod->debugLevel = debugLevel;
myDebug(1, "setting mod=%s debugLevel=%u", mod->name, debugLevel);
EVDebug(mod, 1, "debugLevel=%u", debugLevel);
}
else {
myDebug(1, "debug action ignored: %s", line);
Expand Down
2 changes: 1 addition & 1 deletion src/Linux/mod_containerd.c
Expand Up @@ -1049,7 +1049,7 @@ extern "C" {
updateContainerCgroupPaths(mod, container);
}

cJSON *jenv = cJSON_GetObjectItem(jmetrics, "Env");
cJSON *jenv = cJSON_GetObjectItem(top, "Env");
if(jenv
&& container->gpu_dev == NO)
readContainerGPUsFromEnv(mod, container, jenv);
Expand Down
2 changes: 1 addition & 1 deletion src/Linux/mod_k8s.c
Expand Up @@ -1267,7 +1267,7 @@ extern "C" {
// Only try to find the GPU info once, but don't
// try it on the sandbox container because it won't
// have the full ENV.
cJSON *jenv = cJSON_GetObjectItem(jmetrics, "Env");
cJSON *jenv = cJSON_GetObjectItem(top, "Env");
if(jenv
&& !pod->gpu_env_tried)
readPodGPUsFromEnv(mod, pod, jenv);
Expand Down

0 comments on commit d1453b3

Please sign in to comment.