Forums

Home / Forums

You need to log in to create posts and topics. Login · Register

error add osd to petasan

Dear admin,

I add new osd to cluster petasan and now it error , please support!

KeyError

KeyError: 'osdpe2'

Traceback (most recent call last)

  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1836, in __call__

    return self.wsgi_app(environ, start_response)
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1820, in wsgi_app

    response = self.make_response(self.handle_exception(e))
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1403, in handle_exception

    reraise(exc_type, exc_value, tb)
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app

    response = self.full_dispatch_request()
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request

    rv = self.handle_user_exception(e)
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception

    reraise(exc_type, exc_value, tb)
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request

    rv = self.dispatch_request()
  • File "/usr/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request

    return self.view_functions[rule.endpoint](**req.view_args)
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/core/security/basic_auth.py", line 71, in decorated

    return f(*args, **kwargs)
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/web/admin_controller/main.py", line 58, in dashboard

    pools_list = manage_pool.get_pools_info()
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/backend/manage_pools.py", line 32, in get_pools_info

    pools_info = ceph_api.get_pools_info()
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/core/ceph/api.py", line 917, in get_pools_info

    rules_info = self.get_rules()
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/core/ceph/api.py", line 787, in get_rules

    crush.read()
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/core/ceph/crush_map.py", line 329, in read

    self._decode_buckets()
  • File "/usr/lib/python2.7/dist-packages/PetaSAN/core/ceph/crush_map.py", line 77, in _decode_buckets

    item = tokens[1] + '#' + self.device_class[tokens[1]] + '#' + self.device_weight[tokens[1]]

KeyError: 'osdpe2'

Hi,

Can you run the following commands

ceph osd getcrushmap -o crushmap.bin --cluster XX
crushtool -d crushmap.bin -o crushmap.txt

XX is the name of your cluster

and post the  crushmap.txt content

Dear admin,

i send file

ype 7 room
type 8 datacenter
type 9 region
type 10 root

# buckets
host osdpe2 {
id -3 # do not change unnecessarily
id -4 class hdd # do not change unnecessarily
# weight 0.062
alg straw2
hash 0 # rjenkins1
item osd.0 weight 0.015
item osd.1 weight 0.015
item osd.2 weight 0.015
item osd.3 weight 0.015
}
root default {
id -1 # do not change unnecessarily
id -2 class hdd # do not change unnecessarily
# weight 0.062
alg straw2
hash 0 # rjenkins1
item osdpe2 weight 0.062
}

# rules
rule replicated_rule {
id 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}

# end crush map

is this the entire file, if not can you paste it all

yes, it is all file , i have reinstall petasan , but it still has that error

Hi

can you confirm the file starts with the line

ype 7 room

if so can you please re-run the commands and i try once more to read the file again.

Is this a fresh install or an upgrade ?

 

Hi,

I send file full, i setup petasan 2.1

# begin crush map
tunable choose_local_tries 0
tunable choose_local_fallback_tries 0
tunable choose_total_tries 50
tunable chooseleaf_descend_once 1
tunable chooseleaf_vary_r 1
tunable chooseleaf_stable 1
tunable straw_calc_version 1
tunable allowed_bucket_algs 54

# devices
device 0 osd.0 class hdd
device 1 osd.1 class hdd

# types
type 0 osd
type 1 host
type 2 chassis
type 3 rack
type 4 row
type 5 pdu
type 6 pod
type 7 room
type 8 datacenter
type 9 region
type 10 root

# buckets
host osd1 {
id -3 # do not change unnecessarily
id -4 class hdd # do not change unnecessarily
# weight 0.039
alg straw2
hash 0 # rjenkins1
item osd.0 weight 0.019
item osd.1 weight 0.019
}
root default {
id -1 # do not change unnecessarily
id -2 class hdd # do not change unnecessarily
# weight 0.039
alg straw2
hash 0 # rjenkins1
item osd1 weight 0.039
}

# rules
rule replicated_rule {
id 0
type replicated
min_size 1
max_size 10
step take default
step chooseleaf firstn 0 type host
step emit
}

# end crush map

 

 

the issue is the name of the host machine osd1 in the crushmap, the system thinks it is an osd disk #1. If you choose some other name to your host ( even OSD1, not all small case) things will work.

I also notice you use 15 and 20 G disks, per the docs you need at least 64G per disk

I use version petasan 2.0 it not proplem.

I Lab osd disk 20GB it running

I will reinstall agian another osd name and larger disk space