Project

General

Profile

Actions

Bug #43972

closed

rook: 'Device' object has no attribute 'swagger_types'

Added by Sebastian Wagner about 4 years ago. Updated about 4 years ago.

Status:
Resolved
Priority:
High
Category:
mgr/rook
Target version:
-
% Done:

0%

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

Description

root@rook-ceph-tools-85cfdbbdd5-4mwc8 /]# ceph orchestrator device ls
HOST  PATH      TYPE  SIZE DEVICE AVAIL REJECT REASONS
k8s-1 /dev/sda  hdd  20.0G None   True                
k8s-1 /dev/sdb  hdd  20.0G None   True                
k8s-2 /dev/dm-0 hdd  19.0G None   False not empty      
k8s-2 /dev/sdb  hdd  20.0G None   True                
k8s-3 /dev/dm-0 hdd  19.0G None   False not empty      
k8s-3 /dev/sdb  hdd  20.0G None   True                
k8s-4 /dev/dm-0 hdd  19.0G None   False not empty      
k8s-4 /dev/sdb  hdd  20.0G None   True                
[root@rook-ceph-tools-85cfdbbdd5-4mwc8 /]# ceph orchestrator osd create k8s-2:/dev/sdb
Error EINVAL: Traceback (most recent call last):
  File "/usr/share/ceph/mgr/mgr_module.py", line 1069, in _handle_command
    return CLICommand.COMMANDS[cmd['prefix']].call(self, cmd, inbuf)
  File "/usr/share/ceph/mgr/mgr_module.py", line 309, in call
    return self.func(mgr, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator.py", line 140, in wrapper
    return func(*args, **kwargs)
  File "/usr/share/ceph/mgr/orchestrator_cli/module.py", line 373, in _create_osd
    orchestrator.raise_if_exception(completion)
  File "/usr/share/ceph/mgr/orchestrator.py", line 655, in raise_if_exception
    raise e
  File "/usr/share/ceph/mgr/orchestrator.py", line 287, in _finalize
    next_result = self._on_complete(self._value)
  File "/usr/share/ceph/mgr/rook/module.py", line 415, in <lambda>
    on_complete=lambda _:self.rook_cluster.add_osds(drive_group, all_hosts),
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 571, in add_osds
    body=patch)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 220, in rook_api_patch
    **kwargs)
  File "/usr/share/ceph/mgr/rook/rook_cluster.py", line 209, in rook_api_call
    **kwargs)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 334, in call_api
    _return_http_data_only, collection_formats, _preload_content, _request_timeout)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 157, in __call_api
    body = self.sanitize_for_serialization(body)
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 206, in sanitize_for_serialization
    for sub_obj in obj]
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 206, in <listcomp>
    for sub_obj in obj]
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 226, in sanitize_for_serialization
    for key, val in iteritems(obj_dict)}
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 226, in <dictcomp>
    for key, val in iteritems(obj_dict)}
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 226, in sanitize_for_serialization
    for key, val in iteritems(obj_dict)}
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 226, in <dictcomp>
    for key, val in iteritems(obj_dict)}
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 206, in sanitize_for_serialization
    for sub_obj in obj]
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 206, in <listcomp>
    for sub_obj in obj]
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 226, in sanitize_for_serialization
    for key, val in iteritems(obj_dict)}
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 226, in <dictcomp>
    for key, val in iteritems(obj_dict)}
  File "/lib/python3.6/site-packages/kubernetes/client/api_client.py", line 222, in sanitize_for_serialization
    for attr, _ in iteritems(obj.swagger_types)
AttributeError: 'Device' object has no attribute 'swagger_types'
Actions #1

Updated by Juan Miguel Olmo Martínez about 4 years ago

  • Assignee set to Juan Miguel Olmo Martínez
Actions #2

Updated by Juan Miguel Olmo Martínez about 4 years ago

Fix available in:
https://github.com/ceph/ceph/pull/33176

Note:
The right command to create the OSD in the example provided in this bug would be:

root@rook-ceph-tools-85cfdbbdd5-4mwc8 /]# ceph orchestrator device ls
HOST  PATH      TYPE  SIZE DEVICE AVAIL REJECT REASONS
k8s-1 /dev/sda  hdd  20.0G None   True                
k8s-1 /dev/sdb  hdd  20.0G None   True                
k8s-2 /dev/dm-0 hdd  19.0G None   False not empty      
k8s-2 /dev/sdb  hdd  20.0G None   True                
k8s-3 /dev/dm-0 hdd  19.0G None   False not empty      
k8s-3 /dev/sdb  hdd  20.0G None   True                
k8s-4 /dev/dm-0 hdd  19.0G None   False not empty      
k8s-4 /dev/sdb  hdd  20.0G None   True                

[root@rook-ceph-tools-85cfdbbdd5-4mwc8 /]# ceph orchestrator osd create k8s-2:sdb

NOTE: DO NOT USE THE COMPLETE PATH TO DEFINE THE DEVICE:
Use the name provided for the device when you issued the command:

lsblk --all --noheadings --list --output KNAME

In the host where you want to create the OSD

Actions #3

Updated by Juan Miguel Olmo Martínez about 4 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 33176
Actions #4

Updated by Sebastian Wagner about 4 years ago

  • Status changed from Fix Under Review to Resolved
Actions

Also available in: Atom PDF