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

XrdApp: Add XrdClProxyPlugin implementation #487

Merged
merged 1 commit into from
Mar 30, 2017

Conversation

esindril
Copy link
Contributor

@esindril esindril commented Mar 27, 2017

I've added as a .so library since it's not a shared library but a module which is loaded dynamically.

@abh3
Copy link
Member

abh3 commented Mar 27, 2017

Hi Elvin,

Almost there. Plugins generally cannot exist as pure ".so" files. We require that they be versioned. Take a look in XrdServer.cmake or (simpler) XrdSec.cmake to see how versioned plugin libraries are created. In the end you'll have something like libXrdClProxyPlugin-4.so where the "-4" is the version number. OK, this is what we do for the server. Michal, other than the security plugins which are auto-handled, do we do the same for other client-side plugins?

Andy

@simonmichal
Copy link
Contributor

simonmichal commented Mar 28, 2017

Hi Andy,

The version check is done properly for the XrdClProxyPlugin:

When the plugin version doesn't match it is rejected:

[simonm@idefix XrdCl]$ strings -a $XRD_PLUGIN | grep "@v"
@v:XrdClGetPlugIn v3.9.9
[simonm@idefix XrdCl]$ strings -a libXrdCl.so | grep "@v"
@v:client v4.9.9
[simonm@idefix XrdCl]$ ./xrdcp -f -d 1 root://esvm000//tmp/file1.dat /tmp/dump
[2017-03-28 15:14:19.234129 +0200][Debug ][Utility ] Unable to process user config file: [ERROR] OS Error: No such file or directory
[2017-03-28 15:14:19.234302 +0200][Info ][Utility ] Env: Importing from shell XRD_PLUGIN=/home/simonm/test/xrootd-3.9.9/build/src/libXrdClProxyPlugin.so as PlugIn
[2017-03-28 15:14:19.234335 +0200][Debug ][PlugInMgr ] Initializing plug-in manager...
[2017-03-28 15:14:19.234387 +0200][Debug ][PlugInMgr ] Loading default plug-in from /home/simonm/test/xrootd-3.9.9/build/src/libXrdClProxyPlugin.so...
[2017-03-28 15:14:19.234611 +0200][Debug ][PlugInMgr ] Error while loading /home/simonm/test/xrootd-3.9.9/build/src/libXrdClProxyPlugin.so: Unable to load client plugin /home/simonm/test/xrootd-3.9.9/build/src/libXrdClProxyPlugin.so
[2017-03-28 15:14:19.234625 +0200][Debug ][PlugInMgr ] Failed to load default plug-in from /home/simonm/test/xrootd-3.9.9/build/src/libXrdClProxyPlugin.so
...

If the plugin version does match it is loaded:

[simonm@idefix XrdCl]$ strings -a $XRD_PLUGIN | grep "@v"
@v:XrdClGetPlugIn v4.9.9
[simonm@idefix XrdCl]$ strings -a libXrdCl.so | grep "@v"
@v:client v4.9.9
[simonm@idefix XrdCl]$ ./xrdcp -f -d 1 root://esvm000//tmp/file1.dat /tmp/dump
[2017-03-28 15:15:05.885847 +0200][Debug ][Utility ] Unable to process user config file: [ERROR] OS Error: No such file or directory
[2017-03-28 15:15:05.885951 +0200][Info ][Utility ] Env: Importing from shell XRD_PLUGIN=/home/simonm/test/xrootd-4.9.9/build/src/libXrdClProxyPlugin.so as PlugIn
[2017-03-28 15:15:05.885971 +0200][Debug ][PlugInMgr ] Initializing plug-in manager...
[2017-03-28 15:15:05.885992 +0200][Debug ][PlugInMgr ] Loading default plug-in from /home/simonm/test/xrootd-4.9.9/build/src/libXrdClProxyPlugin.so...
[3.015kB/3.015kB][100%][==================================================][3.015kB/s]

To be honest the XrdClProxyPlugin is the first plugin that will be included with xrootd core, so there is no convention yet. Hence, it's up to you whether we should follow the "-4" naming convention, or not ;-)

Cheers,
Michal

@abh3
Copy link
Member

abh3 commented Mar 28, 2017 via email

Copy link
Contributor

@simonmichal simonmichal left a comment

Choose a reason for hiding this comment

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

Looks good!

@simonmichal simonmichal merged commit 91b6e71 into xrootd:master Mar 30, 2017
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.

None yet

3 participants