From 65f5e295c3dbe72ca3df831c552d7bc92389c958 Mon Sep 17 00:00:00 2001 From: Daniil Baturin Date: Wed, 3 Jul 2019 04:00:50 +0200 Subject: T1504: wait for commit lock before trying to update resolv.conf in the out of CLI mode. --- src/conf_mode/dns_forwarding.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/conf_mode') diff --git a/src/conf_mode/dns_forwarding.py b/src/conf_mode/dns_forwarding.py index 0ce2eee2c..b9a5b99e9 100755 --- a/src/conf_mode/dns_forwarding.py +++ b/src/conf_mode/dns_forwarding.py @@ -23,6 +23,8 @@ import argparse import jinja2 import netifaces +import vyos.util + from vyos.config import Config from vyos import ConfigError @@ -265,6 +267,12 @@ def apply(dns): if __name__ == '__main__': args = parser.parse_args() + + if args.dhclient: + # There's a big chance it was triggered by a commit still in progress + # so we need to wait until the new values are in the running config + vyos.util.wait_for_commit_lock() + try: c = get_config(args) verify(c) -- cgit v1.2.3