Commit 25677890 authored by Daniele Kruse's avatar Daniele Kruse
Browse files

Now getting the commong backend for CTA from castor.conf (like tapeserverd)

parent 2b7d9f82
......@@ -274,4 +274,8 @@ For most commands there is a short version and a long one. Due to the limited nu
\end{itemize}
\normalfont
\chapter{Getting the prototype up and running}
\end{document}
\ No newline at end of file
......@@ -5,6 +5,7 @@ find_package (xrootd REQUIRED)
include_directories(${CMAKE_SOURCE_DIR})
include_directories(${XROOTD_INCLUDE_DIR} ${XROOTD_PRIVATE_INCLUDE_DIR})
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/tapeserver)
add_library (XrdProFst MODULE XrdProFilesystem.cpp XrdProFile.cpp)
target_link_libraries (XrdProFst ctascheduler ctacommon ctanameserver ctaremotens ctaOStoreSchedulerDB protobuf CTAObjectStore cryptopp)
......@@ -16,6 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "castor/common/CastorConfiguration.hpp"
#include "common/exception/Exception.hpp"
#include "nameserver/CastorNameServer.hpp"
#include "nameserver/mockNS/MockNameServer.hpp"
......@@ -51,7 +52,8 @@
XrdVERSIONINFO(XrdSfsGetFileSystem,XrdPro)
//BEGIN: boilerplate code to prepare the objectstoreDB object
cta::objectstore::BackendVFS g_backend;
cta::objectstore::BackendVFS g_backend(castor::common::CastorConfiguration::getConfig().getConfEntString("TapeServer", "ObjectStoreBackendPath"));
class BackendPopulator {
public:
......@@ -59,8 +61,6 @@ public:
m_agent(m_backend) {
// We need to populate the root entry before using.
cta::objectstore::RootEntry re(m_backend);
re.initialize();
re.insert();
cta::objectstore::ScopedExclusiveLock rel(re);
re.fetch();
m_agent.generateName("OStoreDBFactory");
......@@ -107,6 +107,7 @@ extern "C"
{
XrdSfsFileSystem *XrdSfsGetFileSystem (XrdSfsFileSystem* native_fs, XrdSysLogger* lp, const char* configfn)
{
g_backend.noDeleteOnExit();
g_eosNs.createEntry(cta::RemotePath("eos://eos/kruse/file1"), cta::RemoteFileStatus(cta::UserIdentity(getuid(), getgid()), 0777, 0)); //create an empty file to start with for testing purposes
return new XrdProFilesystem(
&g_castorNs,
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment