Skip to content

RTNETLINK answers: File exists\n'. cmd=ip link add inje-vms6-1-31 type veth peer name ddd8c3eth31_t #2467

@lguohan

Description

@lguohan

Description

Steps to reproduce the issue:
Not sure how to repro. but here is what I see.

once system in such bad states, all subsequent operations will fail. Need to improve vm_topology to handle such bad states gracefully.

lgh@jenkins-worker-19:/tmp$ cat vmtopology.exception.2020-11-05T12\:09\:10.471468.txt
Traceback (most recent call last):
  File "/tmp/ansible_vm_topology_payload_0e5muxs5/__main__.py", line 988, in main
    net.add_injected_fp_ports_to_docker()
  File "/tmp/ansible_vm_topology_payload_0e5muxs5/__main__.py", line 290, in add_injected_fp_ports_to_docker
    self.add_veth_if_to_docker(ext_if, int_if)
  File "/tmp/ansible_vm_topology_payload_0e5muxs5/__main__.py", line 383, in add_veth_if_to_docker
    VMTopology.cmd("ip link add %s type veth peer name %s" % (ext_if, t_int_if))
  File "/tmp/ansible_vm_topology_payload_0e5muxs5/__main__.py", line 694, in cmd
    raise Exception("ret_code=%d, error message=%s. cmd=%s" % (ret_code, stderr, cmdline))
Exception: ret_code=2, error message=b'RTNETLINK answers: File exists\n'. cmd=ip link add inje-vms6-1-31 type veth peer name ddd8c3eth31_t
lgh@jenkins-worker-19:/tmp$ ip link show | grep inj
2786824: ddd8c3eth31_t@inj-vms6-1-31: <BROADCAST,MULTICAST> mtu 9216 qdisc noop state DOWN mode DEFAULT group default qlen 1000
2786825: inj-vms6-1-31@ddd8c3eth31_t: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 9216 qdisc noqueue master ovs-system state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
2786826: ddd8c3eth30_t@inj-vms6-1-30: <BROADCAST,MULTICAST> mtu 9216 qdisc noop state DOWN mode DEFAULT group default qlen 1000
2786827: inj-vms6-1-30@ddd8c3eth30_t: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 9216 qdisc noqueue master ovs-system state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
2786828: ddd8c3eth29_t@inj-vms6-1-29: <BROADCAST,MULTICAST> mtu 9216 qdisc noop state DOWN mode DEFAULT group default qlen 1000
2786829: inj-vms6-1-29@ddd8c3eth29_t: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 9216 qdisc noqueue master ovs-system state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
2786830: ddd8c3eth28_t@inj-vms6-1-28: <BROADCAST,MULTICAST> mtu 9216 qdisc noop state DOWN mode DEFAULT group default qlen 1000
2786831: inj-vms6-1-28@ddd8c3eth28_t: <NO-CARRIER,BROADCAST,MULTICAST,UP,M-DOWN> mtu 9216 qdisc noqueue master ovs-system state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
600: inje-vms6-3-31@if599: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue master ovs-system state UP mode DEFAULT group default qlen 1000
602: inje-vms6-3-30@if601: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue master ovs-system state UP mode DEFAULT group default qlen 1000
604: inje-vms6-3-29@if603: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue master ovs-system state UP mode DEFAULT group default qlen 1000
606: inje-vms6-3-28@if605: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9216 qdisc noqueue master ovs-system state UP mode DEFAULT group default qlen 1000

Describe the results you received:

Describe the results you expected:

Additional information you deem important:

**Output of `show version`:**

```
(paste your output here)
```

**Attach debug file `sudo generate_dump`:**

```
(paste your output here)
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions