[ARVADOS] updated: 2.1.0-2420-gc80d4aaea

Git user git at public.arvados.org
Thu May 5 17:18:21 UTC 2022


Summary of changes:
 services/api/config/initializers/reload_config.rb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

       via  c80d4aaea9466e0388b3a57e190292347e1fca18 (commit)
      from  ac2ea4ef187f7df369551a8cfa047fed8a1a2ba9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


commit c80d4aaea9466e0388b3a57e190292347e1fca18
Author: Tom Clegg <tom at curii.com>
Date:   Thu May 5 12:59:45 2022 -0400

    18794: Fix reload_config: don't assume restart.txt already exists.
    
    Arvados-DCO-1.1-Signed-off-by: Tom Clegg <tom at curii.com>

diff --git a/services/api/config/initializers/reload_config.rb b/services/api/config/initializers/reload_config.rb
index 0698f92ca..65f02e07a 100644
--- a/services/api/config/initializers/reload_config.rb
+++ b/services/api/config/initializers/reload_config.rb
@@ -47,7 +47,11 @@ else
           restartfile = Rails.root.join('tmp', 'restart.txt')
           touchtime = Time.now
           Rails.logger.info("reload_config: mtime on #{conffile} changed to #{t}, touching #{restartfile} to #{touchtime}")
-          File.utime(touchtime, touchtime, restartfile)
+          begin
+            File.utime(touchtime, touchtime, restartfile)
+          rescue
+            File.open(restartfile, 'w') {}
+          end
           # Even if passenger doesn't notice that we hit restart.txt
           # and kill our process, there's no point waiting around to
           # hit it again.

-----------------------------------------------------------------------


hooks/post-receive
-- 




More information about the arvados-commits mailing list