From: Xiubo Li Date: Tue, 2 Jun 2020 14:32:25 +0000 (-0400) Subject: qa/tasks/cephfs/mount.py: try to flush the stale ceph-brx dev info X-Git-Tag: v16.1.0~1551^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=438aaf851f7e777771cfde75bfc28b92ba4d3b75;p=ceph.git qa/tasks/cephfs/mount.py: try to flush the stale ceph-brx dev info 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 --- diff --git a/qa/tasks/cephfs/mount.py b/qa/tasks/cephfs/mount.py index f369bc5d7736..c8ed54fb8209 100644 --- a/qa/tasks/cephfs/mount.py +++ b/qa/tasks/cephfs/mount.py @@ -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='/')