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

SCALYR_K8S_POD_NAME missing #307

Open
n-johnson opened this issue Sep 16, 2019 · 0 comments
Open

SCALYR_K8S_POD_NAME missing #307

n-johnson opened this issue Sep 16, 2019 · 0 comments

Comments

@n-johnson
Copy link

When running the scalyr agent in k8s using https://hub.docker.com/r/scalyr/scalyr-k8s-agent, starting with the 2.0.51 release, we are getting this error when the pod tries to start, and then it ends up in CrashLoopBackoff

2019-09-16 18:39:31.031Z ERROR [monitor:kubernetes_monitor()] [kubernetes_monitor.py:2479] ERROR: Missing required environment variable for kubenetes_monitor: SCALYR_K8S_POD_NAME
2019-09-16 18:39:31.031Z ERROR [monitor:kubernetes_monitor()] [kubernetes_monitor.py:2480] Please restart with up-to-date Scalyr Agent Daemonset manifest (YAML) file.
Error reading configuration file: Required environment variable "SCALYR_K8S_POD_NAME" is not set for kubernetes_monitor.
Terminating agent, please fix the configuration file and restart agent.
Traceback (most recent call last):
  File "/usr/sbin/scalyr-agent-2", line 217, in main
    self.__config = self.__read_and_verify_config(config_file_path)
  File "/usr/sbin/scalyr-agent-2", line 292, in __read_and_verify_config
    self.__verify_config(config)
  File "/usr/sbin/scalyr-agent-2", line 325, in __verify_config
    monitors_manager = MonitorsManager(config, self.__controller)
  File "/usr/share/scalyr-agent-2/py/scalyr_agent/monitors_manager.py", line 54, in __init__
    self.__monitors = MonitorsManager.__create_monitors(configuration, platform_controller)
  File "/usr/share/scalyr-agent-2/py/scalyr_agent/monitors_manager.py", line 270, in __create_monitors
    configuration.global_monitor_sample_interval, configuration))
  File "/usr/share/scalyr-agent-2/py/scalyr_agent/monitors_manager.py", line 330, in build_monitor
    return monitor_class(monitor_config, scalyr_logging.getLogger("%s(%s)" % (module_name, monitor_id)), global_config=global_config)
  File "/usr/share/scalyr-agent-2/py/scalyr_agent/scalyr_monitor.py", line 144, in __init__
    self._initialize()
  File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/kubernetes_monitor.py", line 2358, in _initialize
    self.__verify_required_env_var('SCALYR_K8S_POD_NAME')
  File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/kubernetes_monitor.py", line 2483, in __verify_required_env_var
    env_var_name)
BadMonitorConfiguration: Required environment variable "SCALYR_K8S_POD_NAME" is not set for kubernetes_monitor.

Pinning the image version to the 2.0.50 release fixes the problem.

We are running kube version v1.12.7 on AWS EKS.

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

No branches or pull requests

1 participant