From: Vasu Kulkarni Date: Thu, 22 Mar 2018 21:21:22 +0000 (-0700) Subject: qa/tests: unset immutable attribute for resolv.conf for centos ovh nodes X-Git-Tag: v13.1.0~28^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dae01bfcad18dcd6836a537189972e00d9dda083;p=ceph.git qa/tests: unset immutable attribute for resolv.conf for centos ovh nodes Signed-off-by: Vasu Kulkarni --- 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: