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

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