Re: Attempts at using PyDAOS


Pittman, Ashley M
 

 

The easiest way, assuming you want a single KV per container is to do the following:

 

import pydaos

cont = pydaos.cont(‘<pool_uuid>’, ‘<container_uuid>’)

kv = cont.root_kv()

kv[‘key’] = value

 

If you want multiple kvs per container then you have to do something like daos_named_kv and store the name ó object_id translation in the root kv, or you can call cont.newkv() to create a new key-value store, and save kv.oid.lo and kv.oid.hi out-of-band, reopening the kv later on with kv = cont.kv(pydaos.OjbID(lo, hi).

 

The issues with the socket come from non-default install paths, but this is OK, you need to set DAOS_AGENT_DRPC_DIR to the directory that your agent was started with, as documented here https://daos-stack.github.io/admin/deployment/  I assume you have the agent and server already running?

 

Ashley.

 

From: <daos@daos.groups.io> on behalf of "Alex Barcelo via groups.io" <alex@...>
Reply to: "daos@daos.groups.io" <daos@daos.groups.io>
Date: Tuesday, 5 May 2020 at 13:24
To: "daos@daos.groups.io" <daos@daos.groups.io>
Subject: Re: [daos] Attempts at using PyDAOS

 

Ok, regarding KVObj, my naive attempt was:

import pydaos
pydaos.KVObj()

And that obviously fails due to missing positional arguments. I didn't realize on the factory-like mechanisms through the daos_named_kv class. But I don't follow your steps, should I use daos_named_kv or I should not? I don't really see which parameter values should I use --I am trying to follow the single-server installation instructions as closely as possible, trying to remain in the default-land.

Even if I get the KV interface to work, wouldn't I have the same issues with the broken socket which I am already having while trying pydaos.raw? Or are there some key differences between both of them? Should I configure the /var/run/daos_agent path somewhere? Why can I do things like pool creation through CLI but the Python pydaos.raw break?

On the "what I am trying to achieve": I want to "validate" (for lack of a better word) that the installation of DAOS I have in our development machine is correct and is using properly its OptaneDC PMM --that is the only deviation from the single-server defaults I have consciously introduced in my installation so far. For now, I have been able to build DAOS in the machine and start all the DAOS services, but I haven't managed to use it from application space yet. And PyDAOS seemed a good way to proceed, is it?

---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

Join {daos@daos.groups.io to automatically receive all group messages.