diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6960dbd..bbb9bcd 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,7 @@ This file keeps track of all notable changes to charm-jobbergate-agent. Unreleased ---------- +- Fixed the installation of the agent's addons on its virtual environment [ASP-4481] 1.0.3 - 2024-04-18 ------------------ diff --git a/src/jobbergate_agent_ops.py b/src/jobbergate_agent_ops.py index ef2388e..fef21f8 100644 --- a/src/jobbergate_agent_ops.py +++ b/src/jobbergate_agent_ops.py @@ -2,6 +2,7 @@ JobbergateAgentOps. """ import logging +import shlex import subprocess from pathlib import Path from shutil import copy2, rmtree @@ -142,7 +143,7 @@ def _install_extra_deps(self): """Install additional dependencies.""" # Install uvicorn and pyyaml cmd = [self._PIP_CMD, "install", "uvicorn", "pyyaml"] - logger.debug(f"## Installing exra dependencies: {cmd}") + logger.debug(f"## Installing extra dependencies: {cmd}") try: subprocess.call(cmd, env=dict()) except subprocess.CalledProcessError as e: @@ -157,7 +158,6 @@ def _install_jobbergate_agent(self): "-U", self._PACKAGE_NAME, ] - subprocess.call("echo {}".format(cmd).split()) logger.debug(f"## Installing jobbergate: {cmd}") try: subprocess.call(cmd, env=dict()) @@ -171,9 +171,7 @@ def _install_jobbergate_addon(self, addon: str): self._PIP_CMD, "install", "-U", - addon, - ] - subprocess.call("echo {}".format(cmd).split()) + ] + shlex.split(addon) logger.debug(f"## Installing jobbergate-addons: {cmd}") try: subprocess.call(cmd, env=dict())