Skip to content

Commit

Permalink
kmod=vrouter in /etc/contrail/agent_param
Browse files Browse the repository at this point in the history
When upgrading from R2.3 or above, kmod value should be set to "vrouter" in /etc/contrail/agent_param
Closes-Bug: 1683574

Change-Id: I8d3214ef5a38a723eaa1ab69713dcb00ff143733
  • Loading branch information
npchandran committed Jun 9, 2017
1 parent f47a4c1 commit ea5eac9
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions contrail_provisioning/compute/upgrade.py
Expand Up @@ -12,6 +12,7 @@
from contrail_provisioning.compute.common import ComputeBaseSetup

from fabric.api import local
from fabric.context_managers import settings


class ComputeUpgrade(ContrailUpgrade, ComputeSetup):
Expand Down Expand Up @@ -76,8 +77,20 @@ def fix_nova_params(self):
nova_conf_file)
local("service %s start" % openstack_compute_service)

def fix_agent_params(self):
# kmod=vrouter after introduction of modprobe in centos/redhat
# platforms. Ensure all upgraded system has kmod=vrouter
with settings(warn_only=True):
local("sed -i 's$^kmod[ ]*=[ ]*/lib/modules/[^/]*/extra/net/vrouter/vrouter.ko$kmod=vrouter$g' \
/etc/contrail/agent_param")
local("grep '^kmod[ ]*=[ ]*vrouter' /etc/contrail/agent_param")

def upgrade(self):
self._upgrade()
if self.pdist not in ['Ubuntu'] and \
self._args.from_rel >= LooseVersion('2.21') and \
self._args.to_rel <= LooseVersion('3.2'):
self.fix_agent_params()
if ('running' in
local('service supervisor-vrouter status', capture=True)):
local("service supervisor-vrouter stop")
Expand Down

0 comments on commit ea5eac9

Please sign in to comment.