apache / cloudstack

Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform
https://cloudstack.apache.org/
Apache License 2.0
1.83k stars 1.07k forks source link

Update extraconfig for platform param in xen/xcpng #9248

Closed sureshanaparti closed 2 weeks ago

sureshanaparti commented 2 weeks ago

Description

This PR updates extraconfig for platform param in xen/xcpng. Also, fixed map param key, not to replace '-' with '_' (replace only applicable to param / map-param).

Fixes #8847

Types of changes

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

Bug Severity

Screenshots (if appropriate):

Before Fix:

XCPNG-VM-PlatformConfig-BeforeFix

After Fix:

XCPNG-VM-PlatformConfig-AfterFix-Updated

[Dev] VM is_a_template param check (in recordMap):

vm-param-is_a_template

How Has This Been Tested?

Deployed VM with platform extraconfig after setting the global config.

(testenv) 🐱 > deploy virtualmachine templateid=da64d661-2991-11ef-81fa-1e001600014a serviceofferingid=3c6ff3e9-4cb2-4aa6-81a1-5733272a5a4f zoneid=e6ff5d2b-46b4-4d41-b28b-704365edcf3b name=TestVM04 extraconfig=platform%3Aexp-nested-hvm%3Dtrue
[ref-trl-6837-x-M7-suresh-anaparti-xs1 ~]# xe vm-list params=platform uuid=44d17a76-b4fa-209f-0ee9-171fe098e144
platform (MRW)    : timeoffset: 0; device-model: qemu-upstream-compat; vga: std; videoram: 8; apic: true; viridian: false; pae: true; acpi: 1; hpet: true; secureboot: false; exp-nested-hvm: true; nx: true
(testenv) 🐱 > list virtualmachines id=353ef820-e83e-455a-b2e2-1003cb1bd459 
{
  "count": 1,
  "virtualmachine": [
    {
      "account": "admin",
      "affinitygroup": [],
      "cpunumber": 1,
      "cpuspeed": 500,
      "created": "2024-06-13T20:38:25+0000",
      "details": {
        "cpuOvercommitRatio": "2.0",
        "extraconfig-1": "platform:exp-nested-hvm=true",
        "hypervisortoolsversion": "xenserver56",
        "memoryOvercommitRatio": "1.0",
        "platform": "device-model:qemu-upstream-compat;vga:std;videoram:8;apic:true;viridian:false;pae:true;acpi:1;hpet:true;secureboot:false;exp-nested-hvm:true;nx:true"
      },
      "displayname": "TestVM04",
      "displayvm": true,
      "domain": "ROOT",
      "domainid": "da608984-2991-11ef-81fa-1e001600014a",
      "guestosid": "da857fa2-2991-11ef-81fa-1e001600014a",
      "haenable": false,
      "hasannotations": false,
      "hostcontrolstate": "Enabled",
      "hostid": "cf3eb7da-3721-4ea4-8112-63a736690db3",
      "hostname": "ref-trl-6837-x-M7-suresh-anaparti-xs1",
      "hypervisor": "XenServer",
      "id": "353ef820-e83e-455a-b2e2-1003cb1bd459",
      "instancename": "i-2-7-VM",
      "isdynamicallyscalable": false,
      "lastupdated": "2024-06-13T20:42:33+0000",
      "memory": 512,
      "name": "TestVM04",
      "nic": [
        {
          "broadcasturi": "vlan://2534",
          "deviceid": "0",
          "extradhcpoption": [],
          "gateway": "10.1.1.1",
          "id": "9d1ac630-744e-4276-9199-f168b22850a5",
          "ipaddress": "10.1.1.80",
          "isdefault": true,
          "isolationuri": "vlan://2534",
          "macaddress": "02:01:00:cc:00:05",
          "netmask": "255.255.255.0",
          "networkid": "c0d9b84f-eddc-4af8-b918-a42f9b04512f",
          "networkname": "TestNW01",
          "secondaryip": [],
          "traffictype": "Guest",
          "type": "Isolated"
        }
      ],
      "osdisplayname": "CentOS 5.6 (64-bit)",
      "ostypeid": "da857fa2-2991-11ef-81fa-1e001600014a",
      "passwordenabled": false,
      "pooltype": "NetworkFilesystem",
      "receivedbytes": 0,
      "rootdeviceid": 0,
      "rootdevicetype": "ROOT",
      "securitygroup": [],
      "sentbytes": 0,
      "serviceofferingid": "3c6ff3e9-4cb2-4aa6-81a1-5733272a5a4f",
      "serviceofferingname": "Small Instance",
      "state": "Running",
      "tags": [],
      "templatedisplaytext": "CentOS 5.6(64-bit) no GUI (XenServer)",
      "templateid": "da64d661-2991-11ef-81fa-1e001600014a",
      "templatename": "CentOS 5.6(64-bit) no GUI (XenServer)",
      "userid": "fb8a8caa-2991-11ef-81fa-1e001600014a",
      "username": "admin",
      "zoneid": "e6ff5d2b-46b4-4d41-b28b-704365edcf3b",
      "zonename": "ref-trl-6837-x-M7-suresh-anaparti"
    }
  ]
}

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

sureshanaparti commented 2 weeks ago

@blueorangutan package

DaanHoogland commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@DaanHoogland 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.

codecov[bot] commented 2 weeks ago

Codecov Report

Attention: Patch coverage is 45.45455% with 12 lines in your changes missing coverage. Please review.

Project coverage is 12.24%. Comparing base (4e7c668) to head (b0ef6b9). Report is 2 commits behind head on 4.18.

:exclamation: Current head b0ef6b9 differs from pull request most recent head bc8ff74

Please upload reports for the commit bc8ff74 to get more accurate results.

Files Patch % Lines
...ypervisor/xenserver/ExtraConfigurationUtility.java 45.45% 10 Missing and 2 partials :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## 4.18 #9248 +/- ## ========================================== Coverage 12.23% 12.24% - Complexity 9289 9292 +3 ========================================== Files 4698 4699 +1 Lines 414257 414289 +32 Branches 52531 53209 +678 ========================================== + Hits 50699 50720 +21 - Misses 357258 357266 +8 - Partials 6300 6303 +3 ``` | [Flag](https://app.codecov.io/gh/apache/cloudstack/pull/9248/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/apache/cloudstack/pull/9248/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `12.24% <45.45%> (+<0.01%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

blueorangutan commented 2 weeks ago

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

DaanHoogland commented 2 weeks ago

@blueorangutan test alma9 xcpng82

blueorangutan commented 2 weeks ago

@DaanHoogland a [SL] Trillian-Jenkins test job (alma9 mgmt + xcpng82) has been kicked to run smoke tests

sureshanaparti commented 2 weeks ago

@blueorangutan package

sureshanaparti commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@sureshanaparti 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 commented 2 weeks ago

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

blueorangutan commented 2 weeks ago

[SF] Trillian test result (tid-10438) Environment: xcpng82 (x2), Advanced Networking with Mgmt server a9 Total time taken: 64509 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9248-t10438-xcpng82.zip Smoke tests completed. 106 look OK, 4 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_volumes_metrics_history Failure 178.87 test_metrics_api.py
test_01_non_strict_host_anti_affinity Error 209.06 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 123.85 test_nonstrict_affinity_group.py
test_deploy_vm_with_registered_userdata Error 813.20 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allow Error 834.72 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_append Error 837.15 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_params Error 831.51 test_register_userdata.py
test_01_deploy_vm_on_specific_host Error 0.14 test_vm_deployment_planner.py
test_02_deploy_vm_on_specific_cluster Error 0.11 test_vm_deployment_planner.py
test_03_deploy_vm_on_specific_pod Error 0.15 test_vm_deployment_planner.py
test_04_deploy_vm_on_host_override_pod_and_cluster Error 0.18 test_vm_deployment_planner.py
test_05_deploy_vm_on_cluster_override_pod Error 0.13 test_vm_deployment_planner.py
sureshanaparti commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@sureshanaparti 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 commented 2 weeks ago

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

sureshanaparti commented 2 weeks ago

@blueorangutan test alma9 xcpng82

blueorangutan commented 2 weeks ago

@sureshanaparti a [SL] Trillian-Jenkins test job (alma9 mgmt + xcpng82) has been kicked to run smoke tests

sureshanaparti commented 2 weeks ago

@blueorangutan package

blueorangutan commented 2 weeks ago

@sureshanaparti 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 commented 2 weeks ago

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

blueorangutan commented 2 weeks ago

[SF] Trillian test result (tid-10456) Environment: xcpng82 (x2), Advanced Networking with Mgmt server a9 Total time taken: 65050 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr9248-t10456-xcpng82.zip Smoke tests completed. 107 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_list_volumes_metrics_history Failure 194.02 test_metrics_api.py
test_01_non_strict_host_anti_affinity Error 208.15 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 129.04 test_nonstrict_affinity_group.py
test_deploy_vm_with_registered_userdata Error 839.70 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_allow Error 821.20 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_override_policy_append Error 819.91 test_register_userdata.py
test_deploy_vm_with_registered_userdata_with_params Error 862.43 test_register_userdata.py
DaanHoogland commented 2 weeks ago

manually tested in a lab env according to @sureshanaparti description. @sureshanaparti merge at will, my comments about comments are not life threatening ;)