diff --git a/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 b/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 index f57f5fd40..6d2d8ed53 100644 --- a/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 +++ b/deployment_scripts/puppet/modules/contrail/files/contrail-pin-100 @@ -1,3 +1,3 @@ Package: * Pin: release l=contrail -Pin-Priority: 1100 +Pin-Priority: 1200 diff --git a/deployment_scripts/puppet/modules/contrail/files/fixup-vrouter.init b/deployment_scripts/puppet/modules/contrail/files/fixup-vrouter.init new file mode 100644 index 000000000..50e72fa9e --- /dev/null +++ b/deployment_scripts/puppet/modules/contrail/files/fixup-vrouter.init @@ -0,0 +1,39 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: fixup-vrouter +# Required-Start: $network contrail-vrouter-agent +# Required-Stop: $network contrail-vrouter-agent +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: fixup-vrouter +# Description: This file starts opencontrail vrouter fixup for kernels > 3.13.0-62 +# +### END INIT INFO + +# Copyright 2015 Mirantis, Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); you may +# not use this file except in compliance with the License. You may obtain +# a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +# License for the specific language governing permissions and limitations +# under the License. + +case "$1" in + start) + sleep 10 + ifconfig pkt2 up || exit 0 + ;; + stop) + exit 0 + ;; + *) + echo "Usage: fixup-vrouter {start|stop}" >&2 + exit 3 + ;; +esac diff --git a/deployment_scripts/puppet/modules/contrail/manifests/config.pp b/deployment_scripts/puppet/modules/contrail/manifests/config.pp index 15d7f0b67..508724529 100644 --- a/deployment_scripts/puppet/modules/contrail/manifests/config.pp +++ b/deployment_scripts/puppet/modules/contrail/manifests/config.pp @@ -67,6 +67,17 @@ class contrail::config ( $node_role ) { content => template('contrail/contrail-vrouter-nodemgr.conf.erb'), } + file {'/etc/init.d/fixup-vrouter': + ensure => present, + mode => '0755', + owner => 'root', + group => 'root', + source => 'puppet:///modules/contrail/fixup-vrouter.init', + } -> + service {'fixup-vrouter': + enable => true, + } + } } } diff --git a/tasks.yaml b/tasks.yaml index fe1e2fb5f..b1a48d425 100644 --- a/tasks.yaml +++ b/tasks.yaml @@ -36,10 +36,11 @@ # Config default network, first of all - role: ['base-os'] stage: pre_deployment - type: shell + type: puppet parameters: - cmd: if hiera user_node_name | egrep '^contrail-[0-9]'; then puppet apply /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp; fi - timeout: 720 + puppet_modules: /etc/puppet/modules + puppet_manifest: /etc/puppet/modules/osnailyfacter/modular/netconfig/netconfig.pp + timeout: 3600 - role: ['base-os'] stage: pre_deployment type: puppet