]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks/cephfs/mount.py: try to flush the stale ceph-brx dev info
authorXiubo Li <xiubli@redhat.com>
Tue, 2 Jun 2020 14:32:25 +0000 (10:32 -0400)
committerXiubo Li <xiubli@redhat.com>
Wed, 29 Jul 2020 00:41:02 +0000 (08:41 +0800)
Once we have run the test cases and the ceph-brx bridge is setup,
it will save the config in "/etc/sysconfig/network-scripts/ifcfg-ceph-brx"
or somewhere else. It will be kept after the ceph-brx bridge removed.
So next time once the ceph-brx bridge is created or added, it will
read the config from it, then when we config it again we will get
error like:

    "RTNETLINK answers: File exists"

Here we need to flush it before config it.

Fixes: https://tracker.ceph.com/issues/45817
Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/mount.py

index f369bc5d7736b0af50d910a3c9d0c8a28d942030..c8ed54fb8209932ff5073bddb22c5fa0465ff9a3 100644 (file)
@@ -104,6 +104,7 @@ class CephFSMount(object):
             self.run_shell_payload(f"""
                 set -e
                 sudo ip link add name ceph-brx type bridge
+                sudo ip addr flush dev ceph-brx
                 sudo ip link set ceph-brx up
                 sudo ip addr add {ip}/{mask} brd {brd} dev ceph-brx
             """, timeout=(5*60), omit_sudo=False, cwd='/')