mirror of https://github.com/apache/cloudstack.git
Merge pull request #1991 from Accelerite/CLOUDSTACK-9821
CLOUDSTACK-9821: Fixed issue in deploying vm in basic zoneFixed issue in deploying vm in basic zone. There is issue in ipset command with xenserver 6.5. In util.pread2 ipset and -N is passed as single string and it caused the issue in command failure. util.pread2(['/bin/bash', '-c', 'ipset', '-N ', tmpname , type]) * pr/1991: CLOUDSTACK-9821: Fixed issue in deploying vm in basic zone Signed-off-by: Rajani Karuturi <rajani.karuturi@accelerite.com>
This commit is contained in:
commit
850c07cc8a
|
|
@ -1267,19 +1267,19 @@ def cache_ipset_keyword():
|
|||
type = getIpsetType()
|
||||
tmpname = 'ipsetqzvxtmp'
|
||||
try:
|
||||
util.pread2(['/bin/bash', '-c', 'ipset -N ' + tmpname + type])
|
||||
util.pread2(['ipset', '-N', tmpname, type])
|
||||
except:
|
||||
util.pread2(['/bin/bash', '-c', 'ipset -F ' + tmpname])
|
||||
util.pread2(['ipset', '-F', tmpname])
|
||||
|
||||
try:
|
||||
util.pread2(['/bin/bash', '-c', 'iptables -A INPUT -m set --set ' + tmpname + ' src' + ' -j ACCEPT'])
|
||||
util.pread2(['/bin/bash', '-c', 'iptables -D INPUT -m set --set ' + tmpname + ' src' + ' -j ACCEPT'])
|
||||
util.pread2(['iptables -A INPUT -m set --set ' + tmpname + ' src' + ' -j ACCEPT'])
|
||||
util.pread2(['iptables -D INPUT -m set --set ' + tmpname + ' src' + ' -j ACCEPT'])
|
||||
keyword = 'set'
|
||||
except:
|
||||
keyword = 'match-set'
|
||||
|
||||
try:
|
||||
util.pread2(['/bin/bash', '-c', 'ipset -X ' + tmpname])
|
||||
util.pread2(['ipset', '-X', tmpname])
|
||||
except:
|
||||
pass
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue