From dae01bfcad18dcd6836a537189972e00d9dda083 Mon Sep 17 00:00:00 2001 From: Vasu Kulkarni Date: Thu, 22 Mar 2018 14:21:22 -0700 Subject: [PATCH] qa/tests: unset immutable attribute for resolv.conf for centos ovh nodes Signed-off-by: Vasu Kulkarni --- qa/tasks/dnsmasq.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qa/tasks/dnsmasq.py b/qa/tasks/dnsmasq.py index 7f675f3bc29f..764d742fa718 100644 --- a/qa/tasks/dnsmasq.py +++ b/qa/tasks/dnsmasq.py @@ -51,6 +51,9 @@ def replace_resolv(remote, path): misc.write_file(remote, path, "nameserver 127.0.0.1\n") try: # install it + if remote.os.package_type == "rpm": + # for centos ovh resolv.conf has immutable attribute set + remote.run(args=['sudo', 'chattr', '-i', '/etc/resolv.conf'], check_status=False) remote.run(args=['sudo', 'cp', path, '/etc/resolv.conf']) yield finally: -- 2.47.3