Project

General

Profile

Feature #21292

Add GCE termination command as suggested by Burt

Added by Marco Mambelli 10 months ago. Updated 7 days ago.

Status:
New
Priority:
Normal
Category:
-
Target version:
Start date:
11/01/2018
Due date:
% Done:

0%

Estimated time:
Stakeholders:
Duration:

Description

Burt committed a change off the 3.4.1 branch to shut down condor when the VM exits:

commit 0ddc04622b6c4f98819d6cc017bd9fcd9eeb64bd
Author: Burt Holzman 
Date: Wed Oct 31 12:14:19 2018 -0500

Add hard-coded Google Cloud shutdown script

On machine shutdown, send SIGQUIT to condor_master. This helps ensure that
preempted GCE instances don't linger (until their stale classad expires)
---
 creation/lib/cgWCreate.py |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/creation/lib/cgWCreate.py b/creation/lib/cgWCreate.py index 9fbe4b5..2ee3ee6 100644
--- a/creation/lib/cgWCreate.py
+++ b/creation/lib/cgWCreate.py
@@ -245,7 +245,9 @@ class GlideinSubmitDictFile(cgWDictFile.CondorJDLDictFile):
         # self.add("+gce_project_name", "$ENV(GCE_PROJECT_NAME)")
         # self.add("+gce_availability_zone", "$ENV(AVAILABILITY_ZONE)")
         self.add("gce_auth_file", "$ENV(GCE_AUTH_FILE)")
-        self.add("gce_metadata", "glideinwms_metadata=$ENV(USER_DATA)#### -cluster $(Cluster) -subcluster $(Process)####")
+        self.add("gce_metadata", "glideinwms_metadata=$ENV(USER_DATA)#### -cluster $(Cluster) -subcluster $(Process)####",
+                 "," 
+                 "shutdown-script=/usr/bin/killall -QUIT condor_master; sleep 5")
         self.add("gce_metadata_file", "$ENV(GLIDEIN_PROXY_FNAME)")

The code seems incorrect:
- .add() requires 2 string parameters, not 3 (the 3rd optional is a boolean)

I need to verify how the gce_metadata is parsed by the initialization service to undestand if the format provided is correct (how are parameters tokenized? will multiple shell commands be OK?

History

#1 Updated by Burt Holzman 10 months ago

Ah, my bad - I introduced an extra comma while transcribing this from slack logs. I'll check more rigorously and commit.

#2 Updated by Marco Mambelli 9 months ago

  • Assignee set to Marco Mambelli
  • Target version changed from v3_5 to v3_5_1

#3 Updated by Marco Mambelli 7 days ago

  • Target version changed from v3_5_1 to v3_5_2


Also available in: Atom PDF