Skip to content

Commit

Permalink
netns: Add lbaas support for Centos
Browse files Browse the repository at this point in the history
Change-Id: Ie023285c26e845fdb9e619e9b0baf163eb89b2e4
Signed-off-by: Anirban Chakraborty <abchak@juniper.net>
  • Loading branch information
anirban-c authored and divakardhar committed Feb 13, 2015
1 parent f450d6d commit 4535773
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions contrail_provisioning/compute/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ def fixup_config_files(self):
self.fixup_vrouter_nodemgr_param()
self.fixup_contrail_vrouter_agent()

def setup_lbaas_prereq(self):
if self.pdist in ['centos']:
local('groupadd -f nogroup')
local("sed -i s/'Defaults requiretty'/'#Defaults requiretty'/g /etc/sudoers")

def add_dev_tun_in_cgroup_device_acl(self):
# add /dev/net/tun in cgroup_device_acl needed for type=ethernet interfaces
with settings(warn_only = True):
Expand Down Expand Up @@ -267,6 +272,8 @@ def fixup_vhost0_interface_configs(self):
local("sudo chkconfig network on")
local("sudo chkconfig supervisor-vrouter on")
# end self.pdist == centos | fedora | redhat
# setup lbaas prereqs
self.setup_lbaas_prereq()

if self.pdist in ['Ubuntu']:
self._rewrite_net_interfaces_file(self.dev, self.mac, self.vhost_ip, self.netmask, self.gateway,
Expand Down

0 comments on commit 4535773

Please sign in to comment.