mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-29 00:37:24 +00:00
Merge pull request #8243 from dborquez/fix_systemctl_masked_query
metrics: fixes common.sh function to always return true
This commit is contained in:
commit
d90d1c5c10
@ -175,7 +175,7 @@ function init_env()
|
|||||||
clean_env_ctr
|
clean_env_ctr
|
||||||
|
|
||||||
# restart docker only if it is not masked by systemd
|
# restart docker only if it is not masked by systemd
|
||||||
docker_masked="$(systemctl list-unit-files --state=masked | grep -c docker)"
|
docker_masked="$(systemctl list-unit-files --state=masked | grep -c docker)" || true
|
||||||
if [ "${docker_masked}" -eq 0 ]; then
|
if [ "${docker_masked}" -eq 0 ]; then
|
||||||
sudo systemctl restart docker
|
sudo systemctl restart docker
|
||||||
fi
|
fi
|
||||||
@ -191,7 +191,7 @@ function init_env()
|
|||||||
# killed to start test with clean environment.
|
# killed to start test with clean environment.
|
||||||
function kill_processes_before_start()
|
function kill_processes_before_start()
|
||||||
{
|
{
|
||||||
docker_masked="$(systemctl list-unit-files --state=masked | grep -c "${DOCKER_EXE}")"
|
docker_masked="$(systemctl list-unit-files --state=masked | grep -c "${DOCKER_EXE}")" || true
|
||||||
|
|
||||||
if [ "${docker_masked}" -eq 0 ]; then
|
if [ "${docker_masked}" -eq 0 ]; then
|
||||||
DOCKER_PROCS=$(sudo "${DOCKER_EXE}" ps -q)
|
DOCKER_PROCS=$(sudo "${DOCKER_EXE}" ps -q)
|
||||||
|
Loading…
Reference in New Issue
Block a user