summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/conf_mode/containers.py16
-rwxr-xr-xsrc/conf_mode/protocols_isis.py2
2 files changed, 17 insertions, 1 deletions
diff --git a/src/conf_mode/containers.py b/src/conf_mode/containers.py
index 32320a4b2..3a93bf062 100755
--- a/src/conf_mode/containers.py
+++ b/src/conf_mode/containers.py
@@ -19,6 +19,7 @@ import json
from ipaddress import ip_address
from ipaddress import ip_network
+from time import sleep
from vyos.config import Config
from vyos.configdict import dict_merge
@@ -28,6 +29,9 @@ from vyos.util import cmd
from vyos.util import run
from vyos.util import read_file
from vyos.util import write_file
+from vyos.util import is_systemd_service_active
+from vyos.util import is_systemd_service_running
+
from vyos.template import render
from vyos.template import is_ipv4
from vyos.template import is_ipv6
@@ -199,6 +203,18 @@ def apply(container):
for network in container['network_remove']:
call(f'podman network rm --force {network}')
+ service_name = 'podman.service'
+ if 'network' in container or 'name' in container:
+ # Start podman if it's required and not yet running
+ if not is_systemd_service_active(service_name):
+ _cmd(f'systemctl start {service_name}')
+ # Wait for podman to be running
+ while not is_systemd_service_running(service_name):
+ sleep(0.250)
+ else:
+ _cmd(f'systemctl stop {service_name}')
+
+
# Add network
if 'network' in container:
for network, network_config in container['network'].items():
diff --git a/src/conf_mode/protocols_isis.py b/src/conf_mode/protocols_isis.py
index 4cf0312e9..4505e2496 100755
--- a/src/conf_mode/protocols_isis.py
+++ b/src/conf_mode/protocols_isis.py
@@ -148,7 +148,7 @@ def verify(isis):
exist_timers = set(required_timers).difference(set(exist_timers))
if len(exist_timers) > 0:
- raise ConfigError('All types of delay must be specified: ' + ', '.join(exist_timers).replace('_', '-'))
+ raise ConfigError('All types of spf-delay must be configured. Missing: ' + ', '.join(exist_timers).replace('_', '-'))
# If Redistribute set, but level don't set
if 'redistribute' in isis: