Skip to content

engine-schema: fix finding guestos mapping with parent version - #8426

Merged
shwstppr merged 1 commit into
apache:4.18from
shapeblue:fix-findguestos-parentversion
Jan 8, 2024
Merged

engine-schema: fix finding guestos mapping with parent version#8426
shwstppr merged 1 commit into
apache:4.18from
shapeblue:fix-findguestos-parentversion

Conversation

@shwstppr

Copy link
Copy Markdown
Contributor

Description

Fixes#8412

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):

How Has This Been Tested?

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

@codecov

codecovBot commented Jan 2, 2024

Copy link
Copy Markdown

Codecov Report

Attention: 14 lines in your changes are missing coverage. Please review.

Comparison is base (08749d8) 13.12% compared to head (a707e27) 30.76%.

FilesPatch %Lines
...om/cloud/storage/dao/GuestOSHypervisorDaoImpl.java22.22%13 Missing and 1 partial ⚠️
Additional details and impacted files
@@ Coverage Diff @@## 4.18 #8426 +/- ##
=============================================
+ Coverage 13.12% 30.76% +17.63% - Complexity 9141 33951 +24810 
=============================================
Files 2720 5341 +2621 Lines 257726 374888 +117162 Branches 40177 54526 +14349 =============================================
+ Hits 33838 115331 +81493 - Misses 219598 244320 +24722 - Partials 4290 15237 +10947 
FlagCoverage Δ
simulator-marvin-tests24.64% <22.22%> (?)
uitests4.39% <ø> (?)
unit-tests16.46% <5.55%> (?)

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.

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr 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 8176

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr 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 8184

@DaanHooglandDaanHoogland 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 test matrix

@blueorangutan

Copy link
Copy Markdown

@DaanHoogland a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@shwstpprshwstppr added this to the 4.19.0.0 milestone Jan 3, 2024
@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8708)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43119 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8708-xenserver-71.zip
Smoke tests completed. 121 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8710)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 48372 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8710-kvm-centos7.zip
Smoke tests completed. 119 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_02_list_cpvm_vmFailure0.03test_ssvm.py
test_04_cpvm_internalsFailure0.04test_ssvm.py
test_02_upgrade_kubernetes_clusterFailure451.07test_kubernetes_clusters.py
test_07_deploy_kubernetes_ha_clusterFailure3623.08test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_clusterFailure0.04test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_clusterFailure0.03test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_clusterFailure46.77test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardownError117.58test_kubernetes_clusters.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8709)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
Total time taken: 52704 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8709-vmware-67u3.zip
Smoke tests completed. 117 look OK, 4 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
ContextSuite context=TestAddVmToSubDomain>:setupError13.50test_accounts.py
test_DeleteDomainError13.50test_accounts.py
test_forceDeleteDomainFailure13.53test_accounts.py
test_01_user_remove_VM_runningError2.30test_accounts.py
test_03_network_operations_on_created_vm_of_otheruserError2.54test_network_permissions.py
test_03_network_operations_on_created_vm_of_otheruserError2.54test_network_permissions.py
test_04_deploy_vm_for_other_user_and_test_vm_operationsFailure1.44test_network_permissions.py
ContextSuite context=TestNetworkPermissions>:teardownError1.44test_network_permissions.py
test_02_balanced_drs_algorithmError424.30test_cluster_drs.py
test_02_upgrade_kubernetes_clusterFailure490.30test_kubernetes_clusters.py

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan test rocky8 vmware-67u3

@blueorangutan

Copy link
Copy Markdown

@shwstppr a [SL] Trillian-Jenkins test job (rocky8 mgmt + vmware-67u3) has been kicked to run smoke tests

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan test

@blueorangutan

Copy link
Copy Markdown

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

@harikrishna-patnalaharikrishna-patnala 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. I see this definetely fix the VMware VM ingestion part. We can think about support of parent version for hypervisor capabilities separately.

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8720)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
Total time taken: 48289 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8720-vmware-67u3.zip
Smoke tests completed. 119 look OK, 2 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_01_list_sec_storage_vmFailure0.06test_ssvm.py
test_03_ssvm_internalsFailure0.06test_ssvm.py
test_05_stop_ssvmFailure0.05test_ssvm.py
test_12_destroy_cpvmError7.46test_ssvm.py
test_02_balanced_drs_algorithmError430.00test_cluster_drs.py

@weizhouapacheweizhouapache 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

@weizhouapache

Copy link
Copy Markdown
Member

@shwstppr
Should it be re-targeted to 4.18?

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8721)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 55240 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8721-kvm-centos7.zip
Smoke tests completed. 118 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_08_upgrade_kubernetes_ha_clusterFailure919.94test_kubernetes_clusters.py
test_09_delete_kubernetes_ha_clusterFailure3616.66test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_clusterFailure56.46test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardownError117.89test_kubernetes_clusters.py
test_08_migrate_vmError44.96test_vm_life_cycle.py
test_hostha_kvm_host_degradedError700.11test_hostha_kvm.py
test_hostha_kvm_host_fencingError671.32test_hostha_kvm.py
test_hostha_kvm_host_recoveringError725.54test_hostha_kvm.py

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@shwstppr Should it be re-targeted to 4.18?

will make the change

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr 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 8206

Fixesapache#8412
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
@shwstppr
shwstpprforce-pushed the fix-findguestos-parentversion branch from a24f2da to a707e27CompareJanuary 5, 2024 09:50
@shwstppr
shwstppr changed the base branch from main to 4.18January 5, 2024 09:50
@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@shwstppr 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 8215

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

@blueorangutan test matrix

@blueorangutan

Copy link
Copy Markdown

@shwstppr a [SL] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8735)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 40698 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8735-kvm-centos7.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8733)
Environment: xenserver-71 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41237 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8733-xenserver-71.zip
Smoke tests completed. 109 look OK, 0 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-8734)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server r8
Total time taken: 48151 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8426-t8734-vmware-67u3.zip
Smoke tests completed. 108 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

TestResultTime (s)Test File
test_02_upgrade_kubernetes_clusterFailure494.21test_kubernetes_clusters.py

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

Tested Rocky Linux 9 VM import with VMware 8.0.0.2 hypervisor.

(localcloud) 🐱 > list hypervisorcapabilities hypervisor=VMware filter=id,hypervisor,hypervisorversion,
{
"count": 19,
"hypervisorCapabilities": [
{
"hypervisor": "VMware",
"hypervisorversion": "default",
"id": "8"
},
{
"hypervisor": "VMware",
"hypervisorversion": "4.0",
"id": "9"
},
{
"hypervisor": "VMware",
"hypervisorversion": "4.1",
"id": "10"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.0",
"id": "11"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.1",
"id": "12"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.5",
"id": "c57558bf-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.0",
"id": "cbaae7e7-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.5",
"id": "cd741f46-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7",
"id": "cf92dd65-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.1",
"id": "cf92e9d9-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.2",
"id": "cf92f45c-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.3",
"id": "cf92fed5-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0",
"id": "d14750d0-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.1.0",
"id": "d1487eae-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.2.0",
"id": "d2c839eb-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.3.0",
"id": "d2c96de9-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0",
"id": "d414b048-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0.0.1",
"id": "d414bc3b-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0.1",
"id": "d67c19b1-abc1-11ee-8957-1e00da000152"
}
]
}

Import in UI,

import-vmw-8002.mp4

In Logs,

2024-01-08 09:23:51,845 DEBUG [c.c.a.t.Request] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Seq 1-5056135006653522013: Received: { Ans: , MgmtId: 167780543, via: 1(10.0.35.115), Ver: v1, Flags: 10, { GetUnmanagedInstancesAnswer } }
2024-01-08 09:23:51,845 DEBUG [c.c.a.m.AgentManagerImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Details from executing class com.cloud.agent.api.GetUnmanagedInstancesCommand: 2024-01-08 09:23:51,854 DEBUG [c.c.s.d.GuestOSHypervisorDaoImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Mapping for guest OS ID: rockylinux_64Guest for hypervisor: VMware with version: 8.0.0.2 can not be found. Trying to find one for the parent version: 8.0
2024-01-08 09:23:51,862 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Access granted to Account [{"accountName":"admin","id":2,"uuid":"e06f184a-abc1-11ee-8957-1e00da000152"}] to Service offering {"id":1,"name":"Small Instance","uuid":"5aebc1b7-5e3a-405f-98cf-dec841af8453"}. by AffinityGroupAccessChecker

@weizhouapache

weizhouapache commented Jan 8, 2024

Copy link
Copy Markdown
Member

Tested Rocky Linux 9 VM import with VMware 8.0.0.2 hypervisor.

(localcloud) 🐱 > list hypervisorcapabilities hypervisor=VMware filter=id,hypervisor,hypervisorversion,
{
"count": 19,
"hypervisorCapabilities": [
{
"hypervisor": "VMware",
"hypervisorversion": "default",
"id": "8"
},
{
"hypervisor": "VMware",
"hypervisorversion": "4.0",
"id": "9"
},
{
"hypervisor": "VMware",
"hypervisorversion": "4.1",
"id": "10"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.0",
"id": "11"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.1",
"id": "12"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.5",
"id": "c57558bf-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.0",
"id": "cbaae7e7-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.5",
"id": "cd741f46-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7",
"id": "cf92dd65-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.1",
"id": "cf92e9d9-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.2",
"id": "cf92f45c-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.3",
"id": "cf92fed5-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0",
"id": "d14750d0-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.1.0",
"id": "d1487eae-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.2.0",
"id": "d2c839eb-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.3.0",
"id": "d2c96de9-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0",
"id": "d414b048-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0.0.1",
"id": "d414bc3b-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0.1",
"id": "d67c19b1-abc1-11ee-8957-1e00da000152"
}
]
}

Import in UI,

import-vmw-8002.mp4
In Logs,

2024-01-08 09:23:51,845 DEBUG [c.c.a.t.Request] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Seq 1-5056135006653522013: Received: { Ans: , MgmtId: 167780543, via: 1(10.0.35.115), Ver: v1, Flags: 10, { GetUnmanagedInstancesAnswer } }
2024-01-08 09:23:51,845 DEBUG [c.c.a.m.AgentManagerImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Details from executing class com.cloud.agent.api.GetUnmanagedInstancesCommand: 2024-01-08 09:23:51,854 DEBUG [c.c.s.d.GuestOSHypervisorDaoImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Mapping for guest OS ID: rockylinux_64Guest for hypervisor: VMware with version: 8.0.0.2 can not be found. Trying to find one for the parent version: 8.0
2024-01-08 09:23:51,862 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Access granted to Account [{"accountName":"admin","id":2,"uuid":"e06f184a-abc1-11ee-8957-1e00da000152"}] to Service offering {"id":1,"name":"Small Instance","uuid":"5aebc1b7-5e3a-405f-98cf-dec841af8453"}. by AffinityGroupAccessChecker

thanks @shwstppr

it seems it worked, even without the hypervisor capabilities for 8.0.0.2

I checked the latest code of main branch, it does have the following code

HypervisorCapabilitiesVOresult = findOneBy(sc);
if (result != null || !HypervisorType.VMware.equals(hypervisorType) ||
CloudStackVersion.getVMwareParentVersion(hypervisorVersion) == null) {
returnresult;
}
sc.setParameters("hypervisorVersion", CloudStackVersion.getVMwareParentVersion(hypervisorVersion));
returnfindOneBy(sc);

Now I am wondering if #8444 is required.

@weizhouapache

Copy link
Copy Markdown
Member

also , it looks the following code snippet is not required if this PR is merged

if (parentVersion != null) {
guestOsMapping = guestOsHypervisorDao.findByOsIdAndHypervisor(guestOS.getId(), Hypervisor.HypervisorType.VMware.toString(), parentVersion);
LOGGER.debug(String.format("Found guest os mappings for guest os \"%s\" on VMware %s: %s", guestOS.getDisplayName(), parentVersion, guestOsMapping));
}

@shwstppr

Copy link
Copy Markdown
ContributorAuthor

Tested Rocky Linux 9 VM import with VMware 8.0.0.2 hypervisor.

(localcloud) 🐱 > list hypervisorcapabilities hypervisor=VMware filter=id,hypervisor,hypervisorversion,
{
"count": 19,
"hypervisorCapabilities": [
{
"hypervisor": "VMware",
"hypervisorversion": "default",
"id": "8"
},
{
"hypervisor": "VMware",
"hypervisorversion": "4.0",
"id": "9"
},
{
"hypervisor": "VMware",
"hypervisorversion": "4.1",
"id": "10"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.0",
"id": "11"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.1",
"id": "12"
},
{
"hypervisor": "VMware",
"hypervisorversion": "5.5",
"id": "c57558bf-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.0",
"id": "cbaae7e7-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.5",
"id": "cd741f46-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7",
"id": "cf92dd65-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.1",
"id": "cf92e9d9-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.2",
"id": "cf92f45c-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "6.7.3",
"id": "cf92fed5-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0",
"id": "d14750d0-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.1.0",
"id": "d1487eae-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.2.0",
"id": "d2c839eb-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "7.0.3.0",
"id": "d2c96de9-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0",
"id": "d414b048-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0.0.1",
"id": "d414bc3b-abc1-11ee-8957-1e00da000152"
},
{
"hypervisor": "VMware",
"hypervisorversion": "8.0.1",
"id": "d67c19b1-abc1-11ee-8957-1e00da000152"
}
]
}

Import in UI,
import-vmw-8002.mp4
In Logs,

2024-01-08 09:23:51,845 DEBUG [c.c.a.t.Request] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Seq 1-5056135006653522013: Received: { Ans: , MgmtId: 167780543, via: 1(10.0.35.115), Ver: v1, Flags: 10, { GetUnmanagedInstancesAnswer } }
2024-01-08 09:23:51,845 DEBUG [c.c.a.m.AgentManagerImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Details from executing class com.cloud.agent.api.GetUnmanagedInstancesCommand: 2024-01-08 09:23:51,854 DEBUG [c.c.s.d.GuestOSHypervisorDaoImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Mapping for guest OS ID: rockylinux_64Guest for hypervisor: VMware with version: 8.0.0.2 can not be found. Trying to find one for the parent version: 8.0
2024-01-08 09:23:51,862 DEBUG [c.c.u.AccountManagerImpl] (API-Job-Executor-31:ctx-dfff55c7 job-38 ctx-4a1de5f8) (logid:7f598e47) Access granted to Account [{"accountName":"admin","id":2,"uuid":"e06f184a-abc1-11ee-8957-1e00da000152"}] to Service offering {"id":1,"name":"Small Instance","uuid":"5aebc1b7-5e3a-405f-98cf-dec841af8453"}. by AffinityGroupAccessChecker

thanks @shwstppr

it seems it worked, even without the hypervisor capabilities for 8.0.0.2

I checked the latest code of main branch, it does have the following code

HypervisorCapabilitiesVOresult = findOneBy(sc);
if (result != null || !HypervisorType.VMware.equals(hypervisorType) ||
CloudStackVersion.getVMwareParentVersion(hypervisorVersion) == null) {
returnresult;
}
sc.setParameters("hypervisorVersion", CloudStackVersion.getVMwareParentVersion(hypervisorVersion));
returnfindOneBy(sc);

Now I am wondering if #8444 is required.

@weizhouapache we can discuss #8444 separately.
In the original issue, @andrijapanicsb objected to retrieving hypervisor capabilities from the parent version. Also, currently, there is no way to update the minor/patch version capabilities without updating them for the parent version. Therefore, it was discussed to add the contentious versions explicitly for now.
Maybe we can introduce something like https://github.com/apache/cloudstack/compare/main...shapeblue:cloudstack:add-updhycapapi-param?expand=1
I'm happy to close #8444 (or keep just the logs part) if we have a consensus we don't need that

Regarding VMwareVmImplementer change, can we have it in a separate PR? I don't think even with having that we have issues right now

@shwstppr
shwstppr marked this pull request as ready for review January 8, 2024 11:16
@weizhouapache

Copy link
Copy Markdown
Member

@weizhouapache we can discuss #8444 separately. In the original issue, @andrijapanicsb objected to retrieving hypervisor capabilities from the parent version. Also, currently, there is no way to update the minor/patch version capabilities without updating them for the parent version. Therefore, it was discussed to add the contentious versions explicitly for now. Maybe we can introduce something like https://github.com/apache/cloudstack/compare/main...shapeblue:cloudstack:add-updhycapapi-param?expand=1 I'm happy to close #8444 (or keep just the logs part) if we have a consensus we don't need that

Regarding VMwareVmImplementer change, can we have it in a separate PR? I don't think even with having that we have issues right now

@shwstppr
agree
I am good with merging this now.

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

LGTM

@shwstppr
shwstppr merged commit f023fc5 into apache:4.18Jan 8, 2024
@DaanHoogland
DaanHoogland deleted the fix-findguestos-parentversion branch January 8, 2024 15:06
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jan 9, 2024
…e#8426)
GuestOS mappings are retrieved from the parent hypervisor version when a minor, patch hypervisor version doesn't exist.
Fixesapache#8412
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Sign up for freeto 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.

VMware: VM ingestion broken in case of dynamically handled hypervisor/guest OS versions.

6 participants

@shwstppr@blueorangutan@DaanHoogland@weizhouapache@harikrishna-patnala@andrijapanicsb