[ceph-users] ceph plugin balancer error

2018-07-05 Thread Chris Hsiang
Hi,

I am running test on ceph mimic  13.0.2.1874+ge31585919b-lp150.1.2 using
openSUSE-Leap-15.0

when I ran "ceph balancer status", it errors out.

g1:/var/log/ceph # ceph balancer status
Error EIO: Module 'balancer' has experienced an error and cannot handle
commands: 'dict' object has no attribute 'iteritems'

what config need to be done in order to get it work?

Chris
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph plugin balancer error

2018-07-05 Thread Chris Hsiang
weird thing is that,

g1:~ # locate /bin/python
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python3
/usr/bin/python3.6
/usr/bin/python3.6m

g1:~ # ls /usr/bin/python* -al
lrwxrwxrwx 1 root root 9 May 13 07:41 /usr/bin/python -> python2.7
lrwxrwxrwx 1 root root 9 May 13 07:41 /usr/bin/python2 -> python2.7
-rwxr-xr-x 1 root root  6304 May 13 07:41 /usr/bin/python2.7
lrwxrwxrwx 1 root root 9 May 13 08:39 /usr/bin/python3 -> python3.6
-rwxr-xr-x 2 root root 10456 May 13 08:39 /usr/bin/python3.6
-rwxr-xr-x 2 root root 10456 May 13 08:39 /usr/bin/python3.6m

my default python env is 2.7... so under dict object should have
iteritems   method

Chris
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph plugin balancer error

2018-07-05 Thread Chris Hsiang
I have tried to modify /usr/lib64/ceph/mgr/balancer/module.py

replace  iteritems () with items(),  but I still got following error

g1:/usr/lib64/ceph/mgr/balancer # ceph balancer status
Error EINVAL: Traceback (most recent call last):
  File "/usr/lib64/ceph/mgr/balancer/module.py", line 297, in handle_command
return (0, json.dumps(s, indent=4), '')
  File "/usr/lib64/python3.6/json/__init__.py", line 238, in dumps
**kw).encode(obj)
  File "/usr/lib64/python3.6/json/encoder.py", line 201, in encode
chunks = list(chunks)
  File "/usr/lib64/python3.6/json/encoder.py", line 430, in _iterencode
yield from _iterencode_dict(o, _current_indent_level)
  File "/usr/lib64/python3.6/json/encoder.py", line 404, in _iterencode_dict
yield from chunks
  File "/usr/lib64/python3.6/json/encoder.py", line 437, in _iterencode
o = _default(o)
  File "/usr/lib64/python3.6/json/encoder.py", line 180, in default
o.__class__.__name__)
TypeError: Object of type 'dict_keys' is not JSON serializable

it seems to me that ceph mgr is complie/written for python 3.6 but
balancer plugin is written for python 2.7... this might be related

https://github.com/ceph/ceph/pull/21446

this might be opensuse building ceph package issue

chris
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph plugin balancer error

2018-07-05 Thread Nathan Cutler

Hi Chris:

I suggest you raise your openSUSE Ceph-related questions on the openSUSE 
Ceph mailing list instead of ceph-users. For info on how to join, go to


https://en.opensuse.org/openSUSE:Ceph#Communication

The version of Ceph currently shipping in Leap 15.0 is built against 
Python 3 and this, as you found, exposes python2-specific code in the 
Ceph codebase.


We might reconsider this and push a Python 2 build to Leap 15.0 - let's 
discuss it on opensuse-ceph.


Thanks,
Nathan

On 07/05/2018 09:12 AM, Chris Hsiang wrote:

Hi,

I am running test on ceph mimicĀ  13.0.2.1874+ge31585919b-lp150.1.2 using 
openSUSE-Leap-15.0


when I ran "ceph balancer status", it errors out.

g1:/var/log/ceph # ceph balancer status
Error EIO: Module 'balancer' has experienced an error and cannot handle 
commands: 'dict' object has no attribute 'iteritems'


what config need to be done in order to get it work?

Chris


___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com



--
Nathan Cutler
Software Engineer Distributed Storage
SUSE LINUX, s.r.o.
Tel.: +420 284 084 037
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com


Re: [ceph-users] ceph plugin balancer error

2018-07-05 Thread Nathan Cutler

Update: opened http://tracker.ceph.com/issues/24779 to track this bug,
and am in the process of fixing it.

The fix will make its way into a future mimic point release.

Thanks, Chris, for bringing the issue to my attention!

Nathan

On 07/05/2018 11:27 AM, Nathan Cutler wrote:

Hi Chris:

I suggest you raise your openSUSE Ceph-related questions on the openSUSE 
Ceph mailing list instead of ceph-users. For info on how to join, go to


https://en.opensuse.org/openSUSE:Ceph#Communication

The version of Ceph currently shipping in Leap 15.0 is built against 
Python 3 and this, as you found, exposes python2-specific code in the 
Ceph codebase.


We might reconsider this and push a Python 2 build to Leap 15.0 - let's 
discuss it on opensuse-ceph.


Thanks,
Nathan

On 07/05/2018 09:12 AM, Chris Hsiang wrote:

Hi,

I am running test on ceph mimicĀ  13.0.2.1874+ge31585919b-lp150.1.2 
using openSUSE-Leap-15.0


when I ran "ceph balancer status", it errors out.

g1:/var/log/ceph # ceph balancer status
Error EIO: Module 'balancer' has experienced an error and cannot 
handle commands: 'dict' object has no attribute 'iteritems'


what config need to be done in order to get it work?

Chris


___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com





--
Nathan Cutler
Software Engineer Distributed Storage
SUSE LINUX, s.r.o.
Tel.: +420 284 084 037
___
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com