summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2020-08-31 11:19:02 -0500
committerGitHub <noreply@github.com>2020-08-31 11:19:02 -0500
commit2078f5ceffa2918d6797cb96e14d76c38735eebd (patch)
tree9fce2b6bd8eac3eaabf8b5972b61062e2144c3d1
parent32f1516d2ae1fa422b8b4966a6c61cbef1729aa2 (diff)
parent2fd5898643d075857ef0bdb4e24db3c7fdd79863 (diff)
downloadvyos-build-2078f5ceffa2918d6797cb96e14d76c38735eebd.tar.gz
vyos-build-2078f5ceffa2918d6797cb96e14d76c38735eebd.zip
Merge pull request #120 from jestabro/vyos-configd
configd: T2582: support for vyos config script daemon configd: T2582: add option to run testsuite with daemon (default off) configd: T2582: enable vyos-configd.service configd: T2582: add build dependency
-rw-r--r--Makefile9
-rwxr-xr-xdata/live-build-config/hooks/live/18-enable-disable_services.chroot1
-rw-r--r--docker/Dockerfile4
-rwxr-xr-xscripts/check-qemu-install13
4 files changed, 27 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 60376e09..92cd08ec 100644
--- a/Makefile
+++ b/Makefile
@@ -230,6 +230,15 @@ test:
fi
scripts/check-qemu-install --debug build/live-image-amd64.hybrid.iso
+.PHONY: testd
+.ONESHELL:
+testd:
+ if [ ! -f build/live-image-amd64.hybrid.iso ]; then
+ echo "Could not find build/live-image-amd64.hybrid.iso"
+ exit 1
+ fi
+ scripts/check-qemu-install --debug --configd build/live-image-amd64.hybrid.iso
+
.PHONY: clean
.ONESHELL:
clean:
diff --git a/data/live-build-config/hooks/live/18-enable-disable_services.chroot b/data/live-build-config/hooks/live/18-enable-disable_services.chroot
index 0ac9215f..92312276 100755
--- a/data/live-build-config/hooks/live/18-enable-disable_services.chroot
+++ b/data/live-build-config/hooks/live/18-enable-disable_services.chroot
@@ -52,3 +52,4 @@ echo I: Enabling services
systemctl enable ssh-session-cleanup.service
systemctl enable vyos-hostsd.service
systemctl enable acpid.service
+systemctl enable vyos-configd.service
diff --git a/docker/Dockerfile b/docker/Dockerfile
index c892b64b..d5f1543a 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -361,6 +361,10 @@ RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y \
libaudit-dev
+# Packages needed for vyos-configd
+RUN apt-get update && apt-get install -y \
+ libzmq3-dev
+
# Install packer
RUN if dpkg-architecture -ii386 || dpkg-architecture -iamd64; then \
export LATEST="$(curl -s https://checkpoint-api.hashicorp.com/v1/check/packer | \
diff --git a/scripts/check-qemu-install b/scripts/check-qemu-install
index b79ed03f..3d182dbe 100755
--- a/scripts/check-qemu-install
+++ b/scripts/check-qemu-install
@@ -67,6 +67,9 @@ parser.add_argument('--logfile', help='Log to file')
parser.add_argument('--no-kvm', help='Disable use of kvm',
action='store_true',
default=False)
+parser.add_argument('--configd', help='Execute testsuite with config daemon',
+ action='store_true',
+ default=False)
args = parser.parse_args()
@@ -277,6 +280,16 @@ try:
time.sleep(20)
#################################################
+ # Start/stop config daemon
+ #################################################
+ if args.configd:
+ c.sendline('sudo systemctl start vyos-configd.service &> /dev/null')
+ c.expect(r'vyos@vyos:~\$')
+ else:
+ c.sendline('sudo systemctl stop vyos-configd.service &> /dev/null')
+ c.expect(r'vyos@vyos:~\$')
+
+ #################################################
# Basic Configmode/Opmode switch
#################################################
log.info("Basic CLI configuration mode test")