Blame SOURCES/bz1942363-fence_gce-default-to-cycle.patch

107896
From b8793b7cdacf0eb13e86581fcba1f78bb7a4bc13 Mon Sep 17 00:00:00 2001
107896
From: Tim Megela <megela@google.com>
107896
Date: Thu, 11 Mar 2021 06:41:59 -0500
107896
Subject: [PATCH] Default method moved back to powercycle
107896
107896
Moving back to powercycle as the default method for GCE.  This is the recommended approach from Google.  Using on/off as the default will have unintended consequences on google cloud platforms.
107896
---
107896
 agents/gce/fence_gce.py           | 2 ++
107896
 tests/data/metadata/fence_gce.xml | 2 +-
107896
 2 files changed, 3 insertions(+), 1 deletion(-)
107896
107896
diff --git a/agents/gce/fence_gce.py b/agents/gce/fence_gce.py
107896
index 1784e1b70..d59ce2bad 100644
107896
--- a/agents/gce/fence_gce.py
107896
+++ b/agents/gce/fence_gce.py
107896
@@ -358,6 +358,8 @@ def main():
107896
 	define_new_opts()
107896
 
107896
 	all_opt["power_timeout"]["default"] = "60"
107896
+	all_opt["method"]["default"] = "cycle"
107896
+	all_opt["method"]["help"] = "-m, --method=[method]          Method to fence (onoff|cycle) (Default: cycle)"
107896
 
107896
 	options = check_input(device_opt, process_input(device_opt))
107896
 
107896
diff --git a/tests/data/metadata/fence_gce.xml b/tests/data/metadata/fence_gce.xml
107896
index f09c771f3..bb5137878 100644
107896
--- a/tests/data/metadata/fence_gce.xml
107896
+++ b/tests/data/metadata/fence_gce.xml
107896
@@ -12,7 +12,7 @@ For instructions see: https://cloud.google.com/compute/docs/tutorials/python-gui
107896
 	</parameter>
107896
 	<parameter name="method" unique="0" required="0">
107896
 		<getopt mixed="-m, --method=[method]" />
107896
-		<content type="select" default="onoff"  >
107896
+		<content type="select" default="cycle"  >
107896
 			<option value="onoff" />
107896
 			<option value="cycle" />
107896
 		</content>