Skip to content
This repository was archived by the owner on Jan 18, 2023. It is now read-only.
This repository was archived by the owner on Jan 18, 2023. It is now read-only.

Error getting cmk-config-<node-name> Configmap #297

@hanyin-intel

Description

@hanyin-intel

Hi guys,

I may find several bugs towards the management of Configmap in the latest 1.5.2 version and also try to find a workaround to fix them. My patch file is attached here.
hanyin-intel@e8d5903

Here are the details:

  1. The node-report feature can't get the cmk-config- Configmap since error calling "get_config" function in class "Config". Since this function is not defined in the "Config" class, I use the constructor function and "lock/unlock" function as a workaround. But it seems that the "node-report" container continuously restarts since race on such "lock".

  2. The describe feature can't get the cmk-config- Configmap since the "namespace" attribute is not passed when construct the "Config" class. As a result, I use the "/var/run/secrets/kubernetes.io/serviceaccount/namespace" file in container to get the namespace and pass it to the construction function of "Config" class.

  3. The isolate feature also misses the "namespace" attribute when getting the cmk-config- Configmap.

  4. When enabling the "hostNetwork" in the container, the environment variable "HOSTNAME" in container has been changed to the node name rather than the pod name. Thus, the isolate feature which always be used as the wrapper of the real workload can not get the correct pod name. Then, in the workaround, I use the environment variable "PODNAME" instead of the "HOSTNAME" in isolate.py. And also, the user needs to add the "PODNAME" into their containers.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions