Commit b672ae48 authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

Merge remote-tracking branch 'origin/zope4py2' into zope4py3

parents 023e1257 b256529d
......@@ -6,7 +6,7 @@ recipe = slapos.recipe.build:gitclone
repository = https://lab.nexedi.com/nexedi/babeld.git
branch = master
git-executable = ${git:location}/bin/git
revision = hmac-nxd2
revision = hmac-nxd3
[babeld]
recipe = slapos.recipe.cmmi
......
From 90950c10cf6bfcba777a5b22cdcd3b54b4043d35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Tue, 20 Sep 2022 23:10:16 +0900
Subject: [PATCH] slapos: don't try to install system startup script
in slapos context we don't write to system directories when installing
packages
---
src/CMakeLists.txt | 21 ---------------------
1 file changed, 21 deletions(-)
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 630f875bf..388c72ab1 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -477,27 +477,6 @@ if(FLB_BINARY)
DESTINATION "${FLB_INSTALL_BINDIR}")
endif()
- # Detect init system, install upstart, systemd or init.d script
- if(IS_DIRECTORY /lib/systemd/system)
- set(FLB_SYSTEMD_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.service")
- configure_file(
- "${PROJECT_SOURCE_DIR}/init/systemd.in"
- ${FLB_SYSTEMD_SCRIPT}
- )
- install(FILES ${FLB_SYSTEMD_SCRIPT} COMPONENT binary DESTINATION /lib/systemd/system)
- install(DIRECTORY DESTINATION ${FLB_INSTALL_CONFDIR} COMPONENT binary)
- elseif(IS_DIRECTORY /usr/share/upstart)
- set(FLB_UPSTART_SCRIPT "${PROJECT_SOURCE_DIR}/init/${FLB_OUT_NAME}.conf")
- configure_file(
- "${PROJECT_SOURCE_DIR}/init/upstart.in"
- ${FLB_UPSTART_SCRIPT}
- )
- install(FILES ${FLB_UPSTART_SCRIPT} COMPONENT binary DESTINATION /etc/init)
- install(DIRECTORY DESTINATION COMPONENT binary ${FLB_INSTALL_CONFDIR})
- else()
- # FIXME: should we support Sysv init script ?
- endif()
-
if(FLB_SYSTEM_WINDOWS)
install(FILES
"${PROJECT_SOURCE_DIR}/conf/fluent-bit-win32.conf"
--
2.37.0
[buildout]
extends =
../cmake/buildout.cfg
../bison/buildout.cfg
../flex/buildout.cfg
../patch/buildout.cfg
[fluent-bit]
recipe = slapos.recipe.cmmi
url = https://github.com/fluent/fluent-bit/archive/refs/tags/v1.9.8.tar.gz
md5sum = a0973b739f1d1f0daaa503b077760cd7
configure-command =
${cmake:location}/bin/cmake
configure-options =
-DFLB_CONFIG_YAML=Off .
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
environment =
PATH=${bison:location}/bin:${flex:location}/bin:%(PATH)s
patch-options = -p1
patches =
${:_profile_base_location_}/0001-slapos-don-t-try-to-install-system-startup-script.patch#c071d1aefe0adbc6c96bbdf92d9dbb29
patch-binary = ${patch:location}/bin/patch
......@@ -25,6 +25,7 @@ configure-options =
--disable-fam
--disable-xattr
--disable-man
--with-python=${buildout:executable}
environment =
PATH=${gettext:location}/bin:${patch:location}/bin:${perl:location}/bin:${xz-utils:location}/bin:%(PATH)s
CPPFLAGS=-I${gettext:location}/include -I${zlib:location}/include
......@@ -33,8 +34,3 @@ environment =
LIBFFI_LIBS= -L${libffi:location}/lib -Wl,-rpath=${libffi:location}/lib -lffi
PCRE_CFLAGS=-I${pcre:location}/include
PCRE_LIBS=-L${pcre:location}/lib -Wl,-rpath=${pcre:location}/lib -lpcre
post-install = rm %(location)s/bin/gtester-report
[x86-cygwin-glib]
patches =
${:_profile_base_location_}/cygwin-glib-2.28.8-src.patch
--- glib/gstrfuncs.c~ 2012-12-30 14:51:30.000000000 +0800
+++ glib/gstrfuncs.c 2012-12-30 14:51:50.203125000 +0800
@@ -1423,7 +1423,7 @@
#ifdef HAVE_STRSIGNAL
const char *msg_locale;
-#if defined(G_OS_BEOS) || defined(G_WITH_CYGWIN)
+#if defined(G_OS_BEOS)
extern const char *strsignal(int);
#else
/* this is declared differently (const) in string.h on BeOS */
......@@ -14,7 +14,6 @@ extends =
../libtool/buildout.cfg
../m4/buildout.cfg
../perl/buildout.cfg
../python-2.7/buildout.cfg
../pkgconfig/buildout.cfg
../xorg/buildout.cfg
../icu/buildout.cfg
......@@ -82,7 +81,7 @@ configure-options =
--disable-static
--disable-gtk-doc-html
environment =
PATH=${python2.7:location}/bin:${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PATH=${glib:location}/bin:${freetype:location}/bin:${pkgconfig:location}/bin:${xz-utils:location}/bin:%(PATH)s
PKG_CONFIG_PATH=${:pkg_config_depends}
CPPFLAGS=-I${bzip2:location}/include -I${zlib:location}/include
LDFLAGS=-L${bzip2:location}/lib -Wl,-rpath=${bzip2:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -L${harfbuzz:location}/lib -Wl,-rpath=${harfbuzz:location}/lib
......
......@@ -111,6 +111,11 @@ environment =
AR="${:llvm-toolchain}/llvm-ar"
NM="${:llvm-toolchain}/llvm-nm"
# Fix permission for group, slapuserXX should be able to access subfolders
# in headless-chromium location.
post-install =
find ${:fake-location} -type d -exec chmod g+xr {} \;
# Expose devtools frontend location.
devtools-frontend = ${:fake-location}/gen/third_party/devtools-frontend/src/front_end
......
[buildout]
extends =
../autoconf/buildout.cfg
../automake/buildout.cfg
../pkgconfig/buildout.cfg
parts =
iperf3
[iperf3]
recipe = slapos.recipe.cmmi
shared = true
url = https://github.com/esnet/iperf/archive/3.11.tar.gz
md5sum = 28ecd352b3433e5d46b669c4289ad544
environment =
PATH=${pkgconfig:location}/bin:${autoconf:location}/bin:${automake:location}/bin:%(PATH)s
......@@ -9,6 +9,3 @@ url = http://ftp.rpm.org/popt/releases/popt-1.x/popt-1.18.tar.gz
md5sum = 450f2f636e6a3aa527de803d0ae76c5a
configure-options =
--disable-static
[x86-cygwin-popt]
patches = ${:_profile_base_location_}/cygwin-popt-1.16-src.patch
......@@ -47,6 +47,13 @@ part = python2.7
[open62541]
# Beremiz need it to be in folder parts/open62541
# as Beremiz search for open62541 to BEREMIZ_PATH/../open62541
configure-options =
-DBUILD_SHARED_LIBS=OFF
-DCMAKE_BUILD_TYPE=Release
-DCMAKE_INSTALL_PREFIX=@@LOCATION@@
-DUA_ENABLE_PUBSUB=ON
-DUA_ENABLE_SUBSCRIPTIONS=ON
-DUA_NAMESPACE_ZERO=REDUCED
shared = false
post-install =
mkdir -p @@LOCATION@@/build/bin
......
......@@ -30,7 +30,7 @@ md5sum = e7209d9c66fd30e1fa950d2d07957b95
[profile-slave-list]
_update_hash_filename_ = templates/apache-custom-slave-list.cfg.in
md5sum = 8028eff10acbc6e3415a50ffe534d424
md5sum = 421e2de58c0d5c41a00cd5d32355fc70
[profile-replicate-publish-slave-information]
_update_hash_filename_ = templates/replicate-publish-slave-information.cfg.in
......@@ -102,7 +102,7 @@ md5sum = 1c866272ec0ea0c161f0c0d80cb6e584
[profile-kedifa]
filename = instance-kedifa.cfg.in
md5sum = b757e0409ec3e70679a8fc4aab4a065f
md5sum = 40fe46a1fe653406b18ca46351d195b8
[template-backend-haproxy-rsyslogd-conf]
_update_hash_filename_ = templates/backend-haproxy-rsyslogd.conf.in
......
......@@ -280,9 +280,19 @@ command =
[ ! -f ${:file} ] && {{ software_parameter_dict['curl'] }}/bin/curl -s -g -X POST https://[${kedifa-config:ip}]:${kedifa-config:port}/reserve-id --cert ${kedifa-config:certificate} --cacert ${kedifa-config:ca-certificate} > ${:file}.tmp && mv ${:file}.tmp ${:file}
update-command = ${:command}
[auth-random]
[cleanup-auth-ready]
# Cleans auth-ready as some slaves can appear and be configured, but then
# become removed before auth-random kicks in
recipe = slapos.recipe.build
directory = ${directory:auth-ready}
init =
import os
if os.path.isdir(options['directory']):
os.system("find %s -type f -name *-auth-random -size 0 -delete" % (options['directory'],))
[auth-random]
recipe = slapos.recipe.build
directory = ${cleanup-auth-ready:directory}
auth-ready = ${directory:auth-ready}/${:_buildout_section_name_}
init =
import os
......
......@@ -223,7 +223,6 @@ context =
{# websocket style needs http 1.1 max #}
{%- do slave_instance.__setitem__('enable_h2', False) %}
{%- endif %}
{%- do slave_instance.__setitem__('default-path', slave_instance.get('default-path', '').strip('/') | urlencode) %}
[slave-log-directory-dict]
{{slave_reference}} = {{ slave_log_folder }}
......
......@@ -113,7 +113,7 @@
"monitor-username": "admin",
"plain_http_port": "11080",
"port": "11443",
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
},
"full_address_list": [],
"instance_title": "caddy-frontend-1",
......
......@@ -115,7 +115,7 @@
"monitor-username": "admin",
"plain_http_port": "11080",
"port": "11443",
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
},
"full_address_list": [],
"instance_title": "caddy-frontend-1",
......
......@@ -115,7 +115,7 @@
"monitor-username": "admin",
"plain_http_port": "11080",
"port": "11443",
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
},
"full_address_list": [],
"instance_title": "caddy-frontend-1",
......
......@@ -117,7 +117,7 @@
"monitor-username": "admin",
"plain_http_port": "11080",
"port": "11443",
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@enable-http2-default_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
"slave-kedifa-information": "{\"_dummy-cached\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@dummy-cached_key-generate-auth-url@@?auth=\"}, \"_enable-http2-default\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-default_key-generate-auth-url@@?auth=\"}, \"_enable-http2-false\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-false_key-generate-auth-url@@?auth=\"}, \"_enable-http2-true\": {\"kedifa-caucase-url\": \"http://[@@_ipv6_address@@]:15090\", \"key-download-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@\", \"key-generate-auth-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@/@@dummy-cached_key-upload-url@@\", \"key-upload-url\": \"https://[@@_ipv6_address@@]:15080/@@enable-http2-true_key-generate-auth-url@@?auth=\"}}"
},
"full_address_list": [],
"instance_title": "caddy-frontend-1",
......
......@@ -41,6 +41,9 @@ T-2/var/log/httpd/_custom_domain_ssl_crt_ssl_key_ssl_ca_crt_error_log
T-2/var/log/httpd/_custom_domain_wildcard_access_log
T-2/var/log/httpd/_custom_domain_wildcard_backend_log
T-2/var/log/httpd/_custom_domain_wildcard_error_log
T-2/var/log/httpd/_disabled-cookie-list-simple_access_log
T-2/var/log/httpd/_disabled-cookie-list-simple_backend_log
T-2/var/log/httpd/_disabled-cookie-list-simple_error_log
T-2/var/log/httpd/_disabled-cookie-list_access_log
T-2/var/log/httpd/_disabled-cookie-list_backend_log
T-2/var/log/httpd/_disabled-cookie-list_error_log
......
......@@ -18,4 +18,4 @@ md5sum = 8357771b70efd0740561b1cb46f6955e
[template-deploy-test]
filename = instance.cfg.in
md5sum = 062e677990ca0cd0c0396993c58b46a2
md5sum = 1faa52013b12b1753bcaff0b1309ad90
......@@ -30,8 +30,8 @@ sla-computer_guid = ${slap-connection:computer-id}
# Tested image
# Passed by request
config-virtual-hard-drive-url = {{ slapparameter_dict.get('image-to-test-url') }}
config-virtual-hard-drive-md5sum = {{ slapparameter_dict.get('image-to-test-md5sum') }}
config-virtual-hard-drive-url = ${image-to-test:url}
config-virtual-hard-drive-md5sum = ${image-to-test:md5sum}
# The test script
config-bootstrap-script-url = {{ in_vm_test_script }}#{{ in_vm_test_script_md5 }}
......@@ -58,6 +58,24 @@ return =
nat-rule-port-tcp-443
nat-rule-port-tcp-80
[image-to-test]
# This section tries to replace the download URL by the file:// URL of an already downloaded image
recipe = slapos.recipe.build
init =
options['url'] = options['input-url']
for md5sum, url in self.buildout['image-repository'].items():
if md5sum == options['md5sum']:
print("Using pre-downloaded image", url)
options['url'] = url
break
input-url = {{ slapparameter_dict.get('image-to-test-url') }}
md5sum = {{ slapparameter_dict.get('image-to-test-md5sum') }}
[image-repository]
{% for md5sum, url in test_image_repository.items() %}
{{ md5sum }} = file://{{ url }}
{% endfor %}
[directory]
recipe = slapos.cookbook:mkdirectory
home = ${buildout:directory}
......
......@@ -50,3 +50,10 @@ context =
raw in_vm_test_script_md5 ${deploy-script-controller-script:md5sum}
raw waittime ${deploy-script-controller-script:waittime}
raw tries ${deploy-script-controller-script:tries}
section test_image_repository test-image-repository
[test-image-repository]
${download-image-debian-9:md5sum} = ${download-image-debian-9:target}
${download-image-debian-10:md5sum} = ${download-image-debian-10:target}
${download-image-debian-11:md5sum} = ${download-image-debian-11:target}
......@@ -56,5 +56,24 @@ recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
[download-image]
recipe = slapos.recipe.build:download
shared = true
[download-image-debian-9]
<= download-image
url = http://bit.ly/2IRi8Kg
md5sum = 2b113e3cd8276b9740189622603d6f99
[download-image-debian-10]
<= download-image
url = http://shacache.org/shacache/9d3e6d017754fdd08e5ecf78093dec27fd792fb183df6146006adf003b6f4b98c0388d5a11566627101f7855d77f60e3dd4ba7ce66850f4a8f030573b904d5ab
md5sum = b7928d7b0a2b5e2888f5ddf68f5fe422
[download-image-debian-11]
<= download-image
url = http://shacache.org/shacache/476c96feff4bc44950e8ccf05d703d973f6d60c5ab95c8724cc4096cb008b3f904708a2377c293bf73758914d2d4556a31a056b0f33cae11ed48194019fdab4c
md5sum = e58dbfd8637d73f7ccd473ad16da852a
[versions]
erp5.util = 0.4.69
......@@ -1950,10 +1950,10 @@ function download_playbook {
if [ ! -f /etc/opt/slapcache.cfg ]; then
slapcache-conf
fi
DFILE="/tmp/tmpplaybook$(basename $0).$$/"
DFILE=$(mktemp -d -t "$(basename "$0")"-XXXXXXXXXXXX)
TFILE="archive.tar.gz"
mkdir -p $DFILE
cd $DFILE
cd "$DFILE" || exit 1
slapcache-download --destination=$TFILE
tar -xzvf $TFILE
rm $TFILE
......@@ -2198,10 +2198,11 @@ if [ ! -f /etc/opt/slapcache.cfg ]; then
fi
sed -i "s/key = slapos-global-key/key = slapos-global-official-vifib-key/g" /etc/opt/slapcache.cfg
DFILE="/tmp/tmpplaybook_unstable$(basename $0).$$/"
DFILE=$(mktemp -d -t "$(basename "$0")"-XXXXXXXXXXXX)
TFILE="archive.tar.gz"
mkdir -p $DFILE
cd $DFILE
cd "$DFILE" || exit 1
wget -O $TFILE http://10.0.2.100/playbook.tar.gz
tar -xzvf $TFILE
rm $TFILE
......
[instance-profile]
filename = instance.cfg.in
md5sum = 21ea6fe8ebb6b7baf7e26c0f4c13ebcd
md5sum = 6a32b81db4ea9f2f63b5a92e8a134d58
[buildout]
parts =
fluentbit-service
fluent-bit-service
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
......@@ -17,8 +17,8 @@ promise = ${:etc}/promise/
log = ${:var}/log
bin = ${:home}/bin
[fluentbit-service]
[fluent-bit-service]
recipe = slapos.cookbook:wrapper
command-line = {{ fluentbit_source_location }}/build/bin/fluent-bit -i cpu -o stdout
command-line = {{ fluent_bit_location }}/bin/fluent-bit -i cpu -o stdout
wrapper-path = ${directory:service}/fluentbit-service
output = $${:wrapper-path}
......@@ -2,13 +2,11 @@
extends =
buildout.hash.cfg
../../stack/slapos.cfg
../../component/cmake/buildout.cfg
../../component/bison/buildout.cfg
../../component/flex/buildout.cfg
../../stack/monitor/buildout.cfg
../../component/fluent-bit/buildout.cfg
parts =
slapos-cookbook
fluent-bit
instance-profile
[instance-profile]
......@@ -17,16 +15,4 @@ template = ${:_profile_base_location_}/instance.cfg.in
rendered = ${buildout:directory}/instance.cfg
context =
section buildout buildout
key fluentbit_source_location fluent-bit:location
[fluent-bit]
recipe = slapos.recipe.cmmi
url = https://github.com/fluent/fluent-bit/archive/refs/tags/v1.9.7.tar.gz
environment =
PATH=${bison:location}/bin:${flex:location}/bin:${fluent-bit:location}:%(PATH)s
location = ${buildout:parts-directory}/${:_buildout_section_name_}
configure-command =
cd build && ${cmake:location}/bin/cmake .. -DFLB_CONFIG_YAML=Off .
make-targets =
make-binary =
cd build && make
key fluent_bit_location fluent-bit:location
......@@ -69,8 +69,6 @@ KVM instance parameters:
MD5Sum of image disk to download
- virtual-hard-drive-gzipped (default: False)
Compress image to reduce size with gzip (.gz)
- hard-drive-url-check-certificate (default: True)
if virtual-hard-drive-url use self-signed https, then specify if https certificate should be verified or not
- enable-http-server (default: False)
Configure server that will help to get some files into the vm from http
......
......@@ -19,11 +19,11 @@ md5sum = a7978940fb9cdcc4e1ec33015ba640ba
[template-kvm]
filename = instance-kvm.cfg.jinja2
md5sum = 150285957daa256420d2d73519277420
md5sum = d790827b6199aa5aada5fe7acb8f1a7b
[template-kvm-cluster]
filename = instance-kvm-cluster.cfg.jinja2.in
md5sum = c00608f94ff6cfd8d37a280267c7227f
md5sum = 4919254d85b98659c1be2ae631b99a13
[template-kvm-resilient]
filename = instance-kvm-resilient.cfg.jinja2
......@@ -55,7 +55,7 @@ md5sum = 6328f99728284847b8dd1146aadeae1b
[template-kvm-run]
filename = template/template-kvm-run.in
md5sum = 7da4fcd815cb7abe318d8ac4b98c8cf3
md5sum = fa048a28da7362d570f5b6bd1e05d232
[template-kvm-controller]
filename = template/kvm-controller-run.in
......@@ -79,7 +79,7 @@ md5sum = 438192aab9f11e40dc521b46a4854dcf
[image-download-controller]
filename = template/image-download-controller.py.in
md5sum = dc822ddd7dc987bf808a64a18ba11fd0
md5sum = 9636903e683e4712e313ca2c470cfb94
[image-download-config-creator]
filename = template/image-download-config-creator.py.in
......
......@@ -386,12 +386,6 @@
"type": "boolean",
"default": false
},
"hard-drive-url-check-certificate": {
"title": "Check certificate when downloading virtual hard drive from https.",
"description": "Define if certificate should be checked when downloading virtual hard drive from https url.",
"type": "boolean",
"default": true
},
"wipe-disk-ondestroy": {
"title": "Wipe disks when destroy the VM",
"description": "Say if disks should be wiped by writing new data over every single bit before delete them. This option is used to securely delete VM disks",
......
......@@ -117,7 +117,6 @@ config-enable-vhost = {{ dumps(kvm_parameter_dict.get('enable-vhost', False)) }}
{{ setconfig('virtual-hard-drive-url', kvm_parameter_dict.get('virtual-hard-drive-url', '')) }}
{{ setconfig('virtual-hard-drive-md5sum', kvm_parameter_dict.get('virtual-hard-drive-md5sum', '')) }}
config-virtual-hard-drive-gzipped = {{ dumps(kvm_parameter_dict.get('virtual-hard-drive-gzipped', False)) }}
config-hard-drive-url-check-certificate = {{ dumps(kvm_parameter_dict.get('hard-drive-url-check-certificate', True)) }}
config-external-disk-number = {{ dumps(kvm_parameter_dict.get('external-disk-number', 0)) }}
config-external-disk-size = {{ dumps(kvm_parameter_dict.get('external-disk-size', 20)) }}
config-external-disk-format = {{ dumps(kvm_parameter_dict.get('external-disk-format', 'qcow2')) }}
......
......@@ -187,12 +187,6 @@
"type": "boolean",
"default": false
},
"hard-drive-url-check-certificate": {
"title": "Check certificate when downloading virtual hard drive from https.",
"description": "Define if certificate should be checked when downloading virtual hard drive from https url.",
"type": "boolean",
"default": true
},
"wipe-disk-ondestroy": {
"title": "Wipe disks when destroy the VM",
"description": "Say if disks should be wiped by writing new data over every single bit before delete them. This option is used to securely delete VM disks",
......
......@@ -457,7 +457,6 @@ enable-vhost = ${slap-parameter:enable-vhost}
virtual-hard-drive-url = ${slap-parameter:virtual-hard-drive-url}
virtual-hard-drive-md5sum = ${slap-parameter:virtual-hard-drive-md5sum}
virtual-hard-drive-gzipped = ${slap-parameter:virtual-hard-drive-gzipped}
hard-drive-url-check-certificate = ${slap-parameter:hard-drive-url-check-certificate}
shell-path = {{ dash_executable_location }}
qemu-path = {{ qemu_executable_location }}
......@@ -1091,8 +1090,6 @@ enable-vhost = False
virtual-hard-drive-url =
virtual-hard-drive-md5sum =
virtual-hard-drive-gzipped = False
# if virtual-hard-drive-url use https, then specify if https certificate should be checked or not
hard-drive-url-check-certificate = True
external-disk-number = 0
external-disk-size = 20
......
......@@ -95,7 +95,6 @@ if __name__ == "__main__":
try:
subprocess.check_output([
curl,
'--insecure', # allow any download
'--location', # follow redirects
'--no-progress-meter', # do not tell too much
'--max-time', '14400', # maximum time for download is 4 hours
......
......@@ -59,7 +59,6 @@ httpd_port = {{ parameter_dict.get("httpd-port") }}
netcat_bin = '{{ parameter_dict.get("netcat-binary") }}'.strip()
cluster_doc_host = '{{ parameter_dict.get("cluster-doc-host") }}'
cluster_doc_port = {{ parameter_dict.get("cluster-doc-port") }}
url_check_certificate = '{{ parameter_dict.get("hard-drive-url-check-certificate", "true") }}'.lower()
auto_ballooning = '{{ parameter_dict.get("auto-ballooning") }}' in ('true', 'True', '1')
vm_name = '{{ parameter_dict.get("name") }}'
......
......@@ -103,7 +103,6 @@ bootstrap_machine_param_dict = {
"e1f67a7ef7b96",
"virtual-hard-drive-md5sum": "9ffd690a5fcb4fa56702f2b99183e493",
"virtual-hard-drive-gzipped": True,
"hard-drive-url-check-certificate": False,
"use-tap": True,
"use-nat": True,
"nat-restrict-mode": True,
......
......@@ -30,6 +30,8 @@ location = /usr
recipe = plone.recipe.command
command = ${:location}/bin/go env -w GOPATH=${buildout:directory}/go
environment =
environment-extra =
stop-on-error = yes
location = /usr
[cmake]
......
......@@ -16,7 +16,7 @@
[template]
filename = instance.cfg
md5sum = fc7bccab64e6794b33766ca9925231c8
md5sum = f0a12f3abc25713f5c79c9bf13290340
[template-lte-enb-epc]
_update_hash_filename_ = instance-enb-epc.jinja2.cfg
......@@ -40,7 +40,7 @@ md5sum = 9732653a0e2c7fe91d80da80762430d2
[template-lte-mme]
_update_hash_filename_ = instance-mme.jinja2.cfg
md5sum = 51b8762d4691f525d0228fa1f286e772
md5sum = 728f4d3ae248710c23e4b73eea4d628e
[ue_db.jinja2.cfg]
filename = config/ue_db.jinja2.cfg
......@@ -75,5 +75,5 @@ _update_hash_filename_ = promise/check_sdr_busy.jinja2.py
md5sum = 93dacb1da15310eb70d0815711a06cdf
[interface-up-promise]
_update_hash_filename_ = promise/check_interface_up.jinja2.py
md5sum = 63d3bbac7b6f480ee0c510e80aa1ccf7
_update_hash_filename_ = promise/check_interface_up.py
md5sum = cbe3ac5d123e38cc6adf168f39cc8189
......@@ -16,6 +16,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
{%- endif %}
"tx_gain": {
"title": "Tx gain",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"use_ipv4": {
"default": false,
"title": "Use IPv4",
......
......@@ -16,6 +16,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
{%- endif %}
"tx_gain": {
"title": "Tx gain",
......
......@@ -7,6 +7,10 @@ parts =
tun-up-promise
monitor-base
publish-connection-information
{% if slapparameter_dict.get("iperf3", None) %}
iperf-service
port-listening-promise
{% endif %}
extends = {{ monitor_template }}
......@@ -114,6 +118,25 @@ wrapper-path = ${directory:bin}/mme-ifup-empty
command-line = echo Using interface
mode = 775
{% if slapparameter_dict.get("iperf3", None) %}
### iperf3
[iperf-service]
recipe = slapos.cookbook:wrapper
port = 5001
ip = ${slap-configuration:tun-ipv4-addr}
command-line = {{ iperf3_location }}/bin/iperf3 --server --interval 1 --port ${:port} --bind ${:ip}
wrapper-path = ${directory:service}/iperf3
mode = 0775
pidfile = ${directory:run}/iperf3.pid
[port-listening-promise]
<= monitor-promise-base
promise = check_socket_listening
name = iperf3-port-listening.py
config-host = ${iperf-service:ip}
config-port = ${iperf-service:port}
{% endif %}
[config-base]
recipe = slapos.recipe.template:jinja2
extensions = jinja2.ext.do
......@@ -154,17 +177,15 @@ recipe = slapos.cookbook:publish.serialised
epc-ipv6 = ${slap-configuration:ipv6-random}
epc-ipv4 = {{ epc_ipv4 }}
[tun-up-promise-template]
recipe = slapos.recipe.template:jinja2
url = {{ interface_up_promise }}
output = ${directory:etc}/check-tun-up.py
extensions = jinja2.ext.do
context =
key slapparameter_dict slap-configuration:configuration
# Add custom promise to check if tun is up
# Add custom promise to check if /dev/sdr0 is busy
[tun-up-promise]
recipe = slapos.cookbook:promise.plugin
eggs = slapos.core
file = ${tun-up-promise-template:output}
file = {{ interface_up_promise }}
output = ${directory:plugins}/check-tun-up.py
{% if not slapparameter_dict.get("testing", False) %}
config-ifname = ${slap-configuration:tun-name}
{% else %}
config-ifname =
{% endif %}
config-testing = {{ slapparameter_dict.get("testing", False) }}
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -15,6 +15,12 @@
"description": "Set to true if external eNB / gNB will need to connect to this core network.",
"type": "boolean"
},
"iperf3": {
"default": false,
"title": "iperf3 UDP server",
"description": "Activate iperf3 UDP server",
"type": "boolean"
},
"tx_gain": {
"title": "Tx gain",
"description": "Tx gain (in dB)",
......
......@@ -148,6 +148,7 @@ extra-context =
raw ltelogs_template ${ltelogs.jinja2.sh:target}
raw openssl_location ${openssl:location}
raw nghttp2_location ${nghttp2:location}
raw iperf3_location ${iperf3:location}
key ue_db_path ue-db-config:output
[ue-db-config]
......
......@@ -27,8 +27,8 @@ class RunPromise(GenericPromise):
In this case, check whether the file exists.
"""
ifname = "{{ slapparameter_dict.get('tun-name', '') }}"
testing = {{ slapparameter_dict.get('testing', False) }}
ifname = self.getConfig('ifname')
testing = self.getConfig('testing')
if testing:
self.logger.info("skipping promise")
......
......@@ -5,6 +5,7 @@ extends =
../../stack/monitor/buildout.cfg
../../component/logrotate/buildout.cfg
../../component/nghttp2/buildout.cfg
../../component/iperf3/buildout.cfg
parts +=
template
......@@ -17,6 +18,7 @@ parts +=
gnb.jinja2.cfg
ue_db.jinja2.cfg
sib23.asn
iperf3
# unimplemented parts - the http monitor and better log handling using logrotate
# apache-php
# logrotate
......
......@@ -15,7 +15,7 @@
[instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum = 6ddb028e7427913fdcac34b8e727734c
md5sum = 56ad229756d2d57971c583104370dcc7
[instance]
_update_hash_filename_ = instance.cfg.in
......@@ -23,7 +23,7 @@ md5sum = e211c439571e2900f9f35482c9638d06
[instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in
md5sum = 23c3df4a889ebfa9f0a94e873e95ad3b
md5sum = a343818079d4fc106594e5850cc1853a
[instance-export]
_update_hash_filename_ = instance-export.cfg.jinja.in
......@@ -35,7 +35,7 @@ md5sum = ad9499e7355ded4975ad313442cecb7a
[slapos-standalone-script]
_update_hash_filename_ = slapos_standalone_script.py.jinja
md5sum = ef5b73648513caf46573f3302953790f
md5sum = 6792d29057db35ea69b01e72a5c913e3
[theia-common]
_update_hash_filename_ = theia_common.py
......
......@@ -34,6 +34,11 @@ name = Import {{ parameter_dict['additional-frontend-name'] }}
abstract-socket-path = $${directory:home}/standalone-import-ready
# Disable frontend request forwarding in the 'import' instance
[slapos-standalone-script]
forward-frontend-requests = disabled
# Change port ranges to avoid race conditions on port allocation
[frontend-instance-port]
minimum = 3200
......
......@@ -532,8 +532,10 @@ context =
key embedded_request_exitcode_file :embedded-request-exitcode-file
key embedded_instance_config embedded-instance-config:output
key home_path directory:home
key forward_frontend_requests :forward-frontend-requests
section slap_connection slap-connection
section slapos_standalone_config slapos-standalone-config
forward-frontend-requests = enabled
url = ${slapos-standalone-script:output}
[slapos-standalone]
......
......@@ -51,6 +51,7 @@ def signal_handler(signum, frame):
@contextlib.contextmanager
def setupStandalone():
{%- if forward_frontend_requests != "disabled" %}
partition_forward_configuration = (
slapos.slap.standalone.PartitionForwardAsPartitionConfiguration(
master_url={{ repr(slap_connection['server-url']) }},
......@@ -63,6 +64,9 @@ def setupStandalone():
),
),
)
{%- else %}
partition_forward_configuration = ()
{%- endif %}
shared_parts = {{ repr(shared_part_list) }}
shared_part_list = [x.strip() for x in shared_parts.splitlines() if x.strip()]
standalone = slapos.slap.standalone.StandaloneSlapOS(
......
......@@ -30,11 +30,14 @@ import errno
import os
import re
import shutil
import sqlite3
import subprocess
import time
import requests
from slapos.proxy.db_version import DB_VERSION
from slapos.testing.testcase import SlapOSNodeCommandError, installSoftwareUrlList
from test import TheiaTestCase, ResilientTheiaMixin, theia_software_release_url
......@@ -479,7 +482,26 @@ class TakeoverMixin(ExportAndImportMixin):
return resp.text
class TestTheiaResilience(ResilienceMixin, TakeoverMixin, ResilientTheiaTestCase):
class TheiaSyncMixin(ResilienceMixin, TakeoverMixin):
def _doSync(self, max_tries=None, wait_interval=None):
max_tries = max_tries or self.backup_max_tries
wait_interval = wait_interval or self.backup_wait_interval
start = time.time()
# Call exporter script instead of waiting for cron job
# XXX Accelerate cron frequency instead ?
exporter_script = self.getPartitionPath('export', 'bin', 'exporter')
transaction_id = str(int(time.time()))
subprocess.check_call((exporter_script, '--transaction-id', transaction_id))
takeover_url, _ = self._getTakeoverUrlAndPassword()
# Wait for takoever to be ready
self._waitTakeoverReady(takeover_url, start, max_tries, wait_interval)
class TestTheiaResilience(TheiaSyncMixin, ResilientTheiaTestCase):
test_instance_max_retries = 0
backup_max_tries = 70
backup_wait_interval = 10
......@@ -505,20 +527,6 @@ class TestTheiaResilience(ResilienceMixin, TakeoverMixin, ResilientTheiaTestCase
# Remember content of ~/etc in the import theia
self.etc_listdir = os.listdir(self.getPartitionPath('import', 'etc'))
def _doSync(self):
start = time.time()
# Call exporter script instead of waiting for cron job
# XXX Accelerate cron frequency instead ?
exporter_script = self.getPartitionPath('export', 'bin', 'exporter')
transaction_id = str(int(time.time()))
subprocess.check_call((exporter_script, '--transaction-id', transaction_id))
takeover_url, _ = self._getTakeoverUrlAndPassword()
# Wait for takoever to be ready
self._waitTakeoverReady(takeover_url, start, self.backup_max_tries, self.backup_wait_interval)
def _checkSync(self):
# Check that ~/etc still contains everything it did before
etc_listdir = os.listdir(self.getPartitionPath('import', 'etc'))
......@@ -554,3 +562,35 @@ class TestTheiaResilience(ResilienceMixin, TakeoverMixin, ResilientTheiaTestCase
# Check that the test instance is properly redeployed
# This checks the promises of the test instance
self._processEmbeddedInstance(self.test_instance_max_retries)
class TestTheiaFrontendForwarding(TheiaSyncMixin, ResilientTheiaTestCase):
backup_max_tries = 100
backup_wait_interval = 20
html5as_url = os.path.abspath(
os.path.join(
os.path.dirname(__file__), '..', '..', 'html5as', 'software.cfg'))
def _prepareExport(self):
# Deploy an embedded html5as
self._deployEmbeddedSoftware(self.html5as_url, 'html5as', 1)
def _checkSync(self):
proxy_relpath = os.path.join('srv', 'runner', 'var', 'proxy.db')
query = "SELECT rowid, partition_reference FROM forwarded_partition_request%s" % DB_VERSION
# Check that theia0 forwards frontend requests
with sqlite3.connect(self.getPartitionPath('export', proxy_relpath)) as db:
rows = db.execute(query).fetchall()
self.assertIn("slappart0_HTML5AS frontend", (row[1] for row in rows))
# Check that theia1 does not forward frontend requests
# i.e that there were no new insertions in the database since it was cloned
# by ensuring the rowids are still the same
with sqlite3.connect(self.getPartitionPath('import', proxy_relpath)) as db:
self.assertEqual(db.execute(query).fetchall(), rows)
def _doTakeover(self):
# do nothing
pass
......@@ -479,7 +479,6 @@ eggs = ${neoppod:eggs}
astor
APacheDEX
${PyStemmer:egg}
PyXML
Pympler
SOAPpy
chardet
......@@ -723,11 +722,10 @@ Products.PluginRegistry = 1.6
Products.TIDStorage = 5.5.0
pyPdf = 1.13
PyStemmer = 1.3.0
PyXML = 0.8.5
Pympler = 0.4.3
StructuredText = 2.11.1
WSGIUtils = 0.7
erp5diff = 0.8.1.7
erp5diff = 0.8.1.8
five.formlib = 1.0.4
google-api-python-client = 1.6.1
httplib2 = 0.10.3
......@@ -758,7 +756,7 @@ urlnorm = 1.1.4
uuid = 1.30
validictory = 1.1.0
xfw = 0.10
xupdate-processor = 0.4
xupdate-processor = 0.5
selenium = 3.14.1
scikit-image = 0.14.0
PyWavelets = 0.5.2
......
......@@ -31,6 +31,9 @@ extends =
../../component/apache-php/buildout.cfg
[python]
part = python3
[template-download-base]
recipe = slapos.recipe.build:download
url = ${:_profile_base_location_}/${:filename}
......
......@@ -91,6 +91,7 @@ depends = ${slapos-cookbook-dependencies:eggs}
[pyrsistent]
recipe = zc.recipe.egg:custom
egg = pyrsistent
[pyrsistent:python2]
setup-eggs = pytest-runner
[slapos-cookbook-dependencies]
......@@ -232,7 +233,7 @@ erp5.util = 0.4.74
feedparser = 5.2.1
functools32 = 3.2.3.post2
attrs = 22.1.0
pyrsistent = 0.16.1
pyrsistent = 0.18.1
pytest-runner = 5.2:whl
ipaddress = 1.0.23
jsonschema = 3.0.2:whl
......@@ -265,6 +266,7 @@ requests = 2.27.1
charset-normalizer = 2.0.12
pyparsing = 2.2.0
certifi = 2020.4.5.1
pyrsistent = 0.16.1
[versions:sys.version_info < (3,8)]
MarkupSafe = 1.0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment