|
|
51b5b9 |
From 60d570e52465b58167301f64792f5f85cbc85e20 Mon Sep 17 00:00:00 2001
|
|
|
51b5b9 |
From: Mark Reynolds <mreynolds@redhat.com>
|
|
|
51b5b9 |
Date: Wed, 10 Nov 2021 08:53:45 -0500
|
|
|
51b5b9 |
Subject: [PATCH 11/12] Issue 4978 - use more portable python command for
|
|
|
51b5b9 |
checking containers
|
|
|
51b5b9 |
|
|
|
51b5b9 |
Description: During the installation check for containers use arguments
|
|
|
51b5b9 |
for subprocess.run() that work on all versions of python
|
|
|
51b5b9 |
|
|
|
51b5b9 |
relates: https://github.com/389ds/389-ds-base/issues/4978
|
|
|
51b5b9 |
|
|
|
51b5b9 |
Reviewed by: mreynolds(one line commit rule)
|
|
|
51b5b9 |
---
|
|
|
51b5b9 |
src/lib389/lib389/instance/setup.py | 2 +-
|
|
|
51b5b9 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
51b5b9 |
|
|
|
51b5b9 |
diff --git a/src/lib389/lib389/instance/setup.py b/src/lib389/lib389/instance/setup.py
|
|
|
51b5b9 |
index 7b0147cf9..b23d2deb8 100644
|
|
|
51b5b9 |
--- a/src/lib389/lib389/instance/setup.py
|
|
|
51b5b9 |
+++ b/src/lib389/lib389/instance/setup.py
|
|
|
51b5b9 |
@@ -734,7 +734,7 @@ class SetupDs(object):
|
|
|
51b5b9 |
# Check if we are in a container, if so don't use /dev/shm for the db home dir
|
|
|
51b5b9 |
# as containers typically don't allocate enough space for dev/shm and we don't
|
|
|
51b5b9 |
# want to unexpectedly break the server after an upgrade
|
|
|
51b5b9 |
- container_result = subprocess.run(["systemd-detect-virt", "-c"], capture_output=True)
|
|
|
51b5b9 |
+ container_result = subprocess.run(["systemd-detect-virt", "-c"], stdout=subprocess.PIPE)
|
|
|
51b5b9 |
if container_result.returncode == 0:
|
|
|
51b5b9 |
# In a container, set the db_home_dir to the db path
|
|
|
51b5b9 |
self.log.debug("Container detected setting db home directory to db directory.")
|
|
|
51b5b9 |
--
|
|
|
51b5b9 |
2.31.1
|
|
|
51b5b9 |
|