Plugin SR-IOV deprecation in favor of Fuel 9.0 implementation

* Using fuel-library new netconfig feautures to configure vfs for nics
  * Configuring pci_passthrough_whitelist using fuel-library manifests
  * IOMMU kernel parameters configuration is pushed with nailgun

Change-Id: I4af4bea8976b3468be6811ff8d43a316fc300dcd
This commit is contained in:
Pavel Basov 2016-04-11 23:22:12 -05:00 committed by Oleksandr Martsyniuk
parent fdb341dc62
commit 9043d56a18
10 changed files with 7 additions and 195 deletions

View File

@ -1,18 +0,0 @@
# Copyright 2016 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.
notice('MODULAR: contrail/contrail-compute-sriov.pp')
include contrail
class { 'contrail::compute::sriov': }

View File

@ -46,18 +46,7 @@ class contrail::compute::nova {
content => '',
}
}
if $contrail::compute_sriov_enabled {
$pci_wl = generate_passthrough_whitelist(
$contrail::sriov_physnet,
$contrail::compute_dpkd_on_vf,
$contrail::phys_dev,
$contrail::dpdk_vf_number
)
nova_config {
'DEFAULT/pci_passthrough_whitelist': value => $pci_wl;
}
}
Nova_config <||> ~>
service { 'nova-compute':
ensure => running,

View File

@ -35,7 +35,7 @@ class contrail::compute::override {
packages => $common_pkg,
}
if $contrail::compute_dpdk_enabled or $contrail::compute_sriov_enabled {
if $contrail::compute_dpdk_enabled {
# Create local dpdk repository
package { 'dpdk-depends-packages':
ensure => present,

View File

@ -1,47 +0,0 @@
# Copyright 2016 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.
class contrail::compute::sriov {
if $contrail::compute_sriov_enabled {
Kernel_parameter {
provider => 'grub2',
}
kernel_parameter { 'intel_iommu':
ensure => present,
value => 'on',
}
kernel_parameter { 'iommu':
ensure => present,
value => 'pt',
}
$sriov_hash = get_sriov_devices($contrail::compute_dpkd_on_vf, $contrail::phys_dev)
create_resources(contrail::rclocal_vfs, $sriov_hash)
file_line {"sriov ${title}":
ensure => absent,
path => '/etc/rc.local',
line => 'exit 0'
}
exec { 'reboot_require':
path => ['/bin', '/usr/bin'],
command => 'touch /tmp/contrail-reboot-require'
}
}
}

View File

@ -27,19 +27,6 @@ class contrail::controller::scheduler {
}
}
if $contrail::global_sriov_enabled {
ini_subsetting {'add_pci_passthrough_filter':
ensure => present,
section => 'DEFAULT',
key_val_separator => '=',
path => '/etc/nova/nova.conf',
setting => 'scheduler_default_filters',
subsetting => 'PciPassthroughFilter',
subsetting_separator => ',',
notify => Service['nova-scheduler'],
}
}
Ini_subsetting <||> ~>
service { 'nova-scheduler':
ensure => $ensure,

View File

@ -108,11 +108,6 @@ class contrail {
$hugepages_amount = pick($settings['hugepages_amount'],10)
$hugepages_number = floor($::memorysize_mb * $hugepages_amount / '100' / $hugepages_size)
# SRIOV settings
$global_sriov_enabled = $settings['contrail_global_sriov']
$compute_sriov_enabled = $global_sriov_enabled and 'sriov' in hiera_array('roles')
$sriov_physnet = $settings['sriov_physnet']
# DPDK settings
$global_dpdk_enabled = $settings['contrail_global_dpdk']
$dpdk_on_vf = $settings['dpdk_on_vf']
@ -130,7 +125,6 @@ class contrail {
$tor_agents_configurations = parseyaml($settings['tor_agents_configurations'])
}
# Custom mount point for contrail-db
$cassandra_path = '/var/lib/contrail_db'
@ -144,7 +138,7 @@ class contrail {
$patch_nova = pick($settings['patch_nova'], false)
$install_contrail_qemu_lv = pick($settings['install_contrail_qemu_lv'], false )
if $install_contrail_qemu_lv and ( $compute_dpdk_enabled or $compute_sriov_enabled ) {
if $install_contrail_qemu_lv and $compute_dpdk_enabled {
$libvirt_name = 'libvirt-bin'
} else {
$libvirt_name = 'libvirtd'

View File

@ -1,40 +0,0 @@
# Copyright 2016 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.
define contrail::rclocal_vfs (
$totalvfs,
$numvfs,
$physnet = $::contrail::sriov_physnet,
$network_device = $title,
)
{
if (versioncmp($::libnl_version, '3.2.24-2') >= 0) {
$final_vf = $totalvfs
} else {
$final_vf = min(30, $totalvfs)
}
$interface_config = join(["auto ${network_device}",
"iface ${network_device} inet manual",
"post-up echo ${final_vf} > /sys/class/net/${network_device}/device/sriov_numvfs"
],"\n")
file {"/etc/network/interfaces.d/ifcfg-${network_device}":
ensure => file,
content => $interface_config,
}
}

View File

@ -151,18 +151,6 @@
strategy:
type: parallel
#
# Compute sriov feature
- id: sriov
type: group
role: [sriov]
tasks: []
required_for: [deploy_end]
requires: [deploy_start]
parameters:
strategy:
type: parallel
# Tasks
#############
#1. Install Contrail utils, java
@ -508,6 +496,8 @@
roles: '*'
type: skipped
version: 2.0.0
- id: openstack-network-agents-sriov
type: skipped
# Skip default fuel networks and routers
- id: openstack-network-networks
roles: '*'
@ -776,18 +766,6 @@
puppet_modules: puppet/modules:/etc/puppet/modules
timeout: 720
# Configures sriov
#- id: contrail-compute-sriov
# type: puppet
# version: 2.0.0
# groups: [compute]
# required_for: [post_deployment_end, contrail-compute-provision]
# requires: [post_deployment_start]
# parameters:
# puppet_manifest: puppet/manifests/contrail-compute-sriov.pp
# puppet_modules: puppet/modules:/etc/puppet/modules
# timeout: 720
- id: contrail-compute-provision
type: puppet
version: 2.0.0
@ -873,6 +851,9 @@
cmd: if [ -f /tmp/contrail-reboot-require ]; then nohup /sbin/shutdown -r +1 &> /dev/null & fi
timeout: 720
- id: sriov_iommu_check
type: skipped
- id: sahara
type: skipped

View File

@ -126,27 +126,6 @@ attributes:
restrictions:
- condition: "not (settings:contrail.metadata.enabled == true and settings:contrail.contrail_global_dpdk.value == true)"
action: "hide"
contrail_global_sriov:
value: false
label: "Enable SRIOV feature for this environment."
description: >
Enable this option to unlock the SRIOV feature.
NOTE: You still have to assign SRIOV-role to compute nodes to enable SRIOV on them.
weight: 210
type: "checkbox"
sriov_physnet:
value: 'physnet1'
label: 'Provide name for physical net'
description: >
This physical network will be provided over SRIOV capable interfaces.
weight: 220
type: 'text'
regex:
source: '^\w+$'
error: "Name has to be alphanumeric"
restrictions:
- action: hide
condition: not (settings:contrail.contrail_global_sriov.value == true)
enable_tor_agents:
value: false
label: "Enable ToR agents (experimental)"

View File

@ -122,16 +122,3 @@ dpdk:
- condition: "settings:contrail.contrail_global_dpdk.value == false"
action: hide
sriov:
name: SRIOV compute
description: >
Enable SRIOV feature on compute node. NOTE: Use this role only together with Compute role to enable SRIOV feature in other cases it will not have any effect.
has_primary: false
public_ip_required: false
weight: 100
conflicts:
- controller
- contrail-db
- contrail-config
- contrail-control
- contrail-analytics