Commit "vifs: replace 'ifconfig' usage with 'ip'" disables floating IPs for nova-docker containers created via NovaDocker driver

Bug #1429062 reported by Boris Derzhavets
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
nova-docker
Fix Committed
Undecided
Unassigned

Bug Description

I did build NovaDocker driver for following commits:-

a1e3e3e2d1032649397fb8281de7c7360ce0ad31("Fix build breaks by using instance.flavor where appropriate")
8760c73423dce9a47a6a67b32da016edd85cde86 ("Merge "Remove default cmd setting for docker image")
9d06520645f28d96ef905a709f8ff0c27842b58b ("vifs: replace 'ifconfig' usage with 'ip'")

$ git clone http://github.com/stackforge/nova-docker.git
$ cd nova-docker
$ git checkout commit-number

Applying patch prepared via Commit "Sync oslo imports to be in line with Nova trunk"
Commit 333656f4ad0e2c06f11eb8244bd6796110b9931d
to make NovaDocker driver loadable by stack.sh

$ sudo pip install .

First and second commits allowed me to work with floating IPs assigned to nova-docker instances been launched after stack.sh
completion. The third already didn't. My local.conf bellow :-

[[local|localrc]]
HOST_IP=192.169.142.55
ADMIN_PASSWORD=secret
MYSQL_PASSWORD=secret
RABBIT_PASSWORD=secret
SERVICE_PASSWORD=secret
FLOATING_RANGE=192.168.10.0/24
FLAT_INTERFACE=eth0
Q_FLOATING_ALLOCATION_POOL=start=192.168.10.150,end=192.168.10.254
PUBLIC_NETWORK_GATEWAY=192.168.10.15
SERVICE_TOKEN=super-secret-admin-token
VIRT_DRIVER=novadocker.virt.docker.DockerDriver

DEST=$HOME/stack
SERVICE_DIR=$DEST/status
DATA_DIR=$DEST/data
LOGFILE=$DEST/logs/stack.sh.log
LOGDIR=$DEST/logs

# The default fixed range (10.0.0.0/24) conflicted with an address
# range I was using locally.
FIXED_RANGE=10.254.1.0/24
NETWORK_GATEWAY=10.254.1.1

# Services
disable_service n-net
enable_service q-svc
enable_service q-agt
enable_service q-dhcp
enable_service q-l3
enable_service q-meta
enable_service horizon
disable_service tempest

# Introduce glance to docker images
[[post-config|$GLANCE_API_CONF]]
[DEFAULT]
container_formats=ami,ari,aki,bare,ovf,ova,docker

# Configure nova to use the nova-docker driver
[[post-config|$NOVA_CONF]]
[DEFAULT]
compute_driver=novadocker.virt.docker.DockerDriver

affects: devstack → nova-docker
summary: - Commit 9d06520645f28d96ef905a709f8ff0c27842b58b disables floating IPs
+ Commit "vifs: replace 'ifconfig' usage with 'ip'" disables floating IPs
for nova-docker containers created via NovaDocker driver
Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Workaround for issue :-

Install working NovaDocker driver (network alive, e.g. floating IPs) on Ubuntu 14.04.2
via ./stack.sh

$ git clone http://github.com/stackforge/nova-docker.git
$ cd nova-docker
$ git revert 9d06520645f28d96ef905a709f8ff0c27842b58b
$ sudo pip install .

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

This patch allows to build Nova Docker driver with network enabled ( floating IPs are working)

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Provided patch updates novadocker/virt/docker/vifs.py, actually adding to 9d06520645f28d96ef905a709f8ff0c27842b58b missing lines
+ utils.execute('ip', 'netns', 'exec', container_id, 'ip', 'link',
+ 'set', if_remote_name,'up',run_as_root=True)

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :

Patch in git format

Revision history for this message
Boris Derzhavets (bderzhavets) wrote :
Changed in nova-docker:
status: New → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.