]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tests: unset immutable attribute for resolv.conf for centos ovh nodes
authorVasu Kulkarni <vasu@redhat.com>
Thu, 22 Mar 2018 21:21:22 +0000 (14:21 -0700)
committerVasu Kulkarni <vasu@redhat.com>
Fri, 30 Mar 2018 18:11:41 +0000 (11:11 -0700)
Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
qa/tasks/dnsmasq.py

index 7f675f3bc29f04b2ef3927634dea756e6cda6a6f..764d742fa7183030fa01e5596a9ee9cf67b6d7e2 100644 (file)
@@ -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: