[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 09:43:03 CDT 2011


branch "review" has been updated
       via  bdfef11e6cb7fd5163e06af41580f736e0ae0686 (commit)
      from  39a4816547bd1515f78d23efab0fc324c0824700 (commit)

Summary of changes:
 plugins/failover.py |   72 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 remote.py           |    1 +
 2 files changed, 72 insertions(+), 1 deletions(-)


- Log -----------------------------------------------------------------
commit bdfef11e6cb7fd5163e06af41580f736e0ae0686
Author: Darren Sessions <dsessions at digium.com>
Date:   Wed May 25 09:43:00 2011 -0500

    ipv4 failover configurations for corosync and pacemaker. updated the remote script to delete the tmp files it generates during the archive function.

diff --git a/plugins/failover.py b/plugins/failover.py
index 5cc5a9f..03d89d8 100644
--- a/plugins/failover.py
+++ b/plugins/failover.py
@@ -39,4 +39,74 @@ class testsuite(util.TestSuiteRemoteBaseClass):
 
         return {'success':True}
 
-    def _componentConfig(self, mode, config, testPath):
+    def _corosyncConfig(self, ipV, nodeID, staticIntIP):
+        if ipV == 4:
+            config = [
+                'totem {',
+                '    version: 2',
+                '    token: 160',
+                '    token_retransmits_before_loss_const: 3',
+                '    join: 30',
+                '    consensus: 300',
+                '    vsftype: none',
+                '    max_messages: 20',
+                '    clear_node_high_bit: yes',
+                '    secauth: off',
+                '    threads: 0',
+                '    nodeid: %s' % nodeID,
+                '    rrp_mode: none',
+                '    interface {',
+                '        ringnumber: 0',
+                '        bindnetaddr: %s' % staticIntIP,
+                '        mcastaddr: 226.94.1.1',
+                '        mcastport: 5405',
+                '    }',
+                '}',
+                'amf {',
+                '    mode: disabled',
+                '}',
+                'service {',
+                '    ver:       0',
+                '    name:      pacemaker',
+                '}',
+                'aisexec {',
+                '    user:   root',
+                '    group:  root',
+                '}',
+                'logging {',
+                '    fileline: off',
+                '    to_stderr: yes',
+                '    to_logfile: no',
+                '    to_syslog: yes',
+                '    syslog_facility: daemon',
+                '    debug: off',
+                '    timestamp: on',
+                '    logger_subsys {',
+                '        subsys: AMF',
+                '        debug: off',
+                '        tags: enter|leave|trace1|trace2|trace3|trace4|trace6',
+                '    }',
+                '}']
+
+        return config
+
+    def _pacemakerConfig(self, ipV, node1, node2, sharedIP):
+        if ipV == 4:
+            config = [
+                'node %s\n' % node1,
+                'node %s\n' % node2,
+                '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' % node1,
+                '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"']
+        return config
+
diff --git a/remote.py b/remote.py
index b57d4fa..0ebfd9a 100755
--- a/remote.py
+++ b/remote.py
@@ -210,6 +210,7 @@ class RemoteManagement(object):
             rpc.reset()
         except:
             return {'success':False,'msg':'%s is unable to transfer files to %s. Connection refused.' % (server, remote)}
+        rpc.removeFile(fn)
         r = open('%s/tmp/%s' % (cwd, fn), "rb")
         return rpc.remoteSideRecvFile(fn, xmlrpclib.Binary(r.read()))
 

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


-- 
asterisk-scf/integration/testsuite.git



More information about the asterisk-scf-commits mailing list