configurable timers for ssh_node*
Thierry Parmentelat [Tue, 27 Nov 2012 09:09:47 +0000 (10:09 +0100)]
system/TestPlc.py
system/config_bignode.py [new file with mode: 0644]
system/config_default.py

index c40d4be..cc2b0e7 100644 (file)
@@ -152,6 +152,8 @@ class TestPlc:
         self.vservername=plc_spec['vservername']
         self.url="https://%s:443/PLCAPI/"%plc_spec['vserverip']
        self.apiserver=TestApiserver(self.url,options.dry_run)
+        (self.ssh_node_boot_timeout,self.ssh_node_boot_silent)=plc_spec['ssh_node_boot_timers']
+        (self.ssh_node_debug_timeout,self.ssh_node_debug_silent)=plc_spec['ssh_node_debug_timers']
         
     def has_addresses_api (self):
         return self.apiserver.has_method('AddIpAddress')
@@ -1012,11 +1014,15 @@ class TestPlc:
         
     def ssh_node_debug(self):
         "Tries to ssh into nodes in debug mode with the debug ssh key"
-        return self.check_nodes_ssh(debug=True,timeout_minutes=10,silent_minutes=8)
+        return self.check_nodes_ssh(debug=True,
+                                    timeout_minutes=self.ssh_node_debug_timeout,
+                                    silent_minutes=self.ssh_node_debug_silent)
     
     def ssh_node_boot(self):
         "Tries to ssh into nodes in production mode with the root ssh key"
-        return self.check_nodes_ssh(debug=False,timeout_minutes=40,silent_minutes=38)
+        return self.check_nodes_ssh(debug=False,
+                                    timeout_minutes=self.ssh_node_boot_timeout,
+                                    silent_minutes=self.ssh_node_boot_silent)
     
     @node_mapper
     def qemu_local_init (self): pass
diff --git a/system/config_bignode.py b/system/config_bignode.py
new file mode 100644 (file)
index 0000000..277167c
--- /dev/null
@@ -0,0 +1,12 @@
+# Thierry Parmentelat <thierry.parmentelat@inria.fr>
+# Copyright (C) 2012 INRIA 
+#
+# allow one hour for the node to install
+
+def config (plc_specs, options):
+    def tweak_timers (plc_spec):
+        plc_spec['ssh_node_boot_timers'] (60, 58)
+        return plc_spec
+    return [tweak_timers (plc_spec) for plc_spec in plc_specs ]
+
+    
index d14f414..d7de172 100644 (file)
@@ -494,6 +494,9 @@ def plc (options,index) :
         'tcp_specs' : tcp_specs(options,index),
        'sfa' : sfa(options,index),
         'leases' : leases (options, index),
+        # big distros need more time to install nodes
+        'ssh_node_boot_timers': (40,38),
+        'ssh_node_debug_timers': (10,8),
     }
 
 # NOTE: SFA currently has SFA_AGGREGATE_API_VERSION=2 baked into the code