[asterisk-scf-commits] asterisk-scf/integration/testsuite.git branch "review" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Wed May 25 20:25:10 CDT 2011


branch "review" has been updated
       via  b740b183b12c79fddc522462bcde7c4ff0b01618 (commit)
      from  099666fb9bc7a9ece2c93ed40b4d7b8f1110632c (commit)

Summary of changes:
 plugins/failover.py |   50 ++++++++++++++++++++++++--------------------------
 1 files changed, 24 insertions(+), 26 deletions(-)


- Log -----------------------------------------------------------------
commit b740b183b12c79fddc522462bcde7c4ff0b01618
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed May 25 20:24:55 2011 -0500

    failover failover failover

diff --git a/plugins/failover.py b/plugins/failover.py
index 425501b..c1da885 100644
--- a/plugins/failover.py
+++ b/plugins/failover.py
@@ -67,9 +67,6 @@ class testsuite(util.TestSuiteBaseClass):
             standbyNode['nodeID'] = '1'
             (standbyNode['ipv4'], standbyNode['ipv6'])  = standbyNode['rpc'].whatAreMyIps()
 
-        print activeNode['ipv4'], activeNode['ipv6']
-        print standbyNode['ipv4'], standbyNode['ipv6']
-
         results = activeNode['rpc'].wFile('/etc/corosync/corosync.conf', '\n'.join(self._corosyncConfig(activeNode[ipv], standbyNode[ipv], activeNode['nodeID'], activeNode['nAddr'])))
         if not results['success'] == True:
             return self._addShutdownList(results, shutdownList)
@@ -84,21 +81,24 @@ class testsuite(util.TestSuiteBaseClass):
         if not results['success'] == True:
             return self._addShutdownList(results, shutdownList)
 
-        activeNode['rpc'].writeFile('pacemaker.cli', '\n'.join(self._pacemakerConfig(activeNode[ipv], standbyNode[ipv], sharedIP)))
+        time.sleep(100)
+
+        activeNode['rpc'].writeFile('pacemaker.cli', '\n'.join(self._pacemakerConfig(testData['cmd']['shared_ip'], testData['cmd']['testsuite_remote_active'])))
         if not results['success'] == True:
             return self._addShutdownList(results, shutdownList)
         results = activeNode['rpc'].run('failover', 'crm', ['crm', '-f', '!!TMP!!/pacemaker.cli'], True)
         
- 
-        results = activeNode['rpc'].run('failover', 'cibadmin', ['cibadmin', '-E', '--force'], True)
-        if not results['success'] == True:
-            return self._addShutdownList(results, shutdownList)
-        results = standbyNode['rpc'].run('failover', 'cibadmin', ['cibadmin', '-E', '--force'], True)
-        if not results['success'] == True:
-            return self._addShutdownList(results, shutdownList)
+#        results = activeNode['rpc'].run('failover', 'cibadmin', ['cibadmin', '-E', '--force'], True)
+#        if not results['success'] == True:
+#            return self._addShutdownList(results, shutdownList)
+#        results = standbyNode['rpc'].run('failover', 'cibadmin', ['cibadmin', '-E', '--force'], True)
+#        if not results['success'] == True:
+#            return self._addShutdownList(results, shutdownList)
 
         time.sleep(100)
 
+        
+
         return {'success':True,'shutdownList':shutdownList}
 
 
@@ -141,7 +141,7 @@ class testsuite(util.TestSuiteBaseClass):
             '}',
             'logging {',
             '    fileline: off',
-            '    to_stderr: no',
+            '    to_stderr: yes',
             '    to_logfile: no',
             '    to_syslog: yes',
             '    syslog_facility: daemon',
@@ -155,20 +155,18 @@ class testsuite(util.TestSuiteBaseClass):
             '}']
         return config
 
-    def _pacemakerConfig(self, activeIP, standbyIP, sharedIP):
+    def _pacemakerConfig(self, sharedIP, activeHost):
         config = [
-            'primitive failover-ip ocf:heartbeat:IPaddr \\',
-            '    params ip="%s" \\' % sharedIP,
-            '    op monitor interval="1s" \\',
-            '    meta is-managed="true" target-role="Started"',
-            'location cli-prefer-failover-ip failover-ip \\',
-            '    rule $id="cli-prefer-rule-failover-ip" inf: #uname eq %s' % activeIP,
-            'property $id="cib-bootstrap-options" \\',
-            '    dc-version="1.0.8-042548a451fce8400660f6031f4da6f0223dd5dd" \\',
-            '    cluster-infrastructure="openais" \\',
-            '    expected-quorum-votes="2" \\',
-            '    stonith-enabled="false" \\',
-            '    no-quorum-policy="ignore" \\',
-            '    default-resource-stickiness="infinity"']
+            'configure',
+            'erase',
+            'commit',
+            'primitive failover-ip ocf:heartbeat:IPaddr params ip="%s" op monitor interval=1s meta is-managed="true" target-role="Started"' % sharedIP,
+            'location cli-prefer-failover-ip failover-ip rule $id="cli-prefer-rule-failover-ip" inf: #uname eq %s' % activeHost,
+            'property cluster-infrastructure="openais"',
+            'property expected-quorum-votes="2"',
+            'property stonith-enabled=false',
+            'property no-quorum-policy="ignore"',
+            'property default-resource-stickiness="infinity"',
+            'commit']
         return config
 

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list