Skip to content

server: use network details from nic network#4772

Merged
yadvr merged 1 commit intoapache:4.14from
shapeblue:fix-listnics-bug-4770
Mar 11, 2021
Merged

server: use network details from nic network#4772
yadvr merged 1 commit intoapache:4.14from
shapeblue:fix-listnics-bug-4770

Conversation

@shwstppr
Copy link
Contributor

@shwstppr shwstppr commented Mar 9, 2021

Description

Fixes #4770

Uses network details from nic's network instead of details from virtual machine.

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)

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?

With a VMware env, zone with advanced networking.

Networks:

(localcloud) SBCM5> > list networks id=1e9022b5-173e-43ee-81ef-6c8ad6b7322a filter=id,name,traffictype,type
{
  "count": 1,
  "network": [
    {
      "id": "1e9022b5-173e-43ee-81ef-6c8ad6b7322a",
      "name": "testl2",
      "traffictype": "Guest",
      "type": "L2"
    }
  ]
}

Before changes - both nics show same network anem, traffic type and guest type:

(localcloud) SBCM5> > list nics virtualmachineid=cd54a0b9-36ab-41c0-a1e5-650a5ec9ccd1 
{
  "count": 2,
  "nic": [
    {
      "broadcasturi": "vlan://1343",
      "deviceid": "0",
      "extradhcpoption": [],
      "gateway": "10.1.1.1",
      "id": "0042bd3f-8b1d-48cf-8265-b7dadb8e8fb8",
      "ipaddress": "10.1.1.43",
      "isdefault": true,
      "isolationuri": "vlan://1343",
      "macaddress": "02:00:7c:87:00:18",
      "netmask": "255.255.255.0",
      "networkid": "5ae167c5-6d8f-439b-b2de-e9413637f129",
      "networkname": "testiso",
      "traffictype": "Guest",
      "type": "Isolated",
      "virtualmachineid": "cd54a0b9-36ab-41c0-a1e5-650a5ec9ccd1"
    },
    {
      "broadcasturi": "vlan://1354",
      "deviceid": "1",
      "extradhcpoption": [],
      "id": "a8615986-2b79-470c-bd89-8dbbfbd0db0b",
      "isdefault": false,
      "isolationuri": "vlan://1354",
      "macaddress": "02:00:56:67:00:03",
      "networkid": "1e9022b5-173e-43ee-81ef-6c8ad6b7322a",
      "networkname": "testiso",
      "traffictype": "Guest",
      "type": "Isolated",
      "virtualmachineid": "cd54a0b9-36ab-41c0-a1e5-650a5ec9ccd1"
    }
  ]
}

After changes - correct network details returned:

(localcloud) SBCM5> > list nics virtualmachineid=cd54a0b9-36ab-41c0-a1e5-650a5ec9ccd1 
{
  "count": 2,
  "nic": [
    {
      "broadcasturi": "vlan://1343",
      "deviceid": "0",
      "extradhcpoption": [],
      "gateway": "10.1.1.1",
      "id": "0042bd3f-8b1d-48cf-8265-b7dadb8e8fb8",
      "ipaddress": "10.1.1.43",
      "isdefault": true,
      "isolationuri": "vlan://1343",
      "macaddress": "02:00:7c:87:00:18",
      "netmask": "255.255.255.0",
      "networkid": "5ae167c5-6d8f-439b-b2de-e9413637f129",
      "networkname": "testiso",
      "traffictype": "Guest",
      "type": "Isolated",
      "virtualmachineid": "cd54a0b9-36ab-41c0-a1e5-650a5ec9ccd1"
    },
    {
      "broadcasturi": "vlan://1354",
      "deviceid": "1",
      "extradhcpoption": [],
      "id": "a8615986-2b79-470c-bd89-8dbbfbd0db0b",
      "isdefault": false,
      "isolationuri": "vlan://1354",
      "macaddress": "02:00:56:67:00:03",
      "networkid": "1e9022b5-173e-43ee-81ef-6c8ad6b7322a",
      "networkname": "testl2",
      "traffictype": "Guest",
      "type": "L2",
      "virtualmachineid": "cd54a0b9-36ab-41c0-a1e5-650a5ec9ccd1"
    }
  ]
}

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr shwstppr added this to the 4.15.1.0 milestone Mar 9, 2021
Copy link
Member

@weizhouapache weizhouapache 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 shwstppr changed the base branch from master to 4.14 March 9, 2021 09:06
@shwstppr
Copy link
Contributor Author

shwstppr commented Mar 9, 2021

@blueorangutan package

@blueorangutan
Copy link

@shwstppr a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress.

@blueorangutan
Copy link

Packaging result: ✔centos7 ✖centos8 ✔debian. JID-2888

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 57

@blueorangutan
Copy link

Packaging result: ✔️ centos7 ✖️ centos8 ✔️ debian. SL-JID 61

@shwstppr
Copy link
Contributor Author

shwstppr commented Mar 9, 2021

@blueorangutan test

@blueorangutan
Copy link

@shwstppr a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-3680)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 34628 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4772-t3680-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_kubernetes_supported_versions.py
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Intermittent failure detected: /marvin/tests/smoke/test_hostha_kvm.py
Smoke tests completed. 82 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 88.47 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 48.75 test_vm_life_cycle.py

@blueorangutan
Copy link

Trillian test result (tid-3682)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 30683 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr4772-t3682-kvm-centos7.zip
Intermittent failure detected: /marvin/tests/smoke/test_vm_life_cycle.py
Smoke tests completed. 82 look OK, 1 have error(s)
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_migrate_VM_and_root_volume Error 58.43 test_vm_life_cycle.py
test_02_migrate_VM_with_two_data_disks Error 49.07 test_vm_life_cycle.py

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.

code LGTM

@yadvr yadvr merged commit 025b654 into apache:4.14 Mar 11, 2021
nlgordon pushed a commit to ippathways/cloudstack that referenced this pull request Aug 2, 2022
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
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.

listNics api response parameter type is incorrect

5 participants