Project

General

Profile

Actions

Bug #50886

closed

TypeError: can't subtract offset-naive and offset-aware datetimes

Added by lyd dragon almost 3 years ago. Updated over 2 years ago.

Status:
Can't reproduce
Priority:
Normal
Assignee:
-
Category:
-
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

$ ceph -v
ceph version 15.2.11 (e3523634d9c2227df9af89a4eac33d16738c49cb) octopus (stable)

$ rook version
rook: v1.5.9
go: go1.13.8

$ ceph mgr module enable orchestrator
module 'orchestrator' is already enabled (always-on)

$ ceph mgr module enable rook
$ ceph orch set backend rook

$ ceph mgr module ls

{
    "always_on_modules": [
        "balancer",
        "crash",
        "devicehealth",
        "orchestrator",
        "pg_autoscaler",
        "progress",
        "rbd_support",
        "status",
        "telemetry",
        "volumes" 
    ],
    "enabled_modules": [
        "dashboard",
        "iostat",
        "prometheus",
        "restful",
        "rook" 
    ],
.....

$ ceph orch host ls
HOST                  ADDR                  LABELS  STATUS  
k8s-myhome-master-01  k8s-myhome-master-01                  
k8s-myhome-master-02  k8s-myhome-master-02                  
k8s-myhome-node-01    k8s-myhome-node-01                    
k8s-myhome-node-02    k8s-myhome-node-02                    
k8s-myhome-node-03    k8s-myhome-node-03                    
k8s-myhome-node-04    k8s-myhome-node-04                    
k8s-myhome-node-05    k8s-myhome-node-05                    

$ ceph orch ls
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1177, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 140, in handle_command
    return dispatch[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 318, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 102, in <lambda>
    wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator/module.py", line 547, in _list_services
    nice_delta(now, s.last_refresh, ' ago'),
  File "/usr/share/ceph/mgr/orchestrator/module.py", line 28, in nice_delta
    return to_pretty_timedelta(now - t) + suffix
TypeError: can't subtract offset-naive and offset-aware datetimes

$ ceph orch ps
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1177, in _handle_command
    return self.handle_command(inbuf, cmd)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 140, in handle_command
    return dispatch[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 318, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 102, in <lambda>
    wrapper_copy = lambda *l_args, **l_kwargs: wrapper(*l_args, **l_kwargs)
  File "/usr/share/ceph/mgr/orchestrator/_interface.py", line 91, in wrapper
    return func(*args, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator/module.py", line 605, in _list_daemons
    status += ' (%s)' % to_pretty_timedelta(now - s.started)
TypeError: can't subtract offset-naive and offset-aware datetimes

Actions

Also available in: Atom PDF