summaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-11-28 18:11:20 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-12-03 13:45:44 +0000
commitc83587638ca4b7885bd002f0f6ddddd1f18d9a04 (patch)
treeb028707766353b6ec0f434683e4d2fed4e3a177d /mcp
parentb5cad334243a0e258ba01d83c6884daee92503f5 (diff)
[docker] compose: Switch ip_range to ipv4_address
Explicitly set the ipv4_address for each network instead of relying on ip_range allocation, which seems to fail / not be picked up. While at it, use docker-compose 1.22 or newer to bypass slow Docker network creation with 'macvlan' driver [1]. [1] https://github.com/docker/compose/issues/5248 Change-Id: Ic31851522576ebb2407d869b7c3ed7bd06951922 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 904183e275ca6b2aa6cad11a330fc060d5379b3e)
Diffstat (limited to 'mcp')
-rw-r--r--mcp/scripts/docker-compose/docker-compose.yaml.j212
-rw-r--r--mcp/scripts/lib_jump_common.sh4
-rw-r--r--mcp/scripts/lib_jump_deploy.sh4
3 files changed, 11 insertions, 9 deletions
diff --git a/mcp/scripts/docker-compose/docker-compose.yaml.j2 b/mcp/scripts/docker-compose/docker-compose.yaml.j2
index 8cd9d5deb..891d55938 100644
--- a/mcp/scripts/docker-compose/docker-compose.yaml.j2
+++ b/mcp/scripts/docker-compose/docker-compose.yaml.j2
@@ -15,9 +15,12 @@ services:
container_name: "fuel"
image: "opnfv/fuel:saltmaster-reclass-{{ conf.MCP_DOCKER_TAG }}"
networks:
- - mcpcontrol
- - pxebr
- - mgmt
+ mcpcontrol:
+ ipv4_address: {{ conf.SALT_MASTER }}
+ pxebr:
+ ipv4_address: {{ nm.net_admin | ipnet_hostaddr(nm.start_ip[nm.net_admin] + nm.net_admin_hosts.index('opnfv_infra_config_pxe_admin_address') +1) }}
+ mgmt:
+ ipv4_address: {{ nm.net_mgmt | ipnet_hostaddr(nm.start_ip[nm.net_mgmt] + nm.net_mgmt_hosts.index('opnfv_infra_config_address') +1) }}
volumes:
- /run/dbus/system_bus_socket:/run/dbus/system_bus_socket:ro
- {{ conf.MCP_REPO_ROOT_PATH }}:/root/fuel
@@ -42,7 +45,6 @@ networks:
config:
- subnet: {{ net_mcpcontrol }}
gateway: {{ net_mcpcontrol | ipnet_hostaddr(1) }}
- ip_range: {{ [conf.SALT_MASTER, conf.MCPCONTROL_PREFIX] | join("/") }}
pxebr:
driver: macvlan
driver_opts:
@@ -50,7 +52,6 @@ networks:
ipam:
config:
- subnet: {{ nm.net_admin }}
- ip_range: {{ [nm.net_admin | ipnet_hostaddr(nm.start_ip[nm.net_admin] + nm.net_admin_hosts.index('opnfv_infra_config_pxe_admin_address') +1), nm.net_admin.split("/")[-1]] | join("/") }}
mgmt:
driver: macvlan
driver_opts:
@@ -62,4 +63,3 @@ networks:
ipam:
config:
- subnet: {{ nm.net_mgmt }}
- ip_range: {{ [nm.net_mgmt | ipnet_hostaddr(nm.start_ip[nm.net_mgmt] + nm.net_mgmt_hosts.index('opnfv_infra_config_address') +1), nm.net_mgmt.split("/")[-1]] | join("/") }}
diff --git a/mcp/scripts/lib_jump_common.sh b/mcp/scripts/lib_jump_common.sh
index 02ada44e9..5b09c29ab 100644
--- a/mcp/scripts/lib_jump_common.sh
+++ b/mcp/scripts/lib_jump_common.sh
@@ -114,7 +114,9 @@ function docker_install {
fi
fi
# Distro-provided docker-compose might be simply broken (Ubuntu 16.04, CentOS 7)
- if ! docker-compose --version > /dev/null 2>&1; then
+ if ! docker-compose --version > /dev/null 2>&1 || \
+ [ "$(docker-compose version --short | tr -d '.')" -lt 1220 ] && \
+ [ "$(uname -m)" = 'x86_64' ]; then
COMPOSE_BIN="${image_dir}/docker-compose"
COMPOSE_VERSION='1.22.0'
notify_n "[WARN] Using docker-compose ${COMPOSE_VERSION} in ${COMPOSE_BIN}" 3
diff --git a/mcp/scripts/lib_jump_deploy.sh b/mcp/scripts/lib_jump_deploy.sh
index 634a933bc..561f2c44c 100644
--- a/mcp/scripts/lib_jump_deploy.sh
+++ b/mcp/scripts/lib_jump_deploy.sh
@@ -412,7 +412,7 @@ function prepare_containers {
local image_dir=$1
[ -n "${image_dir}" ] || exit 1
[ -n "${MCP_REPO_ROOT_PATH}" ] || exit 1
- docker-compose --version > /dev/null 2>&1 || COMPOSE_PREFIX="${image_dir}/"
+ [ ! -e "${image_dir}/docker-compose" ] || COMPOSE_PREFIX="${image_dir}/"
"${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml down
if [[ ! "${MCP_DOCKER_TAG}" =~ 'verify' ]]; then
@@ -426,7 +426,7 @@ function prepare_containers {
function start_containers {
local image_dir=$1
[ -n "${image_dir}" ] || exit 1
- docker-compose --version > /dev/null 2>&1 || COMPOSE_PREFIX="${image_dir}/"
+ [ ! -e "${image_dir}/docker-compose" ] || COMPOSE_PREFIX="${image_dir}/"
"${COMPOSE_PREFIX}docker-compose" -f docker-compose/docker-compose.yaml up -d
}
cause in NFV scenerio, we want to inject the interrupt to the guest asap. A threaded IRQ introduces schedule latency. However, this change is like a quick and dirty and may bring potential deadlock, because the spinlock_irqsave() from eventfd_signal() is preemptible in RT kernel, which should not be held on IRQ context. But changing it to be raw_spinlock is bad because it will increase the latency a lot if the eventfd is accessed by user space. The deadlock should be ok since for vfio MSI handler is purely kernel story and the lock is a per-eventfd lock and seems no one else is using it for the vfio msi scenario. Upstream status: discussion https://lkml.org/lkml/2015/10/26/764 Change-Id: Ie4405a5b568aa75ca8c3481eeeea228a486b9794 2015-11-20Force tick interrupt and get rid of softirq magicYunhong Jiang2-44/+31 This is a backporting from upstream linux, please refer to http://marc.info/?t=142904577100001&r=1&w=2 for more information, the corresponding kernel commit is 0ff53d09642204c64842 (tick: sched: Force tick interrupt and get rid of softirq magic). The purpose of this patch is, if a tick_sched interrupt is missed, don't try to raise softirq, instead, we can simply trigger the timer interrupt. The reason is, softirq requires context switch and has much higher overhead than interrupt. Upstream status: backport 0ff53d09642204c64842 Change-Id: I70131fb85189d15972fcaa1a2a2fa190270787f9 Back-port-by: Yunhong Jiang <yunhong.jiang@linux.intel.com> 2015-11-20Add configuration to support OVS kernel moduleYunhong Jiang1-7/+13 OVS kernel module is important for NFV. The existed kernel config misses several important kernel configuration, mostly for VxLAN, which is required by the OVS kernel module. Also add the OVS as a module, so that user can use it if needed, or replace it when use the OPNFV patched OVS module. Change-Id: I032f84e0468fc2614557274a50f30d502d39cc52 Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> 2015-11-17Fix systemd boot.José Pekkarinen1-1/+1 Change-Id: I3e91161abafc62554e793e4851df639c099421e7 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com> 2015-11-17Build vfio-pci as a module, as dpdk tools expect it to be.José Pekkarinen1-2/+2 Change-Id: I4c0fe67609fc74fc60e6a2c99d448fd47a6d2a86 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com> 2015-11-17Update the kernel config to match the kernel version shipped.José Pekkarinen1-1/+2 Change-Id: Icd51e1625a57867b2f79cb2b2d1ab21b23bd80e0 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com> 2015-11-03Merge "Add the opnfv kernel config file"Don Dugger1-0/+3741 2015-10-29Add the opnfv kernel config fileYunhong Jiang1-0/+3741 Kernel config is important for RT linux. A specific config file is provided for the opnfv project to build the reference config options. Currently this config file is assumed to be used for both host and guest kernel. We may split them in future. Change-Id: Ia9ebe0bc002518bb603af8901c6f31531d2f0cee Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com> 2015-10-19These changes are a raw update to a vanilla kernel 4.1.10, with theJosé Pekkarinen343-1508/+3092 recently announced rt patch patch-4.1.10-rt10.patch. No further changes needed. Change-Id: I9a0cf084498133b10771e744b6da4b29dff706ba Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com> 2015-10-09Kernel bump from 4.1.3-rt to 4.1.7-rt.José Pekkarinen628-4568/+6245 These changes brings a vanilla kernel from kernel.org, and the patch applied for rt is patch-4.1.7-rt8.patch. No further changes needed. Change-Id: Id8dd03c2ddd971e4d1d69b905f3069737053b700 Signed-off-by: José Pekkarinen <jose.pekkarinen@nokia.com> 2015-08-04Add the rt linux 4.1.3-rt3 as baseYunhong Jiang