Re: pg_num not being set to ceph.conf default when creating pool via python librados

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hmm, I'm looking at the actual code here and I'm wrong. Those values
should be used whenever you create a pool via the API, and it doesn't
look like anything external to the monitor can change that.

So you probably set these values in the [osd] section rather than the
[mon] or [global] section, at a guess. (The monitor is the one who
manages this data and so they need to have the values.)
-Greg

On Mon, Jan 26, 2015 at 11:03 AM, Jason Anderson
<Jason.Anderson@xxxxxxxxxxxxxxxx> wrote:
> Hello Gregory,
>
>
>
> Thanks for the quick response. Does this mean that the rados python library
> is out of date? create_pool in rados.py
> (https://github.com/ceph/ceph/blob/master/src/pybind/rados.py#L535) only
> requires a pool_name….doesn’t even offer pg_num as an optional argument.
>
>
>
> Thank you,
>
> -Jason
>
>
>
> From: Gregory Farnum [mailto:greg@xxxxxxxxxxx]
> Sent: Monday, January 26, 2015 10:09 AM
> To: Jason Anderson; ceph-users@xxxxxxxxxxxxxx
> Subject: Re:  pg_num not being set to ceph.conf default when
> creating pool via python librados
>
>
>
> Just from memory, I think these values are only used for the initial pool
> creations when the cluster is first set up.
>
> We have been moving for a while to making users specify pg_num explicitly on
> every pool create, and you should do so. :)
> -Greg
>
> On Mon, Jan 26, 2015 at 7:38 AM Jason Anderson
> <Jason.Anderson@xxxxxxxxxxxxxxxx> wrote:
>
> Hello fellow Cephers,
>
>
>
> I am running Ceph Giant on Centos 6.6 and am running into an issue where the
> create_pool() method in the librados python library isn't using ceph.conf's
> pg_num and pgp_num settings during pool creation.
>
>
>
> My ceph.conf:
>
> [global]
>
> auth_service_required = cephx
>
> filestore_xattr_use_omap = true
>
> auth_client_required = cephx
>
> auth_cluster_required = cephx
>
> mon_host = 64.0.1.210,64.0.1.211
>
> public_network = 64.0.1.192/26
>
> mon_initial_members = MON05, MON06
>
> fsid = 91eda869-9a34-4f74-8189-7d5fb6952f4a
>
> osd pool default pg num = 256
>
> osd pool default pgp num = 256
>
>
>
> In python, using the above ceph.conf, conf_get returns the correct pg_num
> and I am able to create the pool.
>
> [root@DCOS01 lib]# python
>
>>>> import rados
>
>>>> cluster = rados.Rados(conffile='/etc/ceph/ceph.conf')
>
>>>> cluster.conf_get('osd pool default pg num')
>
> '256'
>
>>>> cluster.connect()
>
>>>> cluster.create_pool('PE-TEST4')
>
>
>
> After the pool is created via the librados python library, I check the
> pg_num of the pool and it's 8; not 256.
>
> [root@DCOS01 lib]# ceph osd pool get PE-TEST4 pg_num
>
> pg_num: 8
>
>
>
> Has anyone else run into this issue? Am I missing something? I know I could
> just spawn a subprocess call to the ceph command line utility, but I would
> like to avoid that in the name of a cleaner python integration.
>
>
>
> Your assistance is greatly appreciated.
>
>
>
> Thank you,
>
> - Jason
>
>
>
> _______________________________________________
> ceph-users mailing list
> ceph-users@xxxxxxxxxxxxxx
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@xxxxxxxxxxxxxx
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com





[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux