Centos-related bugfixes
- Patching and building vrouter module - Service dependency fixes - Bunch of centos-specific network changes - Repository priority fixes Change-Id: I3dffbbd683590e84a0fdc9d2803b0525150fe0d8
This commit is contained in:
parent
70110fe2ec
commit
0e96c3cfb9
|
@ -0,0 +1,8 @@
|
|||
case $operatingsystem
|
||||
{
|
||||
CentOS:
|
||||
{
|
||||
yumrepo {'mos': priority => 1, exclude => 'python-thrift,nodejs'} # Contrail requires newer python-thrift and nodejs from it's repo
|
||||
package {'yum-plugin-priorities': ensure => present }
|
||||
}
|
||||
}
|
|
@ -1,5 +1,6 @@
|
|||
include contrail
|
||||
|
||||
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin', refresh => 'echo NOOP_ON_REFRESH'}
|
||||
|
||||
case $operatingsystem {
|
||||
Ubuntu: {
|
||||
|
@ -12,9 +13,23 @@ case $operatingsystem {
|
|||
}
|
||||
CentOS: {
|
||||
class { 'contrail::package':
|
||||
install => ['contrail-openstack-vrouter','iproute','haproxy'],
|
||||
}
|
||||
service {'supervisord': enable => true}
|
||||
install => ['contrail-openstack-vrouter','iproute','haproxy','patch'],
|
||||
remove => ['openvswitch','openstack-neutron-openvswitch']
|
||||
}
|
||||
->
|
||||
class { 'contrail::vrouter_module':}
|
||||
->
|
||||
file { '/etc/supervisord.conf':
|
||||
ensure => 'link',
|
||||
target => '/etc/contrail/supervisord_vrouter.conf',
|
||||
force => yes
|
||||
}
|
||||
->
|
||||
file {'/etc/contrail/default_pmac':
|
||||
ensure => present
|
||||
}
|
||||
->
|
||||
service {'supervisor-vrouter': enable => true}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
include contrail
|
||||
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin', refresh => 'echo NOOP_ON_REFRESH', timeout => 1800}
|
||||
if $contrail::node_name == $contrail::deployment_node {
|
||||
|
||||
class { 'contrail::testbed': }
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
include contrail
|
||||
|
||||
Exec { path => '/bin:/sbin:/usr/bin:/usr/sbin'}
|
||||
|
||||
if $contrail::node_name =~ /^contrail.\d+$/ {
|
||||
|
||||
case $operatingsystem
|
||||
|
@ -38,4 +40,4 @@ if $contrail::node_name =~ /^contrail.\d+$/ {
|
|||
pip_install => $pip_pkgs,
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,8 +0,0 @@
|
|||
case $operatingsystem
|
||||
{
|
||||
CentOS:
|
||||
{
|
||||
yumrepo {'mos': priority => 1}
|
||||
package {'yum-plugin-priorities': ensure => present }
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
PACKAGE_NAME=vrouter
|
||||
PACKAGE_VERSION="2.01"
|
||||
MAKE[0]="'make' -C . KERNELDIR=/lib/modules/${kernelver}/build"
|
||||
CLEAN[0]="'make' -C . KERNELDIR=/lib/modules/${kernelver}/build"
|
||||
BUILT_MODULE_NAME[0]="vrouter"
|
||||
DEST_MODULE_LOCATION[0]="/kernel/net/vrouter"
|
||||
AUTOINSTALL="yes"
|
|
@ -0,0 +1,22 @@
|
|||
diff --git a/include/vr_compat.h b/include/vr_compat.h
|
||||
index 998b55f..cd480fe 100644
|
||||
--- a/include/vr_compat.h
|
||||
+++ b/include/vr_compat.h
|
||||
@@ -9,7 +9,7 @@
|
||||
|
||||
#if (LINUX_VERSION_CODE < KERNEL_VERSION(3,3,0))
|
||||
#if (! (defined(RHEL_MAJOR) && defined(RHEL_MINOR) && \
|
||||
- (RHEL_MAJOR == 6) && (RHEL_MINOR == 5)))
|
||||
+ (RHEL_MAJOR == 6) && (RHEL_MINOR >= 5)))
|
||||
typedef u64 netdev_features_t;
|
||||
#endif
|
||||
#endif
|
||||
@@ -139,7 +139,7 @@ static inline void skb_reset_mac_len(struct sk_buff *skb)
|
||||
|
||||
#ifndef ISRHOSKERNEL
|
||||
#if (! (defined(RHEL_MAJOR) && defined(RHEL_MINOR) && \
|
||||
- (RHEL_MAJOR == 6) && (RHEL_MINOR == 5)))
|
||||
+ (RHEL_MAJOR == 6) && (RHEL_MINOR >= 5)))
|
||||
static bool can_checksum_protocol(netdev_features_t features, __be16 protocol)
|
||||
{
|
||||
return ((features & NETIF_F_GEN_CSUM) ||
|
|
@ -83,5 +83,4 @@ split(
|
|||
$tmp_rabbit = join($rabbit_hosts,':5673,')
|
||||
$rabbit_hosts_ports = "${tmp_rabbit}:5673"
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -8,9 +8,9 @@ class contrail::network (
|
|||
$public_if = undef,
|
||||
$public_gw = undef
|
||||
) {
|
||||
|
||||
Exec {
|
||||
path => '/bin:/sbin:/usr/bin:/usr/sbin',
|
||||
$br_aux_file = $operatingsystem ? {
|
||||
'Ubuntu' => '/etc/network/interfaces.d/ifcfg-br-aux',
|
||||
'CentOS' => ['/etc/sysconfig/network-scripts/ifcfg-br-aux',"/etc/sysconfig/network-scripts/ifcfg-${ifname}"],
|
||||
}
|
||||
|
||||
# Remove interface from the bridge
|
||||
|
@ -18,9 +18,8 @@ class contrail::network (
|
|||
command => "brctl delif br-aux ${ifname}",
|
||||
returns => [0,1] # Idempotent
|
||||
} ->
|
||||
file { '/etc/network/interfaces.d/ifcfg-br-aux':
|
||||
ensure => absent,
|
||||
} ->
|
||||
file { $br_aux_file: ensure => absent }
|
||||
->
|
||||
|
||||
case $node_role {
|
||||
'base-os':{
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
class contrail::setup (
|
||||
$node_name
|
||||
) {
|
||||
|
||||
if $node_name == $contrail::deployment_node {
|
||||
|
||||
$fixpath = $operatingsystem ? {
|
||||
'Ubuntu' => '/usr/local/lib/python2.7/dist-packages/contrail_provisioning/config/quantum_in_keystone_setup.py',
|
||||
'CentOS' => '/usr/lib/python2.6/site-packages/contrail_provisioning/config/quantum_in_keystone_setup.py'
|
||||
$pythonpath = $operatingsystem ? {
|
||||
'Ubuntu' => '/usr/local/lib/python2.7/dist-packages',
|
||||
'CentOS' => '/usr/lib/python2.6/site-packages'
|
||||
}
|
||||
|
||||
file {'/tmp/install.py.patch':
|
||||
|
@ -14,8 +13,7 @@ class contrail::setup (
|
|||
source => 'puppet:///modules/contrail/install.py.patch'
|
||||
} ->
|
||||
exec {'install.py.patch':
|
||||
command => '/usr/bin/patch /opt/contrail/utils/fabfile/tasks/install.py /tmp/install.py.patch',
|
||||
returns => [0,1] # Idempotent behaviour
|
||||
command => 'patch /opt/contrail/utils/fabfile/tasks/install.py /tmp/install.py.patch',
|
||||
} ->
|
||||
|
||||
file {'/tmp/ha.py.patch':
|
||||
|
@ -23,8 +21,7 @@ class contrail::setup (
|
|||
source => 'puppet:///modules/contrail/ha.py.patch'
|
||||
} ->
|
||||
exec {'ha.py.patch':
|
||||
command => '/usr/bin/patch /opt/contrail/utils/fabfile/tasks/ha.py /tmp/ha.py.patch',
|
||||
returns => [0,1] # Idempotent behaviour
|
||||
command => 'patch /opt/contrail/utils/fabfile/tasks/ha.py /tmp/ha.py.patch',
|
||||
} ->
|
||||
|
||||
file {'/tmp/keepalived_conf_template.py.patch':
|
||||
|
@ -32,8 +29,7 @@ class contrail::setup (
|
|||
source => 'puppet:///modules/contrail/keepalived_conf_template.py.patch'
|
||||
} ->
|
||||
exec {'keepalived_conf_template.py.patch':
|
||||
command => '/usr/bin/patch /usr/local/lib/python2.7/dist-packages/contrail_provisioning/common/templates/keepalived_conf_template.py /tmp/keepalived_conf_template.py.patch',
|
||||
returns => [0,1] # Idempotent behaviour
|
||||
command => "patch ${pythonpath}/contrail_provisioning/common/templates/keepalived_conf_template.py /tmp/keepalived_conf_template.py.patch",
|
||||
} ->
|
||||
|
||||
file {'/tmp/provision.py.patch':
|
||||
|
@ -41,8 +37,7 @@ class contrail::setup (
|
|||
source => 'puppet:///modules/contrail/provision.py.patch'
|
||||
} ->
|
||||
exec {'provision.py.patch':
|
||||
command => '/usr/bin/patch /opt/contrail/utils/fabfile/tasks/provision.py /tmp/provision.py.patch',
|
||||
returns => [0,1] # Idempotent behaviour
|
||||
command => 'patch /opt/contrail/utils/fabfile/tasks/provision.py /tmp/provision.py.patch',
|
||||
} ->
|
||||
|
||||
# Database installation
|
||||
|
@ -51,7 +46,7 @@ class contrail::setup (
|
|||
notify{"Waiting for cassandra nodes: ${contrail::contrail_node_num}":} ->
|
||||
exec {'wait_for_cassandra':
|
||||
provider => 'shell',
|
||||
command => "if [ `/usr/bin/nodetool status|grep ^UN|wc -l` -lt ${contrail::contrail_node_num} ]; then exit 1; fi",
|
||||
command => "if [ `nodetool status|grep ^UN|wc -l` -lt ${contrail::contrail_node_num} ]; then exit 1; fi",
|
||||
tries => 10, # wait for whole cluster is up: 10 tries every 30 seconds = 5 min
|
||||
try_sleep => 30,
|
||||
} ->
|
||||
|
@ -65,7 +60,7 @@ class contrail::setup (
|
|||
run_fabric { 'fixup_restart_haproxy_in_collector': } ->
|
||||
run_fabric { 'fix-service-tenant-name':
|
||||
hostgroup => 'control',
|
||||
command => "sed -i '49s/service/services/g' ${fixpath}",
|
||||
command => "sed -i '49s/service/services/g' ${pythonpath}/contrail_provisioning/config/quantum_in_keystone_setup.py",
|
||||
} ->
|
||||
# Setting up the components
|
||||
run_fabric { 'setup_cfgm': } ->
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
class contrail::vrouter_module () {
|
||||
package {['contrail-vrouter-source','dkms']:
|
||||
ensure => present,
|
||||
install_options => ['nogpgcheck'] # dkms package it not signed yet
|
||||
}
|
||||
->
|
||||
|
||||
file {'/tmp/vrouter.patch':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/contrail/vrouter.patch'
|
||||
}
|
||||
->
|
||||
|
||||
file {'/usr/src/vrouter-2.01': ensure => directory }
|
||||
->
|
||||
|
||||
exec {'unpack_src':
|
||||
command =>'tar -xf /usr/src/modules/contrail-vrouter/contrail-vrouter-2.01.tar.gz -C /usr/src/vrouter-2.01',
|
||||
}
|
||||
->
|
||||
|
||||
file {'/usr/src/vrouter-2.01/dkms.conf':
|
||||
ensure => file,
|
||||
source => 'puppet:///modules/contrail/dkms.conf'
|
||||
}
|
||||
->
|
||||
|
||||
exec {'patch_vrouter':
|
||||
command =>'patch /usr/src/vrouter-2.01/include/vr_compat.h /tmp/vrouter.patch',
|
||||
}
|
||||
->
|
||||
|
||||
exec {'build_install_module':
|
||||
command =>'dkms add vrouter/2.01 && dkms build vrouter/2.01 && dkms install vrouter/2.01',
|
||||
}
|
||||
}
|
|
@ -9,3 +9,7 @@ dev=<%= scope.function_get_private_ifname([]) %>
|
|||
vgw_subnet_ip=__VGW_SUBNET_IP__
|
||||
vgw_intf=__VGW_INTF_LIST__
|
||||
LOGFILE=--log-file=/var/log/contrail/vrouter.log
|
||||
<%- if scope.lookupvar('operatingsystem') == 'CentOS' then -%>
|
||||
VHOST_CFG=<%= '/etc/sysconfig/network-scripts/ifcfg-vhost0' %>
|
||||
kmod=/lib/modules/<%= scope.lookupvar('kernelrelease') %>/extra/vrouter.ko
|
||||
<%- end -%>
|
||||
|
|
|
@ -4,11 +4,11 @@
|
|||
# cinder and compute nodes
|
||||
#
|
||||
#####################################
|
||||
- role: ['primary-controller','controller']
|
||||
- role: '*'
|
||||
stage: pre_deployment
|
||||
type: puppet
|
||||
parameters:
|
||||
puppet_manifest: puppet/manifests/site-controller-pre.pp
|
||||
puppet_manifest: puppet/manifests/site-common-pre.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 720
|
||||
# In case of base-os Hiera must be deployed manually
|
||||
|
@ -60,7 +60,7 @@
|
|||
parameters:
|
||||
puppet_manifest: puppet/manifests/site-contrail-post1.pp
|
||||
puppet_modules: puppet/modules:/etc/puppet/modules
|
||||
timeout: 1440
|
||||
timeout: 3600
|
||||
- role: ['base-os']
|
||||
stage: post_deployment
|
||||
type: puppet
|
||||
|
|
Loading…
Reference in New Issue