Skip to content

[XenServer/XCP-ng] Sync the 'platform' setting according to the 'cpu.corespersocket' setting#5892

Merged
sureshanaparti merged 3 commits into
apache:4.16from
shapeblue:cpucorespersocketfix
Feb 2, 2022
Merged

[XenServer/XCP-ng] Sync the 'platform' setting according to the 'cpu.corespersocket' setting#5892
sureshanaparti merged 3 commits into
apache:4.16from
shapeblue:cpucorespersocketfix

Conversation

@nvazquez

Copy link
Copy Markdown
Contributor

Description

The 'platform' setting is retrieved after a VM is stopped with the platform parameters obtained from Xen/XCP for a certain VM. If a user added the setting 'cpu.corespersocket', it was ignored and the setting was never applied as it was mutually exclusive with the platform 'setting'.

This PR fixes the previous behavior, in the following way:

  • If 'cpu.corespersocket'=X AND the 'platform' setting does not contain 'cores-per-socket' -> 'cores-per-socket:X' parameter is added to the 'platform' setting which is sent to Xen/XCP
  • If 'cpu.corespersocket'=X AND the 'platform' setting contains 'cores-per-socket:Y' -> The 'platform' setting is updated, containing: 'cores-per-socket:X'
  • If 'cpu.corespersocket' is not set, nothing changes

Fixes: #5695

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?

  • Deploy a VM using an offering with 2 CPUs (use >=2 CPUs for tests)
  • Stop VM -> Settings -> Check the 'platform' setting is visible and does not contain the 'cores-per-socket' parameter
  • Add the setting 'cpu.corespersocket' = 2 (CPU number must be a multiple of cores per socket)
  • Start VM -> Stop VM -> Check the 'platform' setting contains the parameter 'cores-per-socket:2'
  • Edit the setting 'cpu.corespersocket' = 1 (CPU number must be a multiple of cores per socket)
  • Start VM -> Stop VM -> Check the 'platform' setting contains the parameter 'cores-per-socket:1'

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@yadvr

yadvr commented Jan 24, 2022

Copy link
Copy Markdown
Member

2cents - could this VM property/setting bypass what an admin/operator may not intend? For example, if this setting is set on a template (vs global setting if any) and then bypassed by the user - could user benefit from this setting in a way that admin wouldn't intend to be used?

@nvazquez

nvazquez commented Jan 24, 2022

Copy link
Copy Markdown
Contributor Author

@rohityadavcloud the 'cores-per-socket' value could be bypassed or modified but it is restricted by the offering, since a VM won't start if the number of CPUs is not a multiple of the cores per socket number. I think perhaps the 'platform' setting could lead to unintended situations as it includes more information, for example:

device-model:qemu-upstream-compat;vga:std;videoram:8;apic:true;viridian:false;timeoffset:0;pae:true;cores-per-socket:2;acpi:1;hpet:true;secureboot:false;nx:true

I've checked both settings are visible and editable for users, do you think the 'platform' should be hidden for non-admins?

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2289

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2291

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan test centos7 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian Build Failed (tid-2979)

@apache apache deleted a comment from nvazquez Jan 25, 2022
@apache apache deleted a comment from blueorangutan Jan 25, 2022
@apache apache deleted a comment from blueorangutan Jan 25, 2022
@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan test centos7 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@apache apache deleted a comment from nvazquez Jan 25, 2022

@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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-2994)
Environment: xcpng82 (x2), Advanced Networking with Mgmt server 7
Total time taken: 50993 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5892-t2994-xcpng82.zip
Smoke tests completed. 90 look OK, 2 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_invalid_upgrade_kubernetes_cluster Failure 3607.05 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 95.30 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.05 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.06 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.04 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 0.04 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 0.03 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 118.90 test_kubernetes_clusters.py
test_01_sys_vm_start Failure 0.10 test_secondary_storage.py

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✖️ debian ✔️ suse15. SL-JID 2348

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2351

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✖️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2353

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2356

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test centos7 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@sureshanaparti sureshanaparti linked an issue Jan 28, 2022 that may be closed by this pull request
@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 2403

@nvazquez

Copy link
Copy Markdown
Contributor Author

@blueorangutan test centos7 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3075)
Environment: xcpng82 (x2), Advanced Networking with Mgmt server 7
Total time taken: 36420 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5892-t3075-xcpng82.zip
Smoke tests completed. 76 look OK, 16 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_DeleteDomain Error 9.69 test_accounts.py
test_forceDeleteDomain Failure 9.58 test_accounts.py
test_01_user_remove_VM_running Error 1.97 test_accounts.py
test_09_project_suspend Error 2.30 test_projects.py
test_10_project_activation Error 2.22 test_projects.py
test_DeployVmAffinityGroup Error 1.30 test_affinity_groups.py
test_DeployVmAntiAffinityGroup Error 1.27 test_affinity_groups.py
test_01_internallb_roundrobin_1VPC_3VM_HTTP_port80 Failure 6.68 test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Failure 7.76 test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces Failure 4.54 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Failure 9.73 test_internal_lb.py
test_02_create_iso_with_checksum_sha256 Error 66.43 test_iso.py
test_04_extract_Iso Failure 128.26 test_iso.py
ContextSuite context=TestScaleVm>:setup Error 0.00 test_scale_vm.py
test_01_invalid_upgrade_kubernetes_cluster Failure 4.56 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 4.39 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 4.29 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 3.26 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 4.25 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 4.24 test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_cluster Failure 4.24 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 3.79 test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_cluster Failure 4.24 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 63.25 test_kubernetes_clusters.py
test_01_sys_vm_start Failure 0.11 test_secondary_storage.py
ContextSuite context=TestListIdsParams>:setup Error 0.00 test_list_ids_parameter.py
test_delete_account Error 17.02 test_network.py
test_delete_network_while_vm_on_it Error 2.31 test_network.py
test_delete_network_while_vm_on_it Error 2.31 test_network.py
test_deploy_vm_l2network Error 2.28 test_network.py
test_deploy_vm_l2network Error 2.28 test_network.py
test_l2network_restart Error 2.36 test_network.py
test_l2network_restart Error 2.36 test_network.py
ContextSuite context=TestL2Networks>:teardown Error 3.46 test_network.py
ContextSuite context=TestPortForwarding>:setup Error 5.17 test_network.py
ContextSuite context=TestPublicIP>:setup Error 2.34 test_network.py
test_reboot_router Error 1.69 test_network.py
test_releaseIP Error 1.68 test_network.py
ContextSuite context=TestRouterRules>:setup Error 3.37 test_network.py
test_01_deployVMInSharedNetwork Failure 1.15 test_network.py
test_02_verifyRouterIpAfterNetworkRestart Failure 2.10 test_network.py
test_03_destroySharedNetwork Failure 1.07 test_network.py
ContextSuite context=TestSharedNetwork>:teardown Error 2.17 test_network.py
ContextSuite context=TestDeployVM>:setup Error 0.00 test_vm_life_cycle.py
ContextSuite context=TestVMLifeCycle>:setup Error 1.71 test_vm_life_cycle.py
test_network_acl Error 5.27 test_network_acl.py
test_01_nic Error 64.61 test_nic.py
ContextSuite context=TestServiceOfferings>:setup Error 16.97 test_service_offerings.py
ContextSuite context=TestSnapshotRootDisk>:setup Error 0.00 test_snapshots.py
test_02_routervm_iptables_policies Error 1.21 test_routers_iptables_default_policy.py
test_01_single_VPC_iptables_policies Error 5.31 test_routers_iptables_default_policy.py

@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test centos7 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@apache apache deleted a comment from blueorangutan Feb 1, 2022
@sureshanaparti

Copy link
Copy Markdown
Contributor

@blueorangutan test centos7 xcpng82

@blueorangutan

Copy link
Copy Markdown

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

@blueorangutan

Copy link
Copy Markdown

Trillian test result (tid-3108)
Environment: xcpng82 (x2), Advanced Networking with Mgmt server 7
Total time taken: 46366 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5892-t3108-xcpng82.zip
Smoke tests completed. 91 look OK, 1 have errors
Only failed tests results shown below:

Test Result Time (s) Test File
test_01_sys_vm_start Failure 0.09 test_secondary_storage.py

@sureshanaparti

Copy link
Copy Markdown
Contributor

Trillian test result (tid-3108) Environment: xcpng82 (x2), Advanced Networking with Mgmt server 7 Total time taken: 46366 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr5892-t3108-xcpng82.zip Smoke tests completed. 91 look OK, 1 have errors Only failed tests results shown below:

Test Result Time (s) Test File
test_01_sys_vm_start Failure 0.09 test_secondary_storage.py

The failed test ^^^ is unrelated to this PR. It is intermittent and seems to be environment issue (unable to connect to hosts). Noticed this failure in other PR test results (in xcpng82) as well.

@sureshanaparti

Copy link
Copy Markdown
Contributor

Merging this based on the approvals, smoke test results and tests covered by @nvazquez.

@sureshanaparti
sureshanaparti merged commit ddd311c into apache:4.16 Feb 2, 2022
@nvazquez
nvazquez deleted the cpucorespersocketfix branch February 12, 2022 02:36
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.

cpu.corespersocket don't work

5 participants