Network Configuration
- Change fabric(租户网) network MTU larger than 1580 bytes
ifconfig em1 mtu 1580Compute Configuration
Follow the steps below to configure the OpenStack Compute nodes: 1.Remove openvswitch
rmmod openvswitch
2.安裝相關套件
yum install -y kmod-iovisor-1.0.6_32_g9c1753e-0.3.10.0_327.el7.x86_64.el7.x86_64.rpm
yum install -y plumgrid-lxc-5.2-0.b8.20160902.053233.x86_64.rpm
yum install -y plumgrid-pythonlib-5.2-0.b8.x86_64.rpm
- Install the PLUMgrid networking module
NOTE: 你也可以直接到Pypi下載plumgrid-2016.1.1.2.tar.gz 安裝。$ yum install -y python-pip $ pip install networking-plumgrid==2016.1.1.2
4.Edit /etc/libvirt/qemu.conf and uncomment the section cgroup_device_acl and match with the following lines:
cgroup_device_acl = [
"/dev/null", "/dev/full", "/dev/zero",
"/dev/random", "/dev/urandom", "/dev/net/tun",
"/dev/ptmx", "/dev/kvm", "/dev/kqemu",
"/dev/rtc","/dev/hpet", "/dev/vfio/vfio"
]
5.Edit /etc/nova/nova.conf and set the provider as below:
[DEFAULT]
libvirt_vif_type=ethernet
libvirt_cpu_mode=none
- Enable IPv4 forwarding:
sysctl -w net.ipv4.ip_forward=1 - Create the file, /etc/sudoers.d/ifc_ctl_sudoers and add the following content to it:
Modify permissions for /etc/sudoers.d/ifc_ctl_sudoersnova ALL=(root) NOPASSWD: /opt/pg/bin/ifc_ctl_pp *$ chown root:root /etc/sudoers.d/ifc_ctl_sudoers $ chmod 644 /etc/sudoers.d/ifc_ctl_sudoers
Configure PLUMgrid Services on Compute Node:
1.Create /var/lib/libvirt/filesystems/plumgrid-data/conf/pg/plumgrid.conf and add the following content:
plumgrid_ip=<Management IP address of Director>
plumgrid_port=8001
mgmt_dev=<Management Interface>
label=<HOSTNAME OF THE MACHINE>
plumgrid_rsync_port=2222
plumgrid_rest_addr=0.0.0.0:9180
fabric_mode=host
plumgrid_syslog_ng_ip=
plumgrid_syslog_ng_port=
plumgrid_monitor_interval=
start_plumgrid_iovisor=yes
start_plumgrid=`/opt/pg/scripts/pg_is_director.sh $plumgrid_ip`
location=
2.Add hostname of the Compute node to the file.
/var/lib/libvirt/filesystems/plumgrid-data/conf/etc/hostname.
NOTE: Create the file, if it does not exist. The hostname of the Compute node can be found by running the command
hostname -f
3.Create the file /var/lib/libvirt/filesystems/plumgrid-data/conf/etc/hosts and add the following content to it:
127.0.0.1 localhost
127.0.1.1 <FQDN> <Hostname>
4.Create the file, /var/lib/libvirt/filesystems/plumgrid-data/conf/pg/ifcs.conf and add the following content to it:
<fabric_interface e.g. ens3 > = fabric_core host
5.Restart the PLUMgrid service:
$ sudo service plumgrid start
重要注意: 请检查 /usr/share/nova/rootwrap/network.filters 存在与否. 假如存在,请检查底下内容:
# nova/virt/libvirt/vif.py: 'ifc_ctl', ...
ifc_ctl: CommandFilter, /opt/pg/bin/ifc_ctl, root
假如这行不在,/var/log/nova/nova-compute.log会出现 "Unauthorized command ifc_ctl" 错误讯息