[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 12/15] docker: Don't enable networking as a side-effe
From: |
Fam Zheng |
Subject: |
[Qemu-devel] [PULL 12/15] docker: Don't enable networking as a side-effect of DEBUG=1 |
Date: |
Mon, 17 Jul 2017 11:48:22 +0800 |
From: "Daniel P. Berrange" <address@hidden>
When trying to debug problems with tests it is natural to set
DEBUG=1 when starting the docker environment. Unfortunately
this has a side-effect of enabling an eth0 network interface
in the container, which changes the operating environment of
the test suite. IOW tests with fail may suddenly start
working again if DEBUG=1 is set, due to changed network setup.
Add a separate NETWORK variable to allow enablement of
networking separately from DEBUG=1. This can be used in two
ways. To enable the default docker network backend
make address@hidden NETWORK=1
while to enable a specific network backend, eg join the network
associated with the container 'wibble':
make address@hidden NETWORK=container:wibble
Signed-off-by: Daniel P. Berrange <address@hidden>
Message-Id: <address@hidden>
[Drop the superfluous second $(subst ...). - Fam]
Signed-off-by: Fam Zheng <address@hidden>
---
tests/docker/Makefile.include | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include
index 037cb9e..012a2fc 100644
--- a/tests/docker/Makefile.include
+++ b/tests/docker/Makefile.include
@@ -106,6 +106,8 @@ docker:
@echo ' (default is 1)'
@echo ' DEBUG=1 Stop and drop to shell in the created
container'
@echo ' before running the command.'
+ @echo ' NETWORK=1 Enable virtual network interface with
default backend.'
+ @echo ' NETWORK=$BACKEND Enable virtual network interface with
$BACKEND.'
@echo ' NOUSER Define to disable adding current user
to containers passwd.'
@echo ' NOCACHE=1 Ignore cache when build images.'
@echo ' EXECUTABLE=<path> Include executable in image.'
@@ -132,7 +134,8 @@ docker-run: docker-qemu-src
$(SRC_PATH)/tests/docker/docker.py run \
$(if $(NOUSER),,-u $(shell id -u)) -t \
$(if $V,,--rm) \
- $(if $(DEBUG),-i,--net=none) \
+ $(if $(DEBUG),-i,) \
+ $(if $(NETWORK),$(if $(subst
$(NETWORK),,1),--net=$(NETWORK)),--net=none) \
-e TARGET_LIST=$(TARGET_LIST) \
-e EXTRA_CONFIGURE_OPTS="$(EXTRA_CONFIGURE_OPTS)" \
-e V=$V -e J=$J -e DEBUG=$(DEBUG) \
--
2.9.4
- [Qemu-devel] [PULL 00/15] Block and testing patches, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 01/15] qcow2: call CoQueue APIs under CoMutex, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 02/15] coroutine-lock: add qemu_co_rwlock_downgrade and qemu_co_rwlock_upgrade, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 03/15] vdi: make it thread-safe, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 04/15] vpc: make it thread-safe, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 05/15] vvfat: make it thread-safe, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 06/15] qed: move tail of qed_aio_write_main to qed_aio_write_{cow, alloc}, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 08/15] qed: introduce bdrv_qed_init_state, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 07/15] block: invoke .bdrv_drain callback in coroutine context and from AioContext, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 09/15] qed: protect table cache with CoMutex, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 12/15] docker: Don't enable networking as a side-effect of DEBUG=1,
Fam Zheng <=
- [Qemu-devel] [PULL 13/15] docker.py: Drop infile parameter, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 11/15] ssh: support I/O from any AioContext, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 10/15] sheepdog: add queue_lock, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 14/15] docker.py: Improve subprocess exit code handling, Fam Zheng, 2017/07/16
- [Qemu-devel] [PULL 15/15] travis: add no-TCG build, Fam Zheng, 2017/07/16
- Re: [Qemu-devel] [PULL 00/15] Block and testing patches, Peter Maydell, 2017/07/17