cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ahu...@apache.org
Subject [50/50] [abbrv] git commit: CS-16261: egress_vmchain doesn't exist in 2.2.*, create it automatically after upgrade
Date Mon, 10 Sep 2012 20:55:53 GMT
    CS-16261:
        egress_vmchain doesn't exist in 2.2.*, create it automatically after upgrade


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/33fdcf10
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/33fdcf10
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/33fdcf10

Branch: refs/heads/4.0
Commit: 33fdcf104782fc9f0b0ff402d77d013811dfa4ce
Parents: 3cfe01d
Author: Anthony Xu <anthony@cloud.com>
Authored: Fri Sep 7 17:07:10 2012 -0700
Committer: Anthony Xu <anthony@cloud.com>
Committed: Fri Sep 7 17:07:10 2012 -0700

----------------------------------------------------------------------
 scripts/vm/hypervisor/xenserver/vmops |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/33fdcf10/scripts/vm/hypervisor/xenserver/vmops
----------------------------------------------------------------------
diff --git a/scripts/vm/hypervisor/xenserver/vmops b/scripts/vm/hypervisor/xenserver/vmops
index ed7e7ca..79b67e7 100755
--- a/scripts/vm/hypervisor/xenserver/vmops
+++ b/scripts/vm/hypervisor/xenserver/vmops
@@ -1380,10 +1380,20 @@ def network_rules(session, args):
             cmds.append(iptables)
             util.SMlog(iptables)
       
-    vmchain = chain_name(vm_name)        
-    util.pread2(['iptables', '-F', vmchain])
-    egress_vmchain = egress_chain_name(vm_name)        
-    util.pread2(['iptables', '-F', egress_vmchain])
+    vmchain = chain_name(vm_name)
+    try:
+        util.pread2(['iptables', '-F', vmchain])
+    except:
+        util.SMlog("Ignoring failure to delete chain " + vmchain)
+        util.pread2(['iptables', '-N', vmchain])
+
+    egress_vmchain = egress_chain_name(vm_name)
+    try:
+        util.pread2(['iptables', '-F', egress_vmchain])
+    except:
+        util.SMlog("Ignoring failure to delete chain " + egress_vmchain)
+        util.pread2(['iptables', '-N', egress_vmchain])
+
     
     for cmd in cmds:
         util.pread2(cmd)


Mime
View raw message