Check conntrack backup log in Dom0
When enable conntrack-tools, we will change the conntrackd.conf file, but there is an error, current code is checking the DomU to see whether the backup file exist, however this check should in Dom0, this patch is to fix this problem Change-Id: Ib9de2a2707785b04b38173e1d3bccadfa11b753e
This commit is contained in:
parent
6689a9f9c9
commit
dce4954d10
|
@ -456,7 +456,11 @@ def check_and_setup_ceilometer(himn, username, password):
|
|||
|
||||
def enable_conntrack_service(himn, username):
|
||||
# use conntrack statistic mode, so change conntrackd.conf
|
||||
if not os.path.exists('/etc/conntrackd/conntrackd.conf.back'):
|
||||
errcode, out, err = utils.ssh_detailed(
|
||||
himn, username, 'ls', '/etc/conntrackd/conntrackd.conf.back',
|
||||
allowed_return_codes=[0, 2])
|
||||
if errcode == 2:
|
||||
# Only make conntrackd.conf.back if it doesn't exist
|
||||
utils.ssh(himn, username,
|
||||
'mv',
|
||||
'/etc/conntrackd/conntrackd.conf',
|
||||
|
|
Loading…
Reference in New Issue