[elbe-devel] [PATCH] elbepack: initvmaction: restart elbe daemon on sync
Thomas Weißschuh
thomas.weissschuh at linutronix.de
Mon Jun 17 11:08:15 CEST 2024
Make sure to use the newly synchronized state.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh at linutronix.de>
---
elbepack/initvmaction.py | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/elbepack/initvmaction.py b/elbepack/initvmaction.py
index 8b7070b51a50..d15f47f02c18 100644
--- a/elbepack/initvmaction.py
+++ b/elbepack/initvmaction.py
@@ -870,16 +870,19 @@ class SyncAction(InitVMAction):
def execute(self, _initvmdir, _opt, _args):
top_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
excludes = ['.git*', '*.pyc', 'elbe-build*', 'initvm', '__pycache__', 'docs', 'examples']
- ssh = ' '.join(['ssh', '-p', cfg['sshport'], '-oUserKnownHostsFile=/dev/null'])
+ ssh = ['ssh', '-p', cfg['sshport'], '-oUserKnownHostsFile=/dev/null']
try:
subprocess.run([
'rsync', '--info=name1,stats1', '--archive', '--times',
*[arg for e in excludes for arg in ('--exclude', e)],
- '--rsh', ssh,
+ '--rsh', ' '.join(ssh),
'--chown=root:root',
f'{top_dir}/elbe',
f'{top_dir}/elbepack',
'root at localhost:/var/cache/elbe/devel'
], check=True)
+ subprocess.run([
+ *ssh, 'root at localhost', 'systemctl', 'restart', 'python3-elbe-daemon',
+ ], check=True)
except subprocess.CalledProcessError as E:
print(E)
---
base-commit: 58030c9e9853389e92b7c4b02a37cdd816d16dbf
change-id: 20240617-sync-restart-71b450af5af6
Best regards,
--
Thomas Weißschuh <thomas.weissschuh at linutronix.de>
More information about the elbe-devel
mailing list