You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds a possibility to read a BKP client token from a file `qc_bkp_client_token` provided in the working directory if it was not found as environment variable.
if (std::filesystem::exists(tokenPath, ec) && !ec.value()) {
45
+
std::string token;
46
+
std::ifstream tokenFile(tokenPath);
47
+
// from now on, we throw if something goes wrong, because the user is clearly trying to use a token file
48
+
if (!tokenFile.is_open()) {
49
+
throwstd::runtime_error("BKP token file '" + tokenFileName + "' was provided but cannot be opened, check permissions");
50
+
}
51
+
std::getline(tokenFile, token);
52
+
if (token.empty()) {
53
+
throwstd::runtime_error("BKP token file '" + tokenFileName + "' was provided but it is empty, please provide a valid token");
54
+
}
55
+
ILOG(Debug, Devel) << "Using token from file qc_bkp_client_token" << ENDM;
56
+
return token;
57
+
}
58
+
59
+
ILOG(Debug, Devel) << "Could not find an env var QC_BKP_CLIENT_TOKEN nor a qc_bkp_client_token.txt file, using BKP client without an authentication token" << ENDM;
Copy file name to clipboardExpand all lines: doc/Framework.md
+23-3Lines changed: 23 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -587,6 +587,11 @@ If you need the directory structure preserved, add the argument `--preserve-dire
587
587
588
588
The framework allows to propagate Quality Objects (QOs) produced by Checks and Aggregators to RCT in Bookkeeping.
589
589
The synchronisation is done once, at the end of workflow runtime, i.e. at the End of Run or in the last stage of QC merging on Grid.
590
+
Check results are converted into Flags, which are documented in [O2/DataFormats/QualityControl](https://github.com/AliceO2Group/AliceO2/tree/dev/DataFormats/QualityControl).
591
+
Information about the object validity is preserved, which allows for time-based flagging of good/bad data.
592
+
593
+
### Configuration details
594
+
590
595
Propagation can be enabled by adding the following key-value pair to Check/Aggregator configuration:
591
596
592
597
```json
@@ -595,10 +600,25 @@ Propagation can be enabled by adding the following key-value pair to Check/Aggre
595
600
596
601
Using it for Aggregators is discouraged, as the information on which exact Check failed is lost or at least obfuscated.
597
602
598
-
Also, make sure that the configuration file includes the Bookkeeping URL and there is an env var `QC_BKP_CLIENT_TOKEN` with authentication token for setups external to P2.
603
+
To allow QC to connect to Bookkeeping, include the its URL in the QC configuration file, e.g.:
599
604
600
-
Check results are converted into Flags, which are documented in [O2/DataFormats/QualityControl](https://github.com/AliceO2Group/AliceO2/tree/dev/DataFormats/QualityControl).
601
-
Information about the object validity is preserved, which allows for time-based flagging of good/bad data.
605
+
```json
606
+
{
607
+
"qc": {
608
+
"config": {
609
+
"bookkeeping": {
610
+
"url": "bookkeeping.cern.ch:12345"
611
+
}
612
+
}
613
+
}
614
+
}
615
+
```
616
+
617
+
For setups external to P2, one also needs to provide a BKP client token.
618
+
It can be done by creating a file named `qc_bkp_client_token` in the working directory, containing just the token.
619
+
In such case, please ensure minimal permissions for the file, so that it is not readable by other users.
620
+
Alternatively, it can be provided as an environment variable `QC_BKP_CLIENT_TOKEN`.
621
+
Then, avoid printing the environment variable in the logs.
0 commit comments