Skip to content
Snippets Groups Projects
Commit 979829a5 authored by Michael Davis's avatar Michael Davis
Browse files

Merge remote-tracking branch 'origin/master' into ssi

parents 21449420 d62c7462
No related branches found
No related tags found
No related merge requests found
......@@ -90,6 +90,8 @@ RUN yum-config-manager --enable epel --setopt="epel.priority=4" \
sudo \
&& \
yum clean all \
&& \
rm -rf /var/cache/yum \
&& \
mkdir -pv /etc/cta
......
......@@ -76,7 +76,9 @@ RUN yum-config-manager --enable epel --setopt="epel.priority=4" \
ltrace \
cta-cli \
&& \
yum clean all
yum clean all \
&& \
rm -rf /var/cache/yum
# Add pod specific configuration
ADD ${BASEDIR}/config ${LOCALORCHESTRATIONDIR}
......
......@@ -16,7 +16,7 @@ if test $# -ne 5; then
exit ${EINVAL}
fi
CTA_BIN=/usr/bin/eoscta_stub
CTA_BIN=/usr/bin/cta
WF_TAG="$1"
RUSERNAME="$2"
......
......@@ -29,18 +29,29 @@ BackendPopulator::BackendPopulator(cta::objectstore::Backend & be,
const std::string &agentType, const cta::log::LogContext & lc): m_backend(be), m_agentReference(agentType, lc.logger()),
m_lc(lc) {
cta::objectstore::RootEntry re(m_backend);
cta::objectstore::ScopedExclusiveLock rel(re);
re.fetch();
re.fetchNoLock();
cta::objectstore::EntryLogSerDeser cl("user0", "systemhost", time(NULL));
// We might have to create the agent register (but this is unlikely)
try {
re.getAgentRegisterAddress();
} catch (...) {
RootEntry re2(m_backend);
ScopedExclusiveLock rel(re2);
re2.fetch();
re2.addOrGetAgentRegisterPointerAndCommit(m_agentReference, cl);
}
Agent agent(m_agentReference.getAgentAddress(), m_backend);
agent.initialize();
cta::objectstore::EntryLogSerDeser cl("user0", "systemhost", time(NULL));
re.addOrGetAgentRegisterPointerAndCommit(m_agentReference, cl);
rel.release();
agent.insertAndRegisterSelf();
rel.lock(re);
re.fetch();
re.addOrGetDriveRegisterPointerAndCommit(m_agentReference, cl);
rel.release();
// Likewise, make sure the drive register is around.
try {
re.getDriveRegisterAddress();
} catch (...) {
RootEntry re2(m_backend);
ScopedExclusiveLock rel(re2);
re2.fetch();
re2.addOrGetDriveRegisterPointerAndCommit(m_agentReference, cl);
}
}
//------------------------------------------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment