[elbe-devel] [PATCH 2/2] elbepack: drop 'elbe control shutdown_initvm'
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Thu Jun 20 16:30:19 CEST 2024
There is a better alternative in 'elbe initvm stop'.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
bash-completion | 2 +-
docs/elbe-control.rst | 4 ----
elbepack/daemons/soap/esoap.py | 6 ------
elbepack/soapclient.py | 19 -------------------
newsfragments/+shutdown.removal.rst | 1 +
5 files changed, 2 insertions(+), 30 deletions(-)
diff --git a/bash-completion b/bash-completion
index 9e0e7c787585..ffa00359eda7 100644
--- a/bash-completion
+++ b/bash-completion
@@ -109,7 +109,7 @@ _cmd_args_completion_elbe()
cmd_opt=$(_elbe_subcmd_with_opt 'rm_log list_projects list_users add_user create_project reset_project \
del_project set_xml build build_sysroot build_sdk build_cdroms get_file \
build_chroot_tarball dump_file get_files wait_busy set_cdrom set_orig \
- shutdown_initvm set_pdebuild build_pbuilder update_pbuilder \
+ set_pdebuild build_pbuilder update_pbuilder \
install_elbe_version')
;;
check_updates)
diff --git a/docs/elbe-control.rst b/docs/elbe-control.rst
index a04008229ab3..12e2eebf502d 100644
--- a/docs/elbe-control.rst
+++ b/docs/elbe-control.rst
@@ -32,7 +32,6 @@ SYNOPSIS
elbe control [options] rm_log <build-dir>
elbe control [options] get_file <build-dir> <filename>
elbe control [options] dump_file <build-dir> <filename>
- elbe control [options] shutdown_initvm
elbe control [options] install_elbe_version <version>
DESCRIPTION
@@ -186,9 +185,6 @@ a ./debian folder with a valid debianization.
*dump_file* <build-dir> <filename>
Dump a single File from the project to stdout.
-*shutdown_initvm*
- Make the initvm shutdown.
-
*install_elbe_version* [version]
Make the initvm install a specific elbe version. Defaults to the
version of the elbe executable. This requires, that the initvm has
diff --git a/elbepack/daemons/soap/esoap.py b/elbepack/daemons/soap/esoap.py
index 33efa91c3940..32f56e32e1e4 100644
--- a/elbepack/daemons/soap/esoap.py
+++ b/elbepack/daemons/soap/esoap.py
@@ -368,12 +368,6 @@ class ESoap (ServiceBase):
return 'ELBE-FINISH'
return msg
- @rpc()
- @authenticated_admin
- @soap_faults
- def shutdown_initvm(self):
- subprocess.run(['systemctl', '--no-block', 'poweroff'], check=True)
-
@rpc(String)
@authenticated_uid
@soap_faults
diff --git a/elbepack/soapclient.py b/elbepack/soapclient.py
index ad9b0b5e8dfb..d3b89a4db256 100644
--- a/elbepack/soapclient.py
+++ b/elbepack/soapclient.py
@@ -637,25 +637,6 @@ class SetOrigAction(ClientAction):
ClientAction.register(SetOrigAction)
-class ShutdownInitvmAction(ClientAction):
-
- tag = 'shutdown_initvm'
-
- def execute(self, client, _opt, args):
- if args:
- print('usage: elbe control shutdown_initvm', file=sys.stderr)
- sys.exit(194)
-
- # if shutdown kills the daemon before it can answer the request
- try:
- client.service.shutdown_initvm()
- except BadStatusLine:
- pass
-
-
-ClientAction.register(ShutdownInitvmAction)
-
-
class SetPdebuilderAction(ClientAction):
tag = 'set_pdebuild'
diff --git a/newsfragments/+shutdown.removal.rst b/newsfragments/+shutdown.removal.rst
new file mode 100644
index 000000000000..63d50b4a072c
--- /dev/null
+++ b/newsfragments/+shutdown.removal.rst
@@ -0,0 +1 @@
+Drop `elbe control shutdown_initvm`. Use `elbe initvm stop` instead.
--
2.45.2
More information about the elbe-devel
mailing list