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

HPCC-32963 Fix ecl unused-files for bare-metal roxie with TLS and custom port #19291

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions esp/services/ws_dfu/ws_dfuXRefService.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,10 @@ void CWsDfuXRefEx::init(IPropertyTree *cfg, const char *process, const char *ser
throw MakeStringException(-1, "No Dali Connection Active. Please Specify a Dali to connect to in you configuration file");
}

#ifndef _CONTAINERIZED
initBareMetalRoxieTargets(roxieConnMap);
Copy link
Contributor

@mckellyln mckellyln Nov 12, 2024

Choose a reason for hiding this comment

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

It seems like there is another

  void initBareMetalRoxieTargets(MapStringToMyClass<ISmartSocketFactory> &connMap, IPropertyTree *serviceTree, const char *daliAddress)

in ws_ecl_service.cpp - could these be commoned up ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK yes you're right- I'd copied that function from ws_ecl_service.cpp into TpWrapper for HPCC-31394 and missed the common-up. Should I common up in this ticket or in the parent (HPCC-32962) where I'll roll out the fix to the other services?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added a note to HPCC-32962 to common-up that code.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok

#endif

XRefNodeManager.setown(CreateXRefNodeFactory());

//Start out builder thread......
Expand Down Expand Up @@ -750,19 +754,24 @@ void CWsDfuXRefEx::findUnusedFilesWithDetailsInDFS(IEspContext &context, const c
void CWsDfuXRefEx::getRoxieFiles(const char *process, bool checkPackageMaps, MapStringTo<bool> &usedFileMap)
{
SocketEndpointArray servers;
Owned<IPropertyTree> controlXrefInfo;
#ifdef _CONTAINERIZED
StringBuffer epStr;
getService(epStr, process, true);
SocketEndpoint ep(epStr);
servers.append(ep);
#else
getRoxieProcessServers(process, servers);
if (!servers.length())
throw MakeStringExceptionDirect(ECLWATCH_INVALID_CLUSTER_INFO, "process cluster, not found.");
Owned<ISocket> sock = ISocket::connect_timeout(servers.item(0), ROXIECONNECTIONTIMEOUT);
controlXrefInfo.setown(sendRoxieControlQuery(sock, "<control:getQueryXrefInfo/>", ROXIECONTROLXREFTIMEOUT));
#else
ISmartSocketFactory *conn = roxieConnMap.getValue(process);
if (!conn)
throw makeStringExceptionV(ECLWATCH_CANNOT_GET_ENV_INFO, "Connection info for '%s' process cluster not found.", process ? process : "(null)");

controlXrefInfo.setown(sendRoxieControlQuery(conn, "<control:getQueryXrefInfo/>", ROXIECONTROLXREFTIMEOUT, ROXIECONNECTIONTIMEOUT));
#endif

Owned<ISocket> sock = ISocket::connect_timeout(servers.item(0), ROXIECONNECTIONTIMEOUT);
Owned<IPropertyTree> controlXrefInfo = sendRoxieControlQuery(sock, "<control:getQueryXrefInfo/>", ROXIECONTROLXREFTIMEOUT);
if (!controlXrefInfo)
throw MakeStringExceptionDirect(ECLWATCH_INTERNAL_ERROR, "roxie cluster, not responding.");
Owned<IPropertyTreeIterator> roxieFiles = controlXrefInfo->getElements("//File");
Expand Down
1 change: 1 addition & 0 deletions esp/services/ws_dfu/ws_dfuXRefService.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@ class CWsDfuXRefEx : public CWsDFUXRef
{
Owned<IXRefNodeManager> XRefNodeManager;
Owned<CXRefExBuilderThread> m_XRefbuilder;
MapStringToMyClass<ISmartSocketFactory> roxieConnMap;

IXRefFilesNode* getFileNodeInterface(IXRefNode& XRefNode,const char* nodeType);
void addXRefNode(const char* name, IPropertyTree* pXRefNodeTree);
Expand Down
Loading