-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
questions on conddb
behaviour with "read-only" CMSSW areas
#42292
Comments
A new Issue was created by @missirol Marino Missiroli. @Dr15Jones, @perrotta, @dpiparo, @rappoccio, @makortel, @smuzaffar can you please review it and eventually sign/assign? Thanks. cms-bot commands are listed here |
assign db |
New categories assigned: db @perrotta,@consuegs,@francescobrivio,@saumyaphor4252,@tvami you have been requested to review this Pull request/Issue and eventually sign? Thanks |
looks to me that a fix could be as simple as this: diff --git a/CondCore/Utilities/python/cond2xml.py b/CondCore/Utilities/python/cond2xml.py
index 1a64d662f45..7c6ea35c310 100644
--- a/CondCore/Utilities/python/cond2xml.py
+++ b/CondCore/Utilities/python/cond2xml.py
@@ -86,6 +86,10 @@ class CondXmlProcessor(object):
devCheckout = (releaseBase != '')
if not devCheckout:
logging.debug('Looks like the current working environment is a read-only release')
+ if not os.path.exists( libPath ):
+ if "CMSSW_FULL_RELEASE_BASE" in os.environ:
+ libDir = os.path.join( os.environ["CMSSW_FULL_RELEASE_BASE"], 'lib', os.environ["SCRAM_ARCH"] )
+ libPath = os.path.join( libDir, libName )
if not os.path.exists( libPath ) and devCheckout:
# main release ( for dev checkouts )
libDir = os.path.join( releaseBase, 'lib', os.environ["SCRAM_ARCH"] ) |
So should this fix PRed? (Sorry if it was and I missed it) |
I will test it and do PR in the next days :D |
for the moment I opened #42324, feel free to discard it (in my tests it worked). |
Thanks Marco! |
Thanks @mmusich , I tested your suggestion and it works. If you or @cms-sw/db-l2 find it useful, I wrote missirol@ea229a8 while testing, but any solution works for me. If possible, I would like to backport the fix to |
+db |
This issue is fully signed and ready to be closed. |
I'm trying to understand better the behavior of
conddb
in a not-so-standard situation.cmsrel
, but just runningcmsenv
where the centrally-installed release is).The test command in question is in [1]. The issue is that this works when using a full release, but it does not work when using a patch release [2]. The error seen with patch release comes from here, and has to do with how the script tries to find the file
pluginUtilities_payload2xml.so
.Full-release case: [1] works, the file
pluginUtilities_payload2xml.so
is found under${CMSSW_BASE}/lib/${SCRAM_ARCH}
. The environment variables are as followsPatch-release case: [1] fails with the error in [2]. The file
pluginUtilities_payload2xml.so
is available under${CMSSW_FULL_RELEASE_BASE}/lib/${SCRAM_ARCH}
, butconddb
throws an error because it does not find it in${CMSSW_BASE}/lib/${SCRAM_ARCH}
and${CMSSW_RELEASE_BASE}
is empty (see logic here). The environment variables are as followsThe only workaround I could find is below, and it makes [1] work with patch releases (at least in my specific use case).
CMSSW_RELEASE_BASE=${CMSSW_BASE} conddb [...]
Questions:
cmsrel
?[1]
[2] Error using [1] with a patch release:
The text was updated successfully, but these errors were encountered: