Introduction of daos_agent to workflow
I wanted to provide an update to the addition of DAOS Agent. As of this afternoon a pull request was merged to require the use of daos_agent. It modifies pool connect to pass a security credential obtained from daos_agent instead of the euid and egid provided by the application itself. This means everything from a sample DAOS deployment to the running of daos_test will require an instance of daos_agent to be running on any computer acting as a client.
Applications using the daos client library communicate with daos_agent via a UNIX domain socket. This socket exists under /var/run/daos_agent. On modern systems /var/run is not writable by normal users so to handle this several methods are described in doc/quickstart.md on how to resolve the problem. The easiest of them is to use the tempfiles.d support found in systemd enabled systems to make the necessary changes permanent. The steps below will allow daos_agent to be started as a regular user.
To tell systemd to create the necessary directories for DAOS:
- Copy the file utils/systemd/daosfiles.conf to /etc/tmpfiles.d (cp utils/systemd/daosfiles.conf /etc/tmpfiles.d)
- Modify the copied file to change the user and group fields (currently daos) to the user daos_agent will be run as
- Reboot the system and the directories will be created automatically on all subsequent reboots.
Once this is done daos_agent can be started from within the install directory generated by the DAOS build or in any installed location. The agent does not require elevated permissions so as long as the user starting the agent matches the user specified in the daosfiles.conf file used then it should have necessary access to the sockets directory.
If you choose to use a non-default directory that is fully under the control of your user via one of the other methods specified in doc/quickstart.md you must inform the client library where the new socket directory is. This is done by setting the environment variable DAOS_AGENT_DRPC_SOCK_ENV. This includes the full directory and the name of the socket which is agent.sock. This means if the directory daos_agent is using for its sockets is /tmp/agent the environment variable would be set to /tmp/agent/agent.sock.