Skip to content
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

onevnet update (from sunstone) may cause unnecessary error #6367

Closed
3 tasks
paczerny opened this issue Oct 25, 2023 · 1 comment · Fixed by OpenNebula/docs#2728
Closed
3 tasks

onevnet update (from sunstone) may cause unnecessary error #6367

paczerny opened this issue Oct 25, 2023 · 1 comment · Fixed by OpenNebula/docs#2728

Comments

@paczerny
Copy link
Member

Description
If Virtual Network has has empty attributes like PHYDEV and VLAN_ID. Update from Sunstone doesn't include these empty values, this is detected as change in the Network, which needs nic-update action. This action may fail because of empty PHYDEV

To Reproduce

$ cat vnet.tmpl
NAME = internal
BRIDGE = "virbr0"
BRIDGE_TYPE = "linux"
DNS = "8.8.8.8"
GATEWAY = "192.168.122.1"
PHYDEV = ""
VN_MAD = "fw"
AR=[
    TYPE = "IP4",
    IP   = "192.168.122.150",
    SIZE = "10"
]
$ onevnet instantiate vnet.tmpl

Attach the Network to running VM.
In Sunstone go to Virtual Network and trigger update without modifying any value.
The Network will change to ERROR state
In oned.log you should see error

Message received: UPDATENIC FAILURE 1 0  fw: ERROR: update_nic: Command "sudo -n ip link set nomaster" failed. ERROR: update_nic: Not enough information: "dev" argument is required. Not enough information: "dev" argument is required. ExitCode: 255

Expected behavior
Avoid unnecessary calls to nic-update. onevnet update which doesn't change any value should not cause network error.

Details

  • Affected Component: Sunstone, oned, network drivers
  • Version: 6.6+

Additional context
Should be solved in two steps:

  • The network driver should check the PHYDEV attribute is not empty
  • Better detection of changed attributes in VirtualNetwork::set_updated_attributes

Progress Status

  • Code committed
  • Testing - QA
  • Documentation (Release notes - resolved issues, compatibility, known issues)
@paczerny
Copy link
Member Author

Link to forum thread, which reported the issue

paczerny added a commit to OpenNebula/docs that referenced this issue Oct 26, 2023
paczerny added a commit to OpenNebula/docs that referenced this issue Oct 26, 2023
rsmontero pushed a commit to OpenNebula/docs that referenced this issue Oct 26, 2023
feldsam pushed a commit to FELDSAM-INC/one that referenced this issue Nov 2, 2023
rsmontero added a commit that referenced this issue Nov 8, 2023
Related to issue #6367, PHYDEV maybe an empry string. This commit adds
an additional sanity check on PHYDEV to skip any configuration if it is
empty
rsmontero pushed a commit that referenced this issue Mar 11, 2024
rsmontero added a commit that referenced this issue Mar 11, 2024
Related to issue #6367, PHYDEV maybe an empry string. This commit adds
an additional sanity check on PHYDEV to skip any configuration if it is
empty

(cherry picked from commit 2808f43)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment