Skip to content
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

Allow setting connect string from SiteLocalConfig #31544

Merged
merged 2 commits into from Oct 31, 2020

Conversation

wddgit
Copy link
Contributor

@wddgit wddgit commented Sep 22, 2020

PR description:

Add support for setting the connection string in PoolDBESSource based on the site local config XML file and the global tag. Here is an example of of how to modify the XML file:

<site-local-config>
<site name="DUMMY">
   ...
   <calib-data>
      ...
      <local-connect>
         <connectString prefix="anything1" suffix="anything2"/>
      </local-connect>
...

If a non-empty globaltag is in the PoolDBESSource configuration and <local-connect> is in the XML file as shown above, then the connection string will be overwritten by the result of concatenating the prefix plus the globaltag plus the suffix. The prefix and suffix are from the XML file and can be set to anything or nothing.

An exception will be thrown if <local-connect> and <frontier-connect> are both set in the same XML file.

It is also possible to override the prefix and suffix from the configuration of the SiteLocalConfigService. It is also possible to force overwriting of the connection string in the same way.

This is primarily intended for use at sites where the worker nodes do not have network connectivity and the data normally retrieved from a database must be put into a local file.

PR validation:

Extended SiteLocalConfig unit tests to cover these new variables.

This should not change any behavior or results until a site local config XML file modified or the override configuration parameters are used. Existing tests of PoolDBESSource verify that.

We have not yet tested this on remote worker nodes that do not have network connectivity. The intent is to do that testing after the PR is merged and if necessary make further changes.

@cmsbuild
Copy link
Contributor

The code-checks are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+code-checks

Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-31544/18553

  • This PR adds an extra 32KB to repository

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @wddgit (W. David Dagenhart) for master.

It involves the following packages:

CondCore/ESSources
FWCore/Catalog
FWCore/Services

@smuzaffar, @Dr15Jones, @makortel, @christopheralanwest, @tocheng, @cmsbuild, @tlampen, @ggovi, @pohsun can you please review it and eventually sign? Thanks.
@makortel, @mmusich, @tocheng this is something you requested to watch as well.
@silviodonato, @dpiparo, @qliphy you are the release manager for this.

cms-bot commands are listed here

@wddgit
Copy link
Contributor Author

wddgit commented Sep 22, 2020

please test

FYI @hernand

@cmsbuild
Copy link
Contributor

cmsbuild commented Sep 22, 2020

The tests are being triggered in jenkins.

@cmsbuild
Copy link
Contributor

+1
Tested at: 529704b
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-53dcb8/9506/summary.html
CMSSW: CMSSW_11_2_X_2020-09-22-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

if (siteLocalConfig.isAvailable()) {
std::string const& localConnectPrefix = siteLocalConfig->localConnectPrefix();
std::string const& localConnectSuffix = siteLocalConfig->localConnectSuffix();
if (!localConnectPrefix.empty() && !localConnectSuffix.empty()) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the suffix be allowed to be empty?

How about SiteLocalConfig would have a function telling if the local-config was specified or not, and then using the prefix and suffix without further checks here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable. I will change the code so that if is present in the XML, then the connection string will be changed to prefix + globaltag + suffix, even if the prefix and suffix are empty or not specified in the XML. I will push a commit with this change soon.

m_localConnectPrefix = safe(connectString->Attribute("prefix"));
m_localConnectSuffix = safe(connectString->Attribute("suffix"));
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would make the <frontier-connect> and <local-connect> elements mutually exclusive.

Copy link
Contributor Author

@wddgit wddgit Sep 23, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will make the change such that the SiteLocalConfigService constructor will throw an exception if both <frontier-connect> and <local-connect> are present. This seems reasonable to me.

This means someone creating a new XML file for one of these sites will have to both delete the <frontier-connect> section and add the <local-connect>. They will not be able to be lazy and just add <local-connect> and the other one then gets ignored. It is more work to edit the XML, but should be easier for someone to understand what is happening when reading the XML file.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-53dcb8/9506/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 4 differences found in the comparisons
  • DQMHistoTests: Total files compared: 35
  • DQMHistoTests: Total histograms compared: 2540471
  • DQMHistoTests: Total failures: 7
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2540442
  • DQMHistoTests: Total skipped: 22
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 34 files compared)
  • Checked 149 log files, 22 edm output root files, 35 DQM output files

@davidlange6
Copy link
Contributor

davidlange6 commented Oct 1, 2020 via email

@ggovi
Copy link
Contributor

ggovi commented Oct 6, 2020

My impression is that the proposal of this PR has not been fully understood here. There are two issues that are ( in my opinion ) well separated:

  • The 'custom' overwriting of the data source for ( potentially ) multiple condition records, with the toGet statements. In production workflow this is dangerous, it has been said that it should be not allowed. This is the issue mentioned by Chris. Last comment on my proposal has been issued by Fabio on August 2019. I think we should revisit the thing and start the implementation
  • The support of the processing of production workflow with NO db connection. Maybe this need has not been discussed enough in a public forum? IT looks to me that the reactions are questioning the use case itself. My opinion is that it can and it should be supported. And also, that the export of an entire GT into file(s), once the tools are well established, is an operation that should not require a 'validation'. The condition data set provided by a query in FronTier and the corresponding export in sqlite should be considered completely equivalent.

@ggovi
Copy link
Contributor

ggovi commented Oct 6, 2020

@mmusich whatever cannot be fully traced and reproduced within a db query, for me falls into category one of the issues...

@mmusich
Copy link
Contributor

mmusich commented Oct 6, 2020

@ggovi

whatever cannot be fully traced and reproduced within a db query, for me falls into category one of the issues...

I am not sure to follow you. The tags I am talking about are fully traced by the CMSSW configuration and reproduced by a DB queury, only they are not directly associated with any "physical" Global Tag.

If this use-case is not supported anymore (to which I don't really object), then please agree with the AlCa part of the project to support multiple Global Tag Queues for upgrade purposes. What is in place now is necessary as they did not agree to the extra burden of maintaining several different additional queues.

@ggovi
Copy link
Contributor

ggovi commented Oct 8, 2020

@mmusich The key point is the user-case. In what respect this is a special case and in what differs from the normal GT-centralized treatment? An hard-coded tag ( if this is the case ) is pretty much equivalent to a toGet statement, and therefore should be avoided. But maybe I'm missing something?

@ggovi
Copy link
Contributor

ggovi commented Oct 8, 2020

@mmusich Ok I see that your use case is driven by the intention to keep to a reasonable volume the amount of GT queues that AlCa need to support. Now I remind the discussions...
That means that we need to solve this issue before to be fully capable to support the productions with Conditions from file.
I'll investigate the option of the GT composition, that looks like could help.

@ggovi
Copy link
Contributor

ggovi commented Oct 12, 2020

@wddgit @makortel @christopheralanwest @hernand @mmusich
I propose to have a (short?) discussion on the subject. We should focus on 1. use cases and 2. operations. 1 is essential to clarify the need to solve the issues pointed out by Marco M. and 2. is important to define the formats and the technologies ( sqlite/ one or more files?
What about Wednesday this week, at 16:00?

@makortel
Copy link
Contributor

What about Wednesday this week, at 16:00?

This is week is generally bad because of the ongoing O&C week. Would next week work, or does the PPD workshop interfere? (if it does, how about two weeks from now?)

@ggovi
Copy link
Contributor

ggovi commented Oct 13, 2020

Ok. I guess next week will be equally hard to find a slot for everybody. Let's move it tentatively for the week of 26 October.

@ggovi
Copy link
Contributor

ggovi commented Oct 23, 2020

@wddgit @makortel @christopheralanwest @hernand @mmusich
I hope it is not too late to propose the discussion for next Monday, on the AlCaDB meeting time slot ( 16:00Geneva time ).
Please let us know if this could be acceptable, it would be good to have even only few slides on the point 1 and 2 above ( use cases and operation ).

@hernand
Copy link

hernand commented Oct 23, 2020

Fine with me on Monday 16h. I can prepare a couple of slides with the use case

@makortel
Copy link
Contributor

Monday at 16h works for me as well. Thanks @hernand for preparing slides.

@ggovi
Copy link
Contributor

ggovi commented Oct 24, 2020

@makortel @hernand @wddgit @christopheralanwest @mmusich
Thanks a lot, i've booked the AlCaDB meeting accordingly:

https://indico.cern.ch/event/969102/

@wddgit
Copy link
Contributor Author

wddgit commented Oct 27, 2020

Was the decision at the meeting to go ahead with this? Are we still waiting for more discussion? Was there something I needed to change?

@ggovi
Copy link
Contributor

ggovi commented Oct 30, 2020

For what I am concerned, we can go ahead. In the future, we might need some adaptation if the single file GT is replaced by a folder structure.

@ggovi
Copy link
Contributor

ggovi commented Oct 30, 2020

+1

@christopheralanwest
Copy link
Contributor

+1

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @silviodonato, @dpiparo, @qliphy (and backports should be raised in the release meeting by the corresponding L2)

@qliphy
Copy link
Contributor

qliphy commented Oct 31, 2020

+1

@cmsbuild cmsbuild merged commit c06e922 into cms-sw:master Oct 31, 2020
@wddgit wddgit deleted the localConnectInSiteLocalConfig branch May 3, 2021 14:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

9 participants