Git Product home page Git Product logo

Comments (12)

k0ste avatar k0ste commented on July 20, 2024

@cmonty14 cephinfo

from ceph-scripts.

cmonty14 avatar cmonty14 commented on July 20, 2024

Where should I place cephinfo?

from ceph-scripts.

k0ste avatar k0ste commented on July 20, 2024

Where should I place cephinfo?

Where your python can import this module. Where your ./ceph-pool-pg-distribution.py placed, for example.

from ceph-scripts.

thmour avatar thmour commented on July 20, 2024

Hello @cmonty14 did you try to run the script after you cloned the repo, or your copied the file on your home folder and tried to run it?

from ceph-scripts.

cmonty14 avatar cmonty14 commented on July 20, 2024

Still no success:

root@ld3955:~
# ls -l ceph*
.rw-r--r-- root root 1.4 KB Wed Jul  3 15:43:56 2019   ceph-deploy-ceph.log
.rwxr-xr-x root root 956 B  Wed Mar  4 11:19:33 2020   ceph-pool-pg-distribution.py
.rwxr-xr-x root root 5.1 KB Wed Mar  4 11:48:12 2020   cephinfo.py

root@ld3955:~
# ./ceph-pool-pg-distribution.py
Traceback (most recent call last):
  File "./ceph-pool-pg-distribution.py", line 7, in <module>
    from cephinfo import cephinfo
ImportError: cannot import name cephinfo
root@ld3955:~

After this execution file cephinfo.pyc gets created.

from ceph-scripts.

cmonty14 avatar cmonty14 commented on July 20, 2024

Hello @cmonty14 did you try to run the script after you cloned the repo, or your copied the file on your home folder and tried to run it?

I just run the script from home dir; I didn't clone the repo.

from ceph-scripts.

cmonty14 avatar cmonty14 commented on July 20, 2024

After cloning the repo (to my home directory) I get this error:

root@ld3955:/home/ceph-scripts
# tools/ceph-pool-pg-distribution 11
Searching for PGs in pools: ['11']
Traceback (most recent call last):
  File "tools/ceph-pool-pg-distribution", line 23, in <module>
    for pg in cephinfo.get_pg_stats():
  File "/home/ceph-scripts/tools/cephinfo/cephinfo.py", line 91, in get_pg_stats
    return list(pg_data['pg_stats'])
KeyError: 'pg_stats'
root@ld3955:/home/ceph-scripts

from ceph-scripts.

thmour avatar thmour commented on July 20, 2024

@cmonty14 I guess now you know what to do. But if you still don't want to clone the repo you can copy the cephinfo folder in your python site-packages folder, you can do ls /usr/lib/python?.? to find out where to put it.

from ceph-scripts.

cmonty14 avatar cmonty14 commented on July 20, 2024

@cmonty14 I guess now you know what to do. But if you still don't want to clone the repo you can copy the cephinfo folder in your python site-packages folder, you can do ls /usr/lib/python?.? to find out where to put it.

I cloned the repo already (see my previous post).

from ceph-scripts.

thmour avatar thmour commented on July 20, 2024

@cmonty14 ye I saw, the json output in nautilus has changed a bit. some untouched scripts need to be updated.

from ceph-scripts.

thmour avatar thmour commented on July 20, 2024

@cmonty14 can you pull and check again? I think it should be fine now

from ceph-scripts.

cmonty14 avatar cmonty14 commented on July 20, 2024

Confirm:
issue is solved

from ceph-scripts.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.