Skip to content

Commit 9415872

Browse files
committed
CCDB: Don't require an alien token on EPN / FLP
1 parent 7035ff8 commit 9415872

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

CCDB/include/CCDB/CcdbApi.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,6 +522,7 @@ class CcdbApi //: public DatabaseInterface
522522
bool mPreferSnapshotCache = false; // if snapshot is available, don't try to query its validity even in non-snapshot backend mode
523523
bool mInSnapshotMode = false;
524524
mutable TGrid* mAlienInstance = nullptr; // a cached connection to TGrid (needed for Alien locations)
525+
bool mNeedAlienToken = true; // On EPN and FLP we use a local cache and don't need the alien token
525526
static std::unique_ptr<TJAlienCredentials> mJAlienCredentials; // access JAliEn credentials
526527

527528
ClassDefNV(CcdbApi, 1);

CCDB/src/CcdbApi.cxx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ void CcdbApi::init(std::string const& host)
119119
snapshotReport += ')';
120120
}
121121

122+
mNeedAlienToken = host != "http://o2-ccdb.internal" && host != "http://localhost:8084" && host != "http://127.0.0.1:8084";
123+
122124
LOGP(info, "Init CcdApi with UserAgentID: {}, Host: {}{}", mUniqueAgentID, host,
123125
mInSnapshotMode ? "(snapshot readonly mode)" : snapshotReport.c_str());
124126
}
@@ -723,7 +725,7 @@ void* CcdbApi::extractFromLocalFile(std::string const& filename, std::type_info
723725

724726
bool CcdbApi::initTGrid() const
725727
{
726-
if (!mAlienInstance) {
728+
if (mNeedAlienToken && !mAlienInstance) {
727729
mAlienInstance = TGrid::Connect("alien");
728730
static bool errorShown = false;
729731
if (!mAlienInstance && errorShown == false) {

prodtests/full-system-test/dpl-workflow.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
MYDIR="$(dirname $(realpath $0))"
66
source $MYDIR/setenv.sh
77

8-
if [[ $EPNSYNCMODE == 0 && $DPL_CONDITION_BACKEND != "http://o2-ccdb.internal" && $DPL_CONDITION_BACKEND != "http://localhost:8084" ]]; then
8+
if [[ $EPNSYNCMODE == 0 && $DPL_CONDITION_BACKEND != "http://o2-ccdb.internal" && $DPL_CONDITION_BACKEND != "http://localhost:8084" && $DPL_CONDITION_BACKEND != "http://127.0.0.1:8084" ]]; then
99
alien-token-info >& /dev/null
1010
if [[ $? != 0 ]]; then
1111
echo "No alien token present" 1>&2

0 commit comments

Comments
 (0)