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

[v7r3] tornado-based https JobStateUpdate handler #5214

Merged
merged 22 commits into from
Aug 4, 2021

Conversation

fstagni
Copy link
Contributor

@fstagni fstagni commented Jun 21, 2021

BEGINRELEASENOTES

*WMS
NEW: Added a HTTPs JobManager service
NEW: Added a HTTPs JobMonitor service
NEW: Added a HTTPs JobStateUpdate service
CHANGE: Removed need for ThreadScheduler in JobManagerHandler

ENDRELEASENOTES

@chaen
Copy link
Contributor

chaen commented Jun 23, 2021

 {'Errno': 0, 'Message': u'404 Client Error: Not Found for url: https://server:8443/WorkloadManagement/TornadoMatcher: <html><title>404: Not Found</title><body>404: Not Found</body></html>', 'OK': False, 'rpcStub': (('WorkloadManagement/Matcher', {'skipCACheck': False, 'timeout': 600}), 'requestJob', [{'OwnerGroup': 'prod', 'OwnerDN': '/C=ch/O=DIRAC/OU=DIRAC CI/CN=ciuser', 'DIRACVersion': 'pippo', 'PilotInfoReportedFlag': 'True', 'VirtualOrganization': 'LHCb', 'PilotBenchmark': 'anotherPilot', 'ReleaseVersion': 'blabla', 'Site': 'DIRAC.Jenkins.ch', 'CPUTime': 86400}]), 'CallStack': ['  File "/home/dirac/LocalRepo/TestCode/DIRAC/tests/Integration/WorkloadManagementSystem/Test_Client_WMS.py", line 541, in <module>\n    testResult = unittest.TextTestRunner(verbosity=2).run(suite)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/runner.py", line 151, in run\n    test(result)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/suite.py", line 70, in __call__\n    return self.run(*args, **kwds)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/suite.py", line 108, in run\n    test(result)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/suite.py", line 70, in __call__\n    return self.run(*args, **kwds)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/suite.py", line 108, in run\n    test(result)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/case.py", line 431, in __call__\n    return self.run(*args, **kwds)\n', '  File "/home/dirac/ServerInstallDIR/diracos/usr/lib64/python2.7/unittest/case.py", line 367, in run\n    testMethod()\n', '  File "/home/dirac/LocalRepo/TestCode/DIRAC/tests/Integration/WorkloadManagementSystem/Test_Client_WMS.py", line 528, in test_matcher\n    res = MatcherClient().requestJob(resourceDescription)\n', '  File "/home/dirac/ServerInstallDIR/DIRAC/Core/Base/Client.py", line 112, in executeRPC\n    return getattr(rpcClient, toExecute)(*parms)\n', '  File "/home/dirac/ServerInstallDIR/DIRAC/Core/Tornado/Client/TornadoClient.py", line 53, in call\n    return self.executeRPC(attrname, *args)\n', '  File "/home/dirac/ServerInstallDIR/DIRAC/Core/Tornado/Client/TornadoClient.py", line 67, in executeRPC\n    retVal = self._request(**rpcCall)\n', '  File "/home/dirac/ServerInstallDIR/DIRAC/Core/Tornado/Client/private/TornadoBaseClient.py", line 581, in _request\n    return S_ERROR(errStr)\n']}

The URL should not change for the last part, it should still be WorkloadManagement/Matcher.

Also, the matcher was one of those service that couldn't be duplicated. If it's a tornado service, it's going to be massively duplicated :-)

@chaen
Copy link
Contributor

chaen commented Jun 23, 2021

I think it is unrelated, but it may be worth noting this error:

2021-06-21 15:53:40 UTC Transformation/DataRecoveryAgent [140662451406656] ERROR: Failure to get transformations MySQL Error ( 1131 : Execution failed.: ( 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') LIMIT 100' at line 1 ))

@chaen
Copy link
Contributor

chaen commented Jun 23, 2021

The URL should not change for the last part, it should still be WorkloadManagement/Matcher.

Forget what I said, it's correct.
Yet it is strange that Tornado does not find the handler

@chaen
Copy link
Contributor

chaen commented Jun 23, 2021

maybe what's missing is simply a restart of Tornado here

@fstagni
Copy link
Contributor Author

fstagni commented Jun 23, 2021

The matcher was one of those service that couldn't be duplicated. If it's a tornado service, it's going to be massively duplicated :-)

Good point, but it's not because it's a tornado service that it's absolutely going to be massively duplicated, right? It's more of a wish. Anyway, I will check in future about this bullet. I took Matcher more as an example here, JobStateUpdate would probably be a better one.

Should the restart of tornado be done after every new service installation?

@chaen
Copy link
Contributor

chaen commented Jun 23, 2021

The matcher was one of those service that couldn't be duplicated. If it's a tornado service, it's going to be massively duplicated :-)

Good point, but it's not because it's a tornado service that it's absolutely going to be massively duplicated, right? It's more of a wish. Anyway, I will check in future about this bullet. I took Matcher more as an example here, JobStateUpdate would probably be a better one.

Well, every tornado server will run a matcher. So as many matcher as hosts.

Should the restart of tornado be done after every new service installation?

Maybe, just to be on the safe side

@fstagni fstagni marked this pull request as draft June 24, 2021 09:06
@fstagni fstagni changed the title [v7r3] tornado-based https Matcher handler [v7r3] tornado-based https JobStateUpdate handler Jun 29, 2021
@fstagni fstagni force-pushed the v7r3-fixes12 branch 6 times, most recently from d0f3e51 to 32b3287 Compare July 5, 2021 14:31
@fstagni
Copy link
Contributor Author

fstagni commented Jul 5, 2021

Now the py2+https tests are passing.

I added a py3+https tests, but these are failing, specifically the DFC tests. Is there something obvious that should be changed?

@chaen
Copy link
Contributor

chaen commented Jul 6, 2021

I'll check for the python 3 stuff

Copy link
Contributor

@chaen chaen left a comment

Choose a reason for hiding this comment

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

I found where the problems are. I'll make a separate PR to enable all these tests for Py3. Can you remove the changes I pointed please ?

@@ -37,7 +34,9 @@ jobs:
- TEST_NAME: "Python 3 server"
ARGS: SERVER_USE_PYTHON3=Yes
- TEST_NAME: "Python 3 server and client"
ARGS: CLIENT_USE_PYTHON3=Yes SERVER_USE_PYTHON3=Yes MYSQL_VER=8.0
ARGS: CLIENT_USE_PYTHON3=Yes SERVER_USE_PYTHON3=Yes
Copy link
Contributor

Choose a reason for hiding this comment

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

please remove, I'll do in a separate PR

tests/CI/install_server.sh Show resolved Hide resolved
@@ -14,6 +14,7 @@

import os
import sys

Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove all the changes to that file, since it was addressed here #5223

@fstagni
Copy link
Contributor Author

fstagni commented Jul 6, 2021

I found where the problems are. I'll make a separate PR to enable all these tests for Py3. Can you remove the changes I pointed please ?

I will, when rebasing this PR on top of yours.

@fstagni fstagni linked an issue Jul 21, 2021 that may be closed by this pull request
3 tasks
@fstagni fstagni marked this pull request as ready for review July 29, 2021 13:19
find "/home/dirac/LocalRepo/ALTERNATIVE_MODULES/DIRAC" -name 'Tornado*Handler.py' | grep -v Configuration | sed -e 's/Handler.py//g' -e 's/System//g'| awk -F '/' '{print $(NF-2), $NF}' > tornadoServices
cfgProdFile="${SERVERINSTALLDIR}"/diracos/etc/Production.cfg
else
find "${SERVERINSTALLDIR}"/DIRAC/ -name 'Tornado*Handler.py' | grep -v Configuration | sed -e 's/Handler.py//g' -e 's/System//g'| awk -F '/' '{print $(NF-2), $NF}' > tornadoServices
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't think that this is necessary as tornadoservice is not used, and I believe the Production.cfg files are symlinked

Copy link
Contributor Author

Choose a reason for hiding this comment

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

where is the system_component (2 lines below) created? I have the impressione there's some merge or rebase issue.

@chaen
Copy link
Contributor

chaen commented Aug 4, 2021

The PR is fine with me but you have conflicts

@fstagni fstagni merged commit a7cd23f into DIRACGrid:integration Aug 4, 2021
@andresailer
Copy link
Contributor

@fstagni Should The TaskQueuesAgent be mentioned in the release notes and in https://github.com/DIRACGrid/DIRAC/wiki/DIRAC-v7r3 ?

@fstagni
Copy link
Contributor Author

fstagni commented Aug 12, 2021

@fstagni Should The TaskQueuesAgent be mentioned in the release notes and in https://github.com/DIRACGrid/DIRAC/wiki/DIRAC-v7r3 ?

Thanks for the reminder. Done.

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.

Add some Tornado-based services
4 participants