diff --git a/rsconf/systemd.py b/rsconf/systemd.py index d8e9556e..5c440edb 100644 --- a/rsconf/systemd.py +++ b/rsconf/systemd.py @@ -175,7 +175,7 @@ def _exports(instance_spec, env): ) def _extra_run_flags(instance_spec): - c = z.pkunchecked_nested_get("extra_run_flags." + compt.name) + c = z.pkunchecked_nested_get("extra_run_flags." + compt.module_name) if not c: return "" return " ".join([f"--{k}='{v}'" for k, v in c.items()]) diff --git a/tests/pkcli/build_data/1.in/db/000.yml b/tests/pkcli/build_data/1.in/db/000.yml index c6414e63..541acd35 100644 --- a/tests/pkcli/build_data/1.in/db/000.yml +++ b/tests/pkcli/build_data/1.in/db/000.yml @@ -468,7 +468,7 @@ host: ssh_port: 3103 systemd: extra_run_flags: - rsivizdevbox: + devbox: gpus: "all" jupyterhub: jupyter_docker_image: radiasoft/custom-jupyter:latest diff --git a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_devtech3.sh b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_devtech3.sh index 5c6fc3fc..e8062765 100644 --- a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_devtech3.sh +++ b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_devtech3.sh @@ -7,7 +7,7 @@ rsconf_install_access '500' 'vagrant' 'vagrant' rsconf_install_file '/srv/devbox_devtech3/cmd' 'e4519a71f8e5f1ccf0006350977c367d' rsconf_install_file '/srv/devbox_devtech3/env' '22e03a134cc868bb12094d8dc118a6c4' rsconf_install_file '/srv/devbox_devtech3/remove' 'd8d61104199236b9701424db5247cc32' -rsconf_install_file '/srv/devbox_devtech3/start' 'f05099b7cb37e15f974372a6814d5772' +rsconf_install_file '/srv/devbox_devtech3/start' 'a78c538db7531737496910ae6a088403' rsconf_install_file '/srv/devbox_devtech3/stop' '38bd86d43d98dfac2ccce1feca46f21c' rsconf_install_access '444' 'root' 'root' rsconf_install_file '/etc/systemd/system/devbox_devtech3.service' 'afdbd1365adaa419c07b302e20dff287' diff --git a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_fullstackdude.sh b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_fullstackdude.sh index 722b1ec6..e0920c18 100644 --- a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_fullstackdude.sh +++ b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/devbox_fullstackdude.sh @@ -7,7 +7,7 @@ rsconf_install_access '500' 'vagrant' 'vagrant' rsconf_install_file '/srv/devbox_fullstackdude/cmd' 'cdcf85170cfe88770e11b1fdb2062550' rsconf_install_file '/srv/devbox_fullstackdude/env' '22e03a134cc868bb12094d8dc118a6c4' rsconf_install_file '/srv/devbox_fullstackdude/remove' '2e3f05447c3a666355e47923fc17dc79' -rsconf_install_file '/srv/devbox_fullstackdude/start' 'c3e2ce8f63d5e03a5c3c2e972ccd0f3e' +rsconf_install_file '/srv/devbox_fullstackdude/start' 'ca6c123d3e26263f7aae2e71420c66b8' rsconf_install_file '/srv/devbox_fullstackdude/stop' 'b9d49c0e7995043a88d9602b0cf6e284' rsconf_install_access '444' 'root' 'root' rsconf_install_file '/etc/systemd/system/devbox_fullstackdude.service' 'e8e49c2404fb1c49825f03be1ab333fe' diff --git a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_devtech3/start b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_devtech3/start index ff48e616..fd833e55 100644 --- a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_devtech3/start +++ b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_devtech3/start @@ -26,4 +26,4 @@ else image_cmd+=( /srv/devbox_devtech3/cmd ) fi # --init runs tini wrapper: https://github.com/krallin/tini -exec docker run "${flags[@]}" --init --rm "--user=$user" --network=host -v '/srv/devbox_devtech3/jupyter:/home/vagrant/jupyter:rw' -v '/srv/devbox_devtech3/src:/home/vagrant/src:rw' -v '/srv/devbox_devtech3/sshd:/home/vagrant/.ssh:ro' -v '/srv/devbox_devtech3:/srv/devbox_devtech3:ro' "${image_cmd[@]}" +exec docker run "${flags[@]}" --init --rm "--user=$user" --network=host -v '/srv/devbox_devtech3/jupyter:/home/vagrant/jupyter:rw' -v '/srv/devbox_devtech3/src:/home/vagrant/src:rw' -v '/srv/devbox_devtech3/sshd:/home/vagrant/.ssh:ro' -v '/srv/devbox_devtech3:/srv/devbox_devtech3:ro' --gpus='all' "${image_cmd[@]}" diff --git a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_fullstackdude/start b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_fullstackdude/start index 23e34a38..8d4036dd 100644 --- a/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_fullstackdude/start +++ b/tests/pkcli/build_data/1.out/srv/host/v9.radia.run/srv/devbox_fullstackdude/start @@ -26,4 +26,4 @@ else image_cmd+=( /srv/devbox_fullstackdude/cmd ) fi # --init runs tini wrapper: https://github.com/krallin/tini -exec docker run "${flags[@]}" --init --rm "--user=$user" --network=host -v '/srv/devbox_fullstackdude/jupyter:/home/vagrant/jupyter:rw' -v '/srv/devbox_fullstackdude/src:/home/vagrant/src:rw' -v '/srv/devbox_fullstackdude/sshd:/home/vagrant/.ssh:ro' -v '/srv/devbox_fullstackdude:/srv/devbox_fullstackdude:ro' "${image_cmd[@]}" +exec docker run "${flags[@]}" --init --rm "--user=$user" --network=host -v '/srv/devbox_fullstackdude/jupyter:/home/vagrant/jupyter:rw' -v '/srv/devbox_fullstackdude/src:/home/vagrant/src:rw' -v '/srv/devbox_fullstackdude/sshd:/home/vagrant/.ssh:ro' -v '/srv/devbox_fullstackdude:/srv/devbox_fullstackdude:ro' --gpus='all' "${image_cmd[@]}"