server_environment
Describe the bug
On Linux, get_server_environment() in system_info.py unconditionally calls lsb_release -a via _get_output().
_get_output() uses subprocess.Popen(..., shell=True), which requires a shell (/bin/sh). On minimal container images (e.g. Docker Hardened Images / distroless images), /bin/sh is often absent. The call then raises an exception
To Reproduce
17.0.1.1.1 (and likely earlier versions with the same code)
Steps to reproduce the behavior:
Run Odoo with the server_environment module installed on a minimal Linux container image without /bin/sh (e.g. a DHI / distroless image).
Start Odoo or open the server configuration view that loads system info.
Observe a crash when get_server_environment() tries to run lsb_release -a.
Expected behavior
The module should degrade gracefully when lsb_release is unavailable or cannot be executed (same as on non-Linux systems, where lsbinfo = "not lsb compliant" is already used).
Additional context
Docker image hdi python 3.12 debian 12
server_environment
Describe the bug
On Linux, get_server_environment() in system_info.py unconditionally calls lsb_release -a via _get_output().
_get_output() uses subprocess.Popen(..., shell=True), which requires a shell (/bin/sh). On minimal container images (e.g. Docker Hardened Images / distroless images), /bin/sh is often absent. The call then raises an exception
To Reproduce
17.0.1.1.1 (and likely earlier versions with the same code)
Steps to reproduce the behavior:
Run Odoo with the server_environment module installed on a minimal Linux container image without /bin/sh (e.g. a DHI / distroless image).
Start Odoo or open the server configuration view that loads system info.
Observe a crash when get_server_environment() tries to run lsb_release -a.
Expected behavior
The module should degrade gracefully when lsb_release is unavailable or cannot be executed (same as on non-Linux systems, where lsbinfo = "not lsb compliant" is already used).
Additional context
Docker image hdi python 3.12 debian 12