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

fixes #10489 - adding two timeouts for content tasks #5225

Closed
wants to merge 1 commit into from

Conversation

jlsherrill
Copy link
Member

The first will fail the task if the client does not pick up the task
this likely means that either the client is not running, goferd is not running,
or goferd is having some sort of communication issue. (Default 20 seconds)

The second will fail if the client has picked up the task but has not completed it
after some time. This could happen if the link is really really slow, or the client dies
in the middle of a content action. (Default to 60 minutes)

@jlsherrill
Copy link
Member Author

requires Dynflow/dynflow#151

@@ -35,6 +35,9 @@ common:
redhat_repository_url: https://cdn.redhat.com
consumer_cert_rpm: 'katello-ca-consumer-latest.noarch.rpm'

content_action_accept_timeout: 20 #in seconds
content_action_finish_timeout: 3600 #in seconds
Copy link
Member

Choose a reason for hiding this comment

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

What about making these admin configurable settings as opposed to ones that require server restart?

The first will fail the task if the client does not pick up the task
this likely means that either the client is not running, goferd is not running,
or goferd is having some sort of communication issue. (Default 20 seconds)

The second will fail if the client has picked up the task but has not completed it
after some time.  This could happen if the link is really really slow, or the client dies
in the middle of a content action.  (Default to 60 minutes)
@jlsherrill
Copy link
Member Author

One way to test the initial 'pickup' timeout is to simply shut down goferd on the client.
To test the larger timeout, decrease the 'content_action_finish_timeout' setting to something smaller (like 30 seconds), and patch /usr/lib/gofer/plugins/katelloplugin.py on a client (restarting goferd aftewards):

--- /usr/lib/gofer/plugins/katelloplugin.py.bak 2015-05-14 15:48:40.013998877 -0400
+++ /usr/lib/gofer/plugins/katelloplugin.py 2015-05-14 15:48:22.973999712 -0400
@@ -355,6 +355,8 @@
         """
         conduit = Conduit()
         dispatcher = Dispatcher()
+        import os
+        os.system("sleep 400")
         report = dispatcher.install(conduit, units, options)
         return report.dict()

for some reason time.sleep() did not work for me, but it may have been a serverside issue at the time.

@ehelms
Copy link
Member

ehelms commented May 18, 2015

[test]

@ehelms
Copy link
Member

ehelms commented May 18, 2015

@iNecas
Copy link
Member

iNecas commented May 19, 2015

@ehelms it fails because https://github.com/Katello/katello/pull/5225/files#diff-3ba349775f9c0dd7cdf95b0fdc340077R19 passes '', instead of some number, that is expected: the settings needs to be set in testing environment to work properly

@ehelms
Copy link
Member

ehelms commented May 19, 2015

@iNecas thanks, I am going to take this PR and attempt to fix the tests and will push a new PR with them if you don't mind doing the final review. I have already tested this change as is in a production environment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants