- Sep 03, 2014
-
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
Upstream version 3.3.0~rc5
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
-
Before this patch the cache had useless functions and the object FileCache could be re-index in the Cache data structure. The size was not recomputed and there was race condition on it. This patch uses the monitor design pattern to simplify the design. The cache has a lock to add or remove elements. Every FileCache has a lock to update, acquire or release a token, fetch a file etc. This patch updates test/test_cache.rb to test this module. Change-Id: I9a660ce179d090d4c449c40ca5a7b1a7b82707eb
-
Stéphane Martin authored
Change-Id: I4cebfaf1da713f2b5ada6e95df5964027920fa6e
-
Stéphane Martin authored
Since ruby 2.0, it is forbiden to take a lock or synchronize inside a trap context. To resolve this issue, this patch adds thread inside trap and uses the thread context. Try this code with thread arguement or not in different ruby version: $mumu = Mutex.new def fault() begin $mumu.synchronize do puts "int" end rescue Exception => ex puts ex puts ex.backtrace end end def thread_fault() t=Thread.new do fault() end t.join end if ARGV[0] == 'thread' Signal::trap("INT") do thread_fault() end else Signal::trap("INT") do fault() end end Process.kill("INT",$$) Change-Id: If5130a2369e2d2a15a7081d421ad52d5c88fe130
-
JEANVOINE Emmanuel authored
-
Lucas Nussbaum authored
-
Change-Id: I06be7d992d9048620619d3dac9085a39e5ac1e2c
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
Merge "[Kadeploy3d] Bugfix: Use thread context instead of trap context for kill kadeploy for INT and TERM with ruby >=2.0."
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
-
Change-Id: I8723dc9f7ac6fb68b8155945ec0ec086a5b974f9
-
When a USR2 signal was received, Kadeploy explores all thread and display a backtrace. A backtrace of a thread could be nil. Before this patch, we try to call join even if this backtrace is nil. This patch resolve this issue. See bug https://intranet.grid5000.fr/bugzilla/show_bug.cgi?id=5650 for details. Change-Id: Iac7831450a983aaa3e52e71266285e87f44ce057
-
- Aug 26, 2014
-
-
Stéphane Martin authored
[Kadeploy3d] Bugfix: Use thread context instead of trap context for kill kadeploy for INT and TERM with ruby >=2.0. Since ruby 2.0, it is forbiden to take a lock or synchronize inside trap context. To resolve this issue, this patch adds thread inside trap and uses the thread context. Try this code with thread arguement or not in different ruby version: $mumu = Mutex.new def fault() begin $mumu.synchronize do puts "int" end rescue Exception => ex puts ex puts ex.backtrace end end def thread_fault() t=Thread.new do fault() end t.join end if ARGV[0] == 'thread' Signal::trap("INT") do thread_fault() end else Signal::trap("INT") do fault() end end Process.kill("INT",$$) Change-Id: I4959d8d45ba74bb6b1452dac7c985daf619b9b02
-
Stéphane Martin authored
Since ruby 2.0, the signal trap has special context. This patch add a Thread to resolve this issue. Change-Id: I365a4ff686a38600dbdc40e3d0db23e0ad1c25de
-
Stéphane Martin authored
Before this patch, the end of database connection must be made in two times: disconnect and free. The issue is that kaworkflow calls free without disconnect. Now free function closes the SQL connection if a connection was established and disconnect function is deleted. This resolves the kaworkflow issue. Note for developers: Kadeploy establishes one SQL connexion on each action (in fact, each connexion to server, it can be avoided for the polling if workflow keeps the user right only for the polling). When a workflow is created, a second SQL connection is established because the workflow has longer life than execution context. My opinion is to made only one connection for everything. I was tested with the modification of file server.rb: check_database establishes the SQL connection and database_handler return the connection. It works fine with concurrency. But EJ said that the MySQL module has weird behavior after one week of running. Change-Id: I2b1610890aded0b538fade4a3fc386857b777127
-
JEANVOINE Emmanuel authored
-
- Aug 25, 2014
-
-
Stéphane Martin authored
With this patch, there is only one thread to manage the pipes and waitpid. The wait of this function checks the status of this thread. Killing a 'execute.wait()' function kills the process with 'execute.kill()' function. This patch provides some test for execute class in test/test_execute.rb. Change-Id: Id585094f462c86647b8b4ef3013e64b00badcd91
-
- Aug 19, 2014
-
-
Stéphane Martin authored
When the client is called with multi-site the result function will be called many times. But the result files are opened with w+ and it overwrite the file. This patch use a+ to append the file. The file will be reseted on argument parsing inside the load_outputfile function. Change-Id: I4aaf313013631a9b1aa6fe90f2369924fa5bbd4a
-
- Aug 13, 2014
-
-
JEANVOINE Emmanuel authored
Upstream version 3.3.0~rc4
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
Change-Id: I3b2f1f70ff4a158df08e746a818a3bd2b384df0b
-
- Aug 12, 2014
-
-
JEANVOINE Emmanuel authored
Upstream version 3.3.0~rc3
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
-
Stéphane Martin authored
The module Ruby/Mysql has a part in C language. This part manages the socket which is connected to the server. This socket is not referenced by ruby. When we fork this socket is dumped to the child and we can not find this socket with ObjectSpace. So this patch replace ObjectSpace by "Dir.foreach('/proc/self/fd')". This line iterate with all opened file descriptor for the current application. Change-Id: I214638750dbdb6e7f3e1e6cd2768d1fcf959c072
-
JEANVOINE Emmanuel authored
-
JEANVOINE Emmanuel authored
-
Stéphane Martin authored
The kaworkflow uses different matching than environment. This is an issue when the API is used. Because the API use directly deploy without ask environment This patch fixes the bug: https://intranet.grid5000.fr/bugzilla/show_bug.cgi?id=5631 Change-Id: Idb3c7caabbf8dc550438c4afc81b5c223d7c079b
-
- Aug 08, 2014
-
-
Stéphane Martin authored
The webrick server has pool of threads. Threrefore, when a servlet never finishes, the used thread becomes busy. When all threads are busy, the webrick server can't respond to new request. This timeout raise an exception after 10 min if the servlet has not finished. This exception shows where the thread was locked. Change-Id: Ic646ab22c33760e242238f3a3551eec74dd7e5ce
-
Lucas Nussbaum authored
-
Stéphane Martin authored
Before this patch the hook part of kaworkflow catch SignalException to detect if the timeout was reached. Now we need to catch Timeout::Error, because the exception SignalException is no more raised since the patch https://intranet.grid5000.fr/gerrit/#/c/2198/ (61156f11) Change-Id: I3333bd46b63a5e3969f298c32d07498ed73ee524
-
- Aug 07, 2014
-
-
Lucas Nussbaum authored
-
stephane martin authored
With this patch the arity and auto-propagate parameters of kadeploy is given to kascade Change-Id: Id6143c7812d08dcacca848a6e0bef98bf9cd1d7d
-
Lucas Nussbaum authored
Change-Id: I2dfe59dc453fef46438ba5c0875436030f42f3d8
-