one icon indicating copy to clipboard operation
one copied to clipboard

Private bridge virtual network not assigned IPv4

Open Aetylus opened this issue 10 months ago • 0 comments

Description

When creating a private bridge virtual network with a network address, mask, and gateway set, and attaching it to a VM, the bridge isn't created with the IP address set for the virtual network.

This makes the VMs unavailable from the front-end and host nodes to SSH into.

To Reproduce

Using the following virtual network template:

NAME = "Private"

BRIDGE = "onebr0"
VN_MAD = "bridge"

GATEWAY = "192.168.123.1"
NETWORK_ADDRESS = "192.168.123.1"
NETWORK_MASK = "255.255.255.0"

AR=[ TYPE = "IP4", IP = "192.168.123.2", SIZE = "253" ]

As oneadmin on the front-end server:

$ onevnet create <template-name> -c <cluster-id>
$ onevm nic-attach <vm-id> --network <nic-id>

On host node:

$ ip addr
[...]
25: onebr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 7a:8d:a3:01:4c:85 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::788d:a3ff:fe01:4c85/64 scope link
       valid_lft forever preferred_lft forever

Expected behavior

I would expect to see the bridge with the IP address and subnet mask set in the virtual network:

$ ip addr
[...]
25: onebr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 7a:8d:a3:01:4c:85 brd ff:ff:ff:ff:ff:ff
    inet 192.168.123.1/24 scope global onebr0
       valid_lft forever preferred_lft forever
    inet6 fe80::788d:a3ff:fe01:4c85/64 scope link
       valid_lft forever preferred_lft forever

Details

  • Affected Component: Virtual Network
  • Hypervisor: kvm
  • Version: 6.10.0.1

Additional context

The behavior is also the same when performed through Sunstone.

The expected solution for working SSH access can be achieved by manually adding the address to the bridge on the node:

$ ip address add dev onebr0 192.168.123.1/24

Aetylus avatar Apr 12 '25 08:04 Aetylus