-
Notifications
You must be signed in to change notification settings - Fork 304
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
HPCC-30468 Use service hostname for external dafilesrv if available #17888
HPCC-30468 Use service hostname for external dafilesrv if available #17888
Conversation
https://track.hpccsystems.com/browse/HPCC-30468 |
@ghalliday @afishbeck - please review |
f6da4b8
to
fba1d45
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakesmith a couple of minor comments
@@ -683,20 +688,18 @@ IDFSFile *lookupDFSFile(const char *logicalName, AccessMode accessMode, unsigned | |||
// auto-discover local environment dfs service. | |||
#ifdef _CONTAINERIZED | |||
// NB: only expected to be here if experimental option #option('dfsesp-localfiles', true); is in use. | |||
// This finds and uses local dfs service for local read lookukup. | |||
// This finds and uses local dfs service for local read lookkups. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
still a typo!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3rd time lucky
} | ||
auto externalService = k8s::getDafileServiceFromConfig("directio"); | ||
VStringBuffer dafilesrvEpStr("%s:%u", externalService.first.c_str(), externalService.second); | ||
dafileSrvNode.setown(createINode(dafilesrvEpStr)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Accessing dafileSrvNode later on in the pushback needs to (and the createIGroup) needs to be done in a critical section in case it changes inside the call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, I'll fix.
StringBuffer hostname; | ||
dafilesrv.getProp("@hostname", hostname); | ||
if (hostname.length()) | ||
return { hostname.str(), port }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Neat. I never knew that....
@ghalliday - please see 2nd commit. |
@@ -214,7 +214,8 @@ static void splitUrlSections(const char *url, const char * &authority, size_t &a | |||
else | |||
{ | |||
authorityLen = path-url; | |||
fullpath.append(path); | |||
if (!streq(path, "/")) // treat empty trailing path as equal to no path |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, agreed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jakesmith please squash
Also: + auto-generate secret name for secure dfs service. + Refresh directio endpoint in remapGroupsToDafilesrv on config changes. + Avoid trailing '/' being treated differently to no path by secret name generation. Signed-off-by: Jake Smith <[email protected]>
b398061
to
00c31ea
Compare
@ghalliday - squashed. |
b362a4d
into
hpcc-systems:candidate-9.4.x
Also:
Type of change:
Checklist:
Smoketest:
Testing: