Project

General

Profile

Actions

Bug #41737

closed

mgr/k8sevents: exception in non-kubernetes environment

Added by Kiefer Chang over 4 years ago. Updated over 4 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
k8sevents module
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

k8sevents module is introduced in this PR: https://github.com/ceph/ceph/pull/29520

Start mgr in a non Kubernetes spawned cluster and find these lines in log:

2019-09-10T04:29:36.219+0000 7f2747939d40 -1 mgr[py] Module not found: 'k8sevents'
2019-09-10T04:29:36.219+0000 7f2747939d40 -1 mgr[py] Traceback (most recent call last):
  File "/ceph/src/pybind/mgr/k8sevents/__init__.py", line 1, in <module>
    from .module import Module
  File "/ceph/src/pybind/mgr/k8sevents/module.py", line 189, in <module>
    class RookCeph(object):
  File "/ceph/src/pybind/mgr/k8sevents/module.py", line 192, in RookCeph
    pod_name = os.environ['POD_NAME']
  File "/usr/lib64/python3.7/os.py", line 678, in __getitem__
    raise KeyError(key) from None
KeyError: 'POD_NAME'

2019-09-10T04:29:36.219+0000 7f2747939d40 -1 mgr[py] Class not found in module 'k8sevents'
2019-09-10T04:29:36.219+0000 7f2747939d40 -1 mgr[py] Error loading module 'k8sevents': (2) No such file or directory

The behavior is correct since mgr is not in a Kubernetes spawned cluster.
But handling these exceptions will be nice.


Related issues 1 (0 open1 closed)

Related to mgr - Bug #41435: Add mgr module for kubernetes event integrationResolved08/26/2019

Actions
Actions #1

Updated by Sebastian Wagner over 4 years ago

  • Assignee set to Paul Cuzner
Actions #3

Updated by Sebastian Wagner over 4 years ago

If possible, I'd like to wait with https://github.com/ceph/ceph/pull/30215 until this is solved.

Actions #4

Updated by Paul Cuzner over 4 years ago

will aim to fix in the next day or two.

Actions #6

Updated by Sebastian Wagner over 4 years ago

  • Status changed from New to Pending Backport
  • Backport set to nautilus
  • Pull request ID set to 30482
Actions #7

Updated by Sebastian Wagner over 4 years ago

  • Copied to Backport #41720: nautilus: Add mgr module for kubernetes event integration added
Actions #8

Updated by Nathan Cutler over 4 years ago

  • Copied to deleted (Backport #41720: nautilus: Add mgr module for kubernetes event integration)
Actions #9

Updated by Nathan Cutler over 4 years ago

  • Status changed from Pending Backport to Resolved
  • Backport deleted (nautilus)

Backport being handled via #41435

Actions #10

Updated by Nathan Cutler over 4 years ago

  • Related to Bug #41435: Add mgr module for kubernetes event integration added
Actions

Also available in: Atom PDF