For the record, the problem was that the new OSDs didn't have the
weight-set defined.

After having manually defined the weight-set for the new OSDs, I am able to
create a plan.

More info in the 'weight-set defined for some OSDs and not defined for the
new installed ones' thread

Cheers, Massimo

On Sat, Mar 2, 2019 at 4:26 PM Massimo Sgaravatto <
massimo.sgarava...@gmail.com> wrote:

> Hi
> This is a luminous (v. 12.2.11) cluster
>
> Thanks, Massimo
>
> On Sat, Mar 2, 2019 at 2:49 PM Matthew H <matthew.he...@hotmail.com>
> wrote:
>
>> Hi Massimo!
>>
>> What version of Ceph is in use?
>>
>> Thanks,
>>
>> ------------------------------
>> *From:* ceph-users <ceph-users-boun...@lists.ceph.com> on behalf of
>> Massimo Sgaravatto <massimo.sgarava...@gmail.com>
>> *Sent:* Friday, March 1, 2019 1:24 PM
>> *To:* Ceph Users
>> *Subject:* [ceph-users] Problems creating a balancer plan
>>
>> Hi
>>
>> I already used the balancer in my ceph luminous cluster a while ago when
>> all the OSDs were using filestore.
>>
>> Now, after having added some bluestore OSDs, if I try to create a plan:
>>
>>
>> [root@ceph-mon-01 ~]# ceph balancer status
>> {
>>     "active": false,
>>     "plans": [],
>>     "mode": "crush-compat"
>> }
>>
>> [root@ceph-mon-01 ~]# ceph balancer eval
>> current cluster score 0.051599 (lower is better)
>>
>> [root@ceph-mon-01 ~]# ceph balancer optimize 01-march-2019
>> Error EINVAL: Traceback (most recent call last):
>>   File "/usr/lib64/ceph/mgr/balancer/module.py", line 340, in
>> handle_command
>>     r, detail = self.optimize(plan)
>>   File "/usr/lib64/ceph/mgr/balancer/module.py", line 670, in optimize
>>     return self.do_crush_compat(plan)
>>   File "/usr/lib64/ceph/mgr/balancer/module.py", line 814, in
>> do_crush_compat
>>     weight = best_ws[osd]
>> KeyError: (64,)
>>
>> This is what I see in the mgr log:
>>
>>
>>
>>
>> 2019-03-01 19:15:20.310116 7faeff76c700  0 log_channel(audit) log [DBG] :
>> from='client.194721456 192.168.61.206:0/585546872' entity='client.admin'
>> cmd=[{"prefix": "balancer optimize", "plan": "01-march-2019", "target":
>> ["mgr", ""]}]: dispatch
>> 2019-03-01 19:15:20.310162 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer status'
>> 2019-03-01 19:15:20.310171 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer mode'
>> 2019-03-01 19:15:20.310179 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer on'
>> 2019-03-01 19:15:20.310186 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer off'
>> 2019-03-01 19:15:20.310195 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer eval'
>> 2019-03-01 19:15:20.310203 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer eval-verbose'
>> 2019-03-01 19:15:20.310211 7faeff76c700  1 mgr.server handle_command
>> pyc_prefix: 'balancer optimize'
>> 2019-03-01 19:15:20.310487 7faefff6d700  1 mgr[balancer] Handling
>> command: '{'prefix': 'balancer optimize', 'plan': '01-march-2019',
>> 'target': ['mgr', '']}'
>> 2019-03-01 19:15:20.530784 7faf204c9700  1 mgr send_beacon active
>> 2019-03-01 19:15:20.559914 7faefff6d700  1 mgr.server reply
>> handle_command (22) Invalid argument Traceback (most recent call last):
>>   File "/usr/lib64/ceph/mgr/balancer/module.py", line 340, in
>> handle_command
>>     r, detail = self.optimize(plan)
>>   File "/usr/lib64/ceph/mgr/balancer/module.py", line 670, in optimize
>>     return self.do_crush_compat(plan)
>>   File "/usr/lib64/ceph/mgr/balancer/module.py", line 814, in
>> do_crush_compat
>>     weight = best_ws[osd]
>> KeyError: (64,)
>>
>>
>>
>> Thanks, Massimo
>>
>
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to