Skip to content

Commit

Permalink
NFS based live-migration fix
Browse files Browse the repository at this point in the history
Closes-Bug: #1655746
fixed issue in configuring libvirt to start in daemon mode,
specific to newton.

Change-Id: I101cf3d0270c117043d24b6f79abde08823bda18
  • Loading branch information
Jeya ganesh babu J committed Feb 9, 2017
1 parent 7982d04 commit 46d6db5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions contrail_provisioning/storage/compute/livemigration.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ def __init__(self, args_str = None):
libvirt_configured = run('cat %s |grep "\-d \-l"| wc -l' %(LIBVIRTD_UBUNTU_BIN_CONF))
if libvirt_configured == '0':
run('cat %s | sed s/"-d"/"-d -l"/ > %s' %(LIBVIRTD_UBUNTU_BIN_CONF, LIBVIRTD_TMP_BIN_CONF), shell='/bin/bash')
libvirt_enabled = run('cat %s |grep "^libvirtd_opts"| wc -l' %(LIBVIRTD_UBUNTU_BIN_CONF))
if libvirt_enabled == '0':
run('echo \'libvirtd_opts="-l"\' >> %s' %(LIBVIRTD_TMP_BIN_CONF))
#else:
#Handle other cases
run('cp -f %s %s' %(LIBVIRTD_TMP_BIN_CONF, LIBVIRTD_UBUNTU_BIN_CONF))
run('service nova-compute restart')
run('service libvirt-bin restart')
Expand Down

0 comments on commit 46d6db5

Please sign in to comment.