Skip to content

Update extraconfig for platform param in xen/xcpng#9248

Merged
sureshanaparti merged 4 commits into
apache:4.18from
shapeblue:xcpng-platform-extraconfig-issue
Jun 18, 2024
Merged

Update extraconfig for platform param in xen/xcpng#9248
sureshanaparti merged 4 commits into
apache:4.18from
shapeblue:xcpng-platform-extraconfig-issue

Conversation

@sureshanaparti

@sureshanaparti sureshanaparti commented Jun 13, 2024

Copy link
Copy Markdown
Contributor

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

  • 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

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • Major
  • Minor

Bug Severity

  • BLOCKER
  • Critical
  • Major
  • Minor
  • Trivial

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.

  • enable.additional.vm.configuration to true
  • allow.additional.vm.configuration.list.xenserver to platform:exp-nested-hvm
(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

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM didn't test it

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

code lgtm

@DaanHoogland DaanHoogland left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

clgtm

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

codecov Bot commented Jun 13, 2024

Copy link
Copy Markdown

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.

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 ⚠️
Additional details and impacted files
@@            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 Coverage Δ
unittests 12.24% <45.45%> (+<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.

@blueorangutan

Copy link
Copy Markdown

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

@DaanHoogland

Copy link
Copy Markdown
Contributor

@blueorangutan test alma9 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti
sureshanaparti marked this pull request as draft June 13, 2024 20:19
@sureshanaparti
sureshanaparti marked this pull request as ready for review June 14, 2024 04:10
@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

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

@yadvr yadvr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM - didn't test it

@shwstppr shwstppr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code LGTM. MInor comment on adding unit test

@blueorangutan

Copy link
Copy Markdown

[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

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan test alma9 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@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

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

[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

}

try {
// param with '_'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need this comment? it is a bit unclear if this is enforced or a contextual condition or ...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

just to keep as note. these params are with underscore, as the hypens were replaced with underscores.

}

try {
// map-param param with '_'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

do we need this comment? what does it mean?

@DaanHoogland

Copy link
Copy Markdown
Contributor

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

@sureshanaparti
sureshanaparti merged commit cc52b38 into apache:4.18 Jun 18, 2024
@DaanHoogland
DaanHoogland deleted the xcpng-platform-extraconfig-issue branch June 18, 2024 20:02
DaanHoogland added a commit that referenced this pull request Jun 19, 2024
* 4.18:
  Update extraconfig for platform param in xen/xcpng (#9248)
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 24, 2024
* Update extraconfig for platform param in xen/xcpng

* Fix map param key, not to replace '-' with '_' (replace only applicable to param / map-param)

* Added unit tests

* Add license for tests file
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jun 24, 2024
* 4.18:
  Update extraconfig for platform param in xen/xcpng (apache#9248)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

extraconfig argument in update/deploy virtualmachine does not append existing fields

6 participants