Skip to content

Error creating VLAN #9905

Closed
Closed

Description

@miloserdoff
ISSUE TYPE
  • Other
COMPONENT NAME
VLAN
CLOUDSTACK VERSION
4.18.2.4
CONFIGURATION
OS / ENVIRONMENT
SUMMARY
STEPS TO REPRODUCE

EXPECTED RESULTS

ACTUAL RESULTS
When creating a VM from a disk image, Cloudstack cannot create a VLAN

2024-11-08 06:44:20,824 WARN [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-5:null) (logid:d046b384) InternalErrorException
com.cloud.exception.InternalErrorException: Failed to create vnet 803

Activity

  1. boring-cyborg commented on Nov 8, 2024

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template!

  2. DaanHoogland commented on Nov 8, 2024

    @DaanHoogland
    Contributor

    @miloserdoff can you add some more information, please?

    What ui-function or API are you using? Did you convert a disk image to a template or upload a template, etc?

    Do you see just this WARN message or are there more relevant log messages?
    .
    thanks,

  3. weizhouapache commented on Nov 8, 2024

    @weizhouapache
    Member

    @miloserdoff
    can you share the full agent.log around it ?

  4. miloserdoff commented on Nov 8, 2024

    @miloserdoff
    Author

    @weizhouapache @DaanHoogland

    Thanks for the reply. I'm using a pre-built CentOS image, but it's not the image itself.

    My Cloudstack Agent log file is throwing an error, as I understand it, when trying to create a virtual router.

    2024-11-08 08:34:24,675 WARN [resource.wrapper.LibvirtStartCommandWrapper] (agentRequest-Handler-1:null) (logid:cbb2042c) InternalErrorException
    com.cloud.exception.InternalErrorException: Failed to create vnet 761: Error: argument "enp129s0f1np1.761" is wrong: "name" not a valid ifname/usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvlan.sh: line 37: /proc/sys/net/ipv6
    /conf/enp129s0f1np1.761/disable_ipv6: No such file or directoryCannot find device "enp129s0f1np1.761"Failed to create vlan 761 on pif: enp129s0f1np1.
    at com.cloud.hypervisor.kvm.resource.BridgeVifDriver.createVnet(BridgeVifDriver.java:320)
    at com.cloud.hypervisor.kvm.resource.BridgeVifDriver.createVnetBr(BridgeVifDriver.java:302)
    at com.cloud.hypervisor.kvm.resource.BridgeVifDriver.plug(BridgeVifDriver.java:222)
    at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.createVif(LibvirtComputingResource.java:3277)
    at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.createVifs(LibvirtComputingResource.java:2891)
    at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:84)
    at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtStartCommandWrapper.execute(LibvirtStartCommandWrapper.java:49)
    at com.cloud.hypervisor.kvm.resource.wrapper.LibvirtRequestWrapper.execute(LibvirtRequestWrapper.java:78)
    at com.cloud.hypervisor.kvm.resource.LibvirtComputingResource.executeRequest(LibvirtComputingResource.java:1869)
    at com.cloud.agent.Agent.processRequest(Agent.java:663)
    at com.cloud.agent.Agent$AgentRequestHandler.doTask(Agent.java:1086)
    at com.cloud.utils.nio.Task.call(Task.java:83)
    at com.cloud.utils.nio.Task.call(Task.java:29)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)

    I also attach the output of the "ip a" command to demonstrate the network configuration

    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
    valid_lft forever preferred_lft forever
    2: enxbe3af2b6059f: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether be:3a:f2:b6:05:9f brd ff:ff:ff:ff:ff:ff
    3: enp129s0f0np0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 7c:c2:55:32:00:90 brd ff:ff:ff:ff:ff:ff
    4: enp129s0f1np1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master cloudbr0 state UP group default qlen 1000
    link/ether 7c:c2:55:32:00:91 brd ff:ff:ff:ff:ff:ff
    5: cloudbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 42:c1:eb:1f:33:33 brd ff:ff:ff:ff:ff:ff
    inet 192.168.127.57/24 brd 192.168.127.255 scope global cloudbr0
    valid_lft forever preferred_lft forever
    inet6 fe80::40c1:ebff:fe1f:3333/64 scope link
    valid_lft forever preferred_lft forever
    6: cloud0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 82:8d:f9:c3:b0:e0 brd ff:ff:ff:ff:ff:ff
    inet 169.254.0.1/16 scope global cloud0
    valid_lft forever preferred_lft forever
    inet6 fe80::808d:f9ff:fec3:b0e0/64 scope link
    valid_lft forever preferred_lft forever
    8: vnet0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cloud0 state UNKNOWN group default qlen 1000
    link/ether fe:00:a9:fe:ec:24 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc00:a9ff:fefe:ec24/64 scope link
    valid_lft forever preferred_lft forever
    10: vnet3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cloudbr0 state UNKNOWN group default qlen 1000
    link/ether fe:00:91:00:00:06 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc00:91ff:fe00:6/64 scope link
    valid_lft forever preferred_lft forever
    11: vnet5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cloudbr0 state UNKNOWN group default qlen 1000
    link/ether fe:00:b6:00:00:0c brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc00:b6ff:fe00:c/64 scope link
    valid_lft forever preferred_lft forever
    13: vnet6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master cloud0 state UNKNOWN group default qlen 1000
    link/ether fe:00:a9:fe:3f:52 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::fc00:a9ff:fefe:3f52/64 scope link
    valid_lft forever preferred_lft forever

  5. added this to the 4.19.2.0 milestone on Nov 8, 2024
  6. rajujith commented on Nov 11, 2024

    @rajujith
    Contributor

    @miloserdoff Could you try changing the interface names to enp1, enx0 ?

  7. miloserdoff commented on Nov 11, 2024

    @miloserdoff
    Author

    @rajujith Hello. I changed the interface names and decided to look at the Cloudstack Agent log. It gave me an error:

    com.cloud.exception.InternalErrorException: Failed to create vnet 805: Cannot find device "br-805" /usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvlan.sh: line 37: /proc/sys/net/ipv6/conf/br-805.805/disable_ipv6: No such file or directory Cannot find device "br-805.805" Failed to create vlan 805 on pif: br-805.

  8. rajujith commented on Nov 12, 2024

    @rajujith
    Contributor

    @miloserdoff can you check for any stale bridge configurations on the host and fix them?
    Below is an example that works properly :

    /usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvlan.sh -v 1556 -p eth1 -b breth1-1556 -o add

    the -p should be passed with the physical interface name but in your log, its having a bridge interface.

    "Usage: %s: -o <op>(add | delete) -v <vlan id> -p <pif> -b <bridge name> -d <delete bridge>(true | false)\n"

  9. weizhouapache commented on Nov 12, 2024

    @weizhouapache
    Member

    @miloserdoff can you check for any stale bridge configurations on the host and fix them? Below is an example that works properly :

    /usr/share/cloudstack-common/scripts/vm/network/vnet/modifyvlan.sh -v 1556 -p eth1 -b breth1-1556 -o add

    the -p should be passed with the physical interface name but in your log, its having a bridge interface.

    "Usage: %s: -o <op>(add | delete) -v <vlan id> -p <pif> -b <bridge name> -d <delete bridge>(true | false)\n"

    maybe there is no physical nic associated to the bridge ?

  10. bl0way commented on Dec 14, 2024

    @bl0way

    Hello,

    I got the same issue (fresh 4.20.0 cloudstack installation).
    This comes from the name of the interface that is too long. Linux interfaces should be 15 characters maximum. That is why the ip command is failing in the cloudstack script.
    In this case enp129s0f1np1.761 is 17 characters.

    I fixed it by renaming interfaces.

  11. aki-luxor commented on Jan 14, 2025

    @aki-luxor

    Hello,

    I got the same issue (fresh 4.20.0 cloudstack installation). This comes from the name of the interface that is too long. Linux interfaces should be 15 characters maximum. That is why the ip command is failing in the cloudstack script. In this case enp129s0f1np1.761 is 17 characters.

    I fixed it by renaming interfaces.

    How did you change the interface name? for me after changing interface name its getting new error. Ubuntu 22.04.

    Pool-196:[ctx-57c05f18]) (logid:5feaecac) Failed to handle host connection: com.cloud.exception.ConnectionException: Incorrect Network setup on agent, Reinitialize agent after network names are setup, details : Can not find network: br1

  12. rajujith commented on Jan 15, 2025

    @rajujith
    Contributor

    @aki-luxor here are some places you can cross-check.

    • agent.properties file on the KVM host containing information on the bridges used for the cloudstack zone. path: /etc/cloudstack/agent/agent.properties
    • The current bridge configuration on the KVM host.
    • netplan configuration
    • CloudStack zone traffic labels for KVM
  13. locked and limited conversation to collaborators on Jan 15, 2025
  14. converted this issue into a discussion #10190 on Jan 15, 2025
  15. removed this from the 4.19.2 milestone on Jan 15, 2025
  16. added this to the unplanned milestone on Sep 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions