Skip to content

Support multiple exports in Globus XRootD plugin#153

Open
whwjiang wants to merge 1 commit into
PelicanPlatform:mainfrom
whwjiang:multiple_exports
Open

Support multiple exports in Globus XRootD plugin#153
whwjiang wants to merge 1 commit into
PelicanPlatform:mainfrom
whwjiang:multiple_exports

Conversation

@whwjiang
Copy link
Copy Markdown
Contributor

This is the XRootD side changes necessary to support multiple Globus exports. In particular, it allows multiple exports to be defined in the XRootD config.

These changes rely on this PR to actually do the work of generating the XRootD config, though it could technically be tested in isolation.

@whwjiang whwjiang requested a review from h2zh April 14, 2026 15:36
Comment thread src/GlobusFileSystem.cc
bool saw_blocks = false;
bool in_block = false;
GlobusRouteConfig default_route;
std::shared_ptr<GlobusRouteConfig> route(new GlobusRouteConfig(default_route));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
std::shared_ptr<GlobusRouteConfig> route(new GlobusRouteConfig(default_route));
std::shared_ptr<GlobusRouteConfig> route(
new GlobusRouteConfig(default_route));

Comment thread src/GlobusFileSystem.cc

if (!strcmp(attribute.c_str(), "globus.begin")) {
if (in_block) {
m_log.Emsg("Config", "Nested globus.begin blocks are not allowed");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
m_log.Emsg("Config", "Nested globus.begin blocks are not allowed");
m_log.Emsg("Config",
"Nested globus.begin blocks are not allowed");

Comment thread src/GlobusFileSystem.cc
}
if (!strcmp(attribute.c_str(), "globus.end")) {
if (!in_block) {
m_log.Emsg("Config", "Encountered globus.end without matching begin");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
m_log.Emsg("Config", "Encountered globus.end without matching begin");
m_log.Emsg("Config",
"Encountered globus.end without matching begin");

Comment thread src/GlobusFileSystem.cc
}
if (route->storage_prefix.empty() || route->endpoint_path.empty() ||
route->transfer_url.empty()) {
m_log.Emsg("Config", "globus route is missing one or more required settings");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
m_log.Emsg("Config", "globus route is missing one or more required settings");
m_log.Emsg(
"Config",
"globus route is missing one or more required settings");

Comment thread src/GlobusFileSystem.cc
m_transfer_token = TokenFile(transfer_token_file, &m_log);
if (!saw_blocks) {
auto final_route = std::make_shared<GlobusRouteConfig>(default_route);
if (final_route->storage_prefix.empty() || final_route->endpoint_path.empty() ||
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
if (final_route->storage_prefix.empty() || final_route->endpoint_path.empty() ||
if (final_route->storage_prefix.empty() ||
final_route->endpoint_path.empty() ||

Comment thread test/http_tests.cc

#include "../src/HTTPCommands.hh"
#include "../src/HTTPFileSystem.hh"
#include "../src/GlobusFileSystem.hh"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
#include "../src/GlobusFileSystem.hh"

Comment thread test/http_tests.cc
#include <algorithm>
#include <csignal>
#include <cstring>
#include <filesystem>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
#include <filesystem>

Comment thread test/http_tests.cc
#include <cstring>
#include <filesystem>
#include <fcntl.h>
#include <fstream>
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
#include <fstream>
#include <filesystem>
#include <fstream>

Comment thread test/http_tests.cc
Comment on lines +99 to +107
const auto cfgPath = writeTempConfig(
"httpserver.begin\n"
"httpserver.url_base https://root.example\n"
"httpserver.storage_prefix /\n"
"httpserver.end\n"
"httpserver.begin\n"
"httpserver.url_base https://foo.example\n"
"httpserver.storage_prefix /foo\n"
"httpserver.end\n");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
const auto cfgPath = writeTempConfig(
"httpserver.begin\n"
"httpserver.url_base https://root.example\n"
"httpserver.storage_prefix /\n"
"httpserver.end\n"
"httpserver.begin\n"
"httpserver.url_base https://foo.example\n"
"httpserver.storage_prefix /foo\n"
"httpserver.end\n");
const auto cfgPath =
writeTempConfig("httpserver.begin\n"
"httpserver.url_base https://root.example\n"
"httpserver.storage_prefix /\n"
"httpserver.end\n"
"httpserver.begin\n"
"httpserver.url_base https://foo.example\n"
"httpserver.storage_prefix /foo\n"
"httpserver.end\n");

Comment thread test/http_tests.cc
Comment on lines +133 to +144
const auto cfgPath = writeTempConfig(
"httpserver.trace debug\n"
"httpserver.token_file /tmp/shared.token\n"
"httpserver.remote_flavor webdav\n"
"httpserver.begin\n"
"httpserver.url_base https://root.example\n"
"httpserver.storage_prefix /\n"
"httpserver.end\n"
"httpserver.begin\n"
"httpserver.url_base https://foo.example\n"
"httpserver.storage_prefix /foo\n"
"httpserver.end\n");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[lint] reported by reviewdog 🐶

Suggested change
const auto cfgPath = writeTempConfig(
"httpserver.trace debug\n"
"httpserver.token_file /tmp/shared.token\n"
"httpserver.remote_flavor webdav\n"
"httpserver.begin\n"
"httpserver.url_base https://root.example\n"
"httpserver.storage_prefix /\n"
"httpserver.end\n"
"httpserver.begin\n"
"httpserver.url_base https://foo.example\n"
"httpserver.storage_prefix /foo\n"
"httpserver.end\n");
const auto cfgPath =
writeTempConfig("httpserver.trace debug\n"
"httpserver.token_file /tmp/shared.token\n"
"httpserver.remote_flavor webdav\n"
"httpserver.begin\n"
"httpserver.url_base https://root.example\n"
"httpserver.storage_prefix /\n"
"httpserver.end\n"
"httpserver.begin\n"
"httpserver.url_base https://foo.example\n"
"httpserver.storage_prefix /foo\n"
"httpserver.end\n");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant