Skip to content

kvm, ui: fix interface when using vlan subnet for storage traffic type #11245

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 30, 2025

Conversation

shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Jul 18, 2025

Description

Fixes #7816

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to change)
  • New feature (non-breaking change which adds functionality)
  • Bug fix (non-breaking change which fixes an issue)
  • Enhancement (improves an existing feature and functionality)
  • Cleanup (Code refactoring and cleanup, that may add test cases)
  • build/CI
  • test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

Screenshots (if appropriate):

How Has This Been Tested?

After adding the changes I was able to see new bridge with vlan tag getting created,

# brctl show
bridge name	bridge id		STP enabled	interfaces
breth0-2500		8000.1e0050000c49	no		eth0.2500
							vnet17
breth1-51		8000.020073851163	no		eth1.51
							vnet16
							vnet2
cloud0		8000.fe00a9fe46d2	no		vnet0
							vnet14
cloudbr0		8000.1e0050000c49	yes		eth0
							vnet1
							vnet15
cloudbr1		8000.020073851163	yes		eth1

UI shows VLAN correctly,

image

How did you try to break this feature and the system with this change?

Fixes apache#7816

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Copy link

codecov bot commented Jul 18, 2025

Codecov Report

❌ Patch coverage is 0% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 15.17%. Comparing base (6e19c07) to head (720ad1b).
⚠️ Report is 33 commits behind head on 4.19.

Files with missing lines Patch % Lines
...cloud/hypervisor/kvm/resource/BridgeVifDriver.java 0.00% 7 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##               4.19   #11245    +/-   ##
==========================================
  Coverage     15.17%   15.17%            
- Complexity    11349    11363    +14     
==========================================
  Files          5416     5415     -1     
  Lines        475621   476037   +416     
  Branches      58054    58117    +63     
==========================================
+ Hits          72168    72246    +78     
- Misses       395380   395708   +328     
- Partials       8073     8083    +10     
Flag Coverage Δ
uitests 4.28% <ø> (+<0.01%) ⬆️
unittests 15.90% <0.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sureshanaparti sureshanaparti added this to the 4.19.4 milestone Jul 23, 2025
@sureshanaparti sureshanaparti linked an issue Jul 25, 2025 that may be closed by this pull request
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where VLAN subnet configurations for storage traffic type were not properly handled in both the KVM hypervisor and the UI. The fix ensures that VLAN-tagged storage networks are correctly created and displayed.

  • Updates the UI to display the correct VLAN field for storage IP ranges
  • Adds VLAN support for storage traffic type in the KVM bridge VIF driver

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
ui/src/views/infra/network/IpRangesTabStorage.vue Changes dataIndex from 'vlanid' to 'vlan' to fix VLAN display in storage IP ranges table
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/BridgeVifDriver.java Adds VLAN handling logic for storage traffic type to create proper VLAN bridges

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clgtm

@sureshanaparti
Copy link
Contributor

@shwstppr is this ready for review/test?

Copy link
Contributor

@Pearl1594 Pearl1594 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

code lgtm

@shwstppr
Copy link
Contributor Author

@sureshanaparti this would need testing with the specific setup. I need to check with @rajujith about that. Will update you next week

@shwstppr
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 14405

Copy link

@rajujith rajujith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Based on my review of the fix, it works fine for VLAN. @shwstppr informed that this works for VLAN but if we need to support VXLAN that could be done separately.
Screenshot 2025-07-30 at 10 47 51 AM

mysql> select * from dc_storage_network_ip_range;
+----+--------------------------------------+-------------+-------------+-----------+------+---------------+----------------+--------+------------+
| id | uuid                                 | start_ip    | end_ip      | gateway   | vlan | netmask       | data_center_id | pod_id | network_id |
+----+--------------------------------------+-------------+-------------+-----------+------+---------------+----------------+--------+------------+
|  2 | 24b29069-e174-4d3b-bdc6-72fc71b49c44 | 10.1.96.201 | 10.1.96.205 | 10.1.96.1 |   54 | 255.255.240.0 |              1 |      1 |        203 |
+----+--------------------------------------+-------------+-------------+-----------+------+---------------+----------------+--------+------------+

virsh domiflist s-276-VM
 Interface   Type     Source      Model    MAC
--------------------------------------------------------------
 vnet10      bridge   cloud0      virtio   0e:00:a9:fe:8d:f0
 vnet11      bridge   cloudbr0    virtio   1e:00:5d:00:00:30
 vnet12      bridge   breth1-51   virtio   1e:00:0f:00:00:01
 vnet13      bridge   breth1-54   virtio   1e:00:1b:00:00:44

 ip link show master breth1-54
24: eth1.54@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master breth1-54 state UP mode DEFAULT group default qlen 1000
    link/ether 02:00:72:04:11:7d brd ff:ff:ff:ff:ff:ff
29: vnet13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master breth1-54 state UNKNOWN mode DEFAULT group default qlen 1000
    link/ether fe:00:1b:00:00:44 brd ff:ff:ff:ff:ff:ff


 root@s-276-VM:~# ip -brief addr show dev eth3
eth3             UP             10.1.96.203/20
root@s-276-VM:~# mount -t nfs,nfs4
10.1.96.101:/mnt/NFS/Secondary1 on /mnt/SecStorage/15109707-c712-3a8c-9b60-be7f1fdd4710 type nfs4 (rw,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,acdirmin=0,acdirmax=0,soft,proto=tcp,timeo=133,retrans=2147483647,sec=sys,clientaddr=10.1.96.203,local_lock=none,addr=10.1.96.101)

@shwstppr shwstppr marked this pull request as ready for review July 30, 2025 05:31
@sureshanaparti sureshanaparti merged commit 7506a54 into apache:4.19 Jul 30, 2025
25 of 26 checks passed
@DaanHoogland DaanHoogland deleted the fix-storagetraffic-intf branch July 30, 2025 06:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Storage VLAN configuration on KVM
6 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy