ascii image


0010101000011111101001101010000010011000
1110101110110101011011111010010010001011
0001011100011101111001010011010010111110
0000010111101001100000110011101100001000
0011000000111010001111111000100110000001
1010110110000000000001011001000110001010
0101100010101100000100000010100100010101
0001011001011101100011000101110111101110
0110010100110100111101110100110011111101
0010111100110011010010110010101111011011
0100000000001001001011000010110100101001
1101000111100000110111011100110111000010
1111110001111111101101001010000111101100
0010110000100000111011000000101100010110
0101111000011100111010000000011111101111
0010010011110010011101001000110101000101
0000000001000100001111111100111010001111

Sunday 7 August 2016

DevStack, OpenVSwitch and LXC

While playing with DevStack inside a LXC container, i'd run into a a lot of issues where once the ./stack.sh reached the neutron stage it failed with odd errors.
2016-08-04 19:59:44.439 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.450 | ovs-ofctl: br-int is not a bridge or a socket
2016-08-04 19:59:44.462 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.473 | ovs-ofctl: br-int is not a bridge or a socket
2016-08-04 19:59:44.485 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.496 | ovs-ofctl: br-int is not a bridge or a socket
2016-08-04 19:59:44.508 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.519 | ovs-ofctl: br-int is not a bridge or a socket
and/or
mmod: ERROR: Module bridge is in use by: ebtable_broute
 * removing bridge module
Sat Aug  6 08:33:16 UTC 2016:start --system-id=random
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
modprobe: ERROR: could not insert 'openvswitch': Operation not permitted
 * Inserting openvswitch module
rmmod: ERROR: Module bridge is in use by: ebtable_broute
 * removing bridge module
 * Enabling remote OVSDB managers
These above errors come from the underlying host of LXC not having the right kernel modules loaded. So you are going to need to install a few things on the host: Open virtual switch and ethernet bridge tables (firewall)
sudo apt-get install ebtables openvswitch-common
Then update your /etc/modules to load things into the kernel
# openstack
bonding
q8021q
openvswitch
ebtables
Force them manually
sudo modprobe openvswitch
sudo modprobe ebtables
Now Devstack with Neutron installs fine. Yay!
My devstack local.conf - Mitaka, Heat and Neutron
[[local|localrc]]

DEST=/opt/stack

ADMIN_PASSWORD=MySecretDevPass
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

# fixed DHCP via  /etc/lxc/dnsmasq-hosts.conf via /etc/default/lxc-net on LXC host side
# https://askubuntu.com/questions/446831/how-to-let-built-in-dhcp-assign-a-static-ip-to-lxc-container-based-on-name-not
HOST_IP=10.0.3.10

# v3 KeyStone API only
ENABLE_IDENTITY_V2=False

PRIVATE_NETWORK_NAME=priv_net
PUBLIC_NETWORK_NAME=ext_net

#-----------------------------
# Devstack configurations
#-----------------------------
LOGDIR=$DEST/logs
SCREEN_LOGDIR=$LOGDIR
SCREEN_HARDSTATUS="%{= rw} %H %{= wk} %L=%-w%{= bw}%30L> %n%f %t*%{= wk}%+Lw%-17< %-=%{= gk} %y/%m/%d %c"
LOGFILE=$LOGDIR/devstack.log
LOGDAYS=1
LOG_COLOR=True
VERBOSE=True

#
# Modules
#

# Load the external LBaaS plugin.
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
enable_plugin octavia https://git.openstack.org/openstack/octavia


# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key

# Horizon
ENABLED_SERVICES+=,horizon

# Nova
ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch

# Glance
ENABLED_SERVICES+=,g-api,g-reg

#Enable heat services
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
#fedora images from F20 contain the heat-cfntools package which is required for some heat functionality.
#IMAGE_URLS+=","https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/releases/24/CloudImages/x86_64/images/Fedora-Cloud-Base-24-1.2.x86_64.qcow2"
# download from local server to speed up stacking
IMAGE_URLS+=","http://192.168.0.4/openstack/Fedora-Cloud-Base-24-1.2.x86_64.qcow2

# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta

# Cinder
ENABLED_SERVICES+=,c-api,c-vol,c-sch

# Enable LBaaS v2
##ENABLED_SERVICES+=,q-lbaasv2
##ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api # TODO octavia fails

DevStack, OpenVSwitch and LXC

While playing with DevStack inside a LXC container, i'd run into a a lot of issues where once the ./stack.sh reached the neutron stage it failed with odd errors.
2016-08-04 19:59:44.439 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.450 | ovs-ofctl: br-int is not a bridge or a socket
2016-08-04 19:59:44.462 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.473 | ovs-ofctl: br-int is not a bridge or a socket
2016-08-04 19:59:44.485 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.496 | ovs-ofctl: br-int is not a bridge or a socket
2016-08-04 19:59:44.508 | ovs-ofctl: br-ex is not a bridge or a socket
2016-08-04 19:59:44.519 | ovs-ofctl: br-int is not a bridge or a socket
and/or
mmod: ERROR: Module bridge is in use by: ebtable_broute
 * removing bridge module
Sat Aug  6 08:33:16 UTC 2016:start --system-id=random
 * Starting ovsdb-server
 * Configuring Open vSwitch system IDs
modprobe: ERROR: could not insert 'openvswitch': Operation not permitted
 * Inserting openvswitch module
rmmod: ERROR: Module bridge is in use by: ebtable_broute
 * removing bridge module
 * Enabling remote OVSDB managers
These above errors come from the underlying host of LXC not having the right kernel modules loaded. So you are going to need to install a few things on the host: Open virtual switch and ethernet bridge tables (firewall)
# apt-get install ebtables openvswitch-common
Then update your /etc/modules to load things into the kernel
# openstack
bonding
q8021q
openvswitch
ebtables
Force them manually
# modprobe openvswitch
# modprobe ebtables
Now Devstack with Neutron installs fine. Yay!
My devstack local.conf - Mitaka, Heat and Neutron
[[local|localrc]]

DEST=/opt/stack

ADMIN_PASSWORD=MySecretDevPass
DATABASE_PASSWORD=$ADMIN_PASSWORD
RABBIT_PASSWORD=$ADMIN_PASSWORD
SERVICE_PASSWORD=$ADMIN_PASSWORD

# fixed DHCP via  /etc/lxc/dnsmasq-hosts.conf via /etc/default/lxc-net on LXC host side
# https://askubuntu.com/questions/446831/how-to-let-built-in-dhcp-assign-a-static-ip-to-lxc-container-based-on-name-not
HOST_IP=10.0.3.10

# v3 KeyStone API only
ENABLE_IDENTITY_V2=False

PRIVATE_NETWORK_NAME=priv_net
PUBLIC_NETWORK_NAME=ext_net

#-----------------------------
# Devstack configurations
#-----------------------------
LOGDIR=$DEST/logs
SCREEN_LOGDIR=$LOGDIR
SCREEN_HARDSTATUS="%{= rw} %H %{= wk} %L=%-w%{= bw}%30L> %n%f %t*%{= wk}%+Lw%-17< %-=%{= gk} %y/%m/%d %c"
LOGFILE=$LOGDIR/devstack.log
LOGDAYS=1
LOG_COLOR=True
VERBOSE=True

#
# Modules
#

# Load the external LBaaS plugin.
enable_plugin neutron-lbaas https://git.openstack.org/openstack/neutron-lbaas
enable_plugin octavia https://git.openstack.org/openstack/octavia


# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key

# Horizon
ENABLED_SERVICES+=,horizon

# Nova
ENABLED_SERVICES+=,n-api,n-crt,n-cpu,n-cond,n-sch

# Glance
ENABLED_SERVICES+=,g-api,g-reg

#Enable heat services
ENABLED_SERVICES+=,heat,h-api,h-api-cfn,h-api-cw,h-eng
#fedora images from F20 contain the heat-cfntools package which is required for some heat functionality.
#IMAGE_URLS+=","https://www.mirrorservice.org/sites/dl.fedoraproject.org/pub/fedora/linux/releases/24/CloudImages/x86_64/images/Fedora-Cloud-Base-24-1.2.x86_64.qcow2"
# download from local server to speed up stacking
IMAGE_URLS+=","http://172.30.5.67/openstack/Fedora-Cloud-Base-24-1.2.x86_64.qcow2

# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta

# Cinder
ENABLED_SERVICES+=,c-api,c-vol,c-sch

# Enable LBaaS v2
##ENABLED_SERVICES+=,q-lbaasv2
##ENABLED_SERVICES+=,octavia,o-cw,o-hk,o-hm,o-api # TODO octavia fails