Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default should map always, not require the minHypervisorVersion #6841

Closed

Conversation

DaanHoogland
Copy link
Contributor

Description

This PR fixes an logic error in #6758

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?

@DaanHoogland
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

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

@sonarcloud
Copy link

sonarcloud bot commented Oct 21, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

Trillian test result (tid-5187)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 43602 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6841-t5187-kvm-centos7.zip
Smoke tests completed. 103 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 462.06 test_vpc_redundant.py

@DaanHoogland DaanHoogland marked this pull request as ready for review October 24, 2022 13:22
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

However, need to verify if #6736 is fixed

@blueorangutan
Copy link

Trillian test result (tid-5190)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 41170 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6841-t5190-kvm-centos7.zip
Smoke tests completed. 103 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_03_create_redundant_VPC_1tier_2VMs_2IPs_2PF_ACL_reboot_routers Failure 458.19 test_vpc_redundant.py

@DaanHoogland DaanHoogland changed the title default should map always, not should match the minHypervirorVersion default should map always, not the minHypervirorVersion Nov 3, 2022
@DaanHoogland DaanHoogland changed the title default should map always, not the minHypervirorVersion default should map always, not require the minHypervisorVersion Nov 3, 2022
@DaanHoogland
Copy link
Contributor Author

@borisstoyanov I think we need this in for the upload of OVAs not having a hypervisor version and preventing those that have a too high hypervisor version.

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

@DaanHoogland
Copy link
Contributor Author

@blueorangutan test centos7 vmware-67u3

@blueorangutan
Copy link

@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + vmware-67u3) has been kicked to run smoke tests

@blueorangutan
Copy link

Trillian test result (tid-5407)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 42907 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6841-t5407-vmware-67u3.zip
Smoke tests completed. 95 look OK, 2 have errors, 8 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_3d_gpu_support Error 594.47 test_deploy_vgpu_enabled_vm.py
test_deploy_vgpu_enabled_vm Error 3.02 test_deploy_vgpu_enabled_vm.py
test_13_migrate_volume_and_change_offering Error 15.57 test_volumes.py
ContextSuite context=TestVolumes>:teardown Error 22.30 test_volumes.py
all_test_internal_lb Skipped --- test_internal_lb.py
all_test_templates Skipped --- test_templates.py
all_test_create_list_domain_account_project Skipped --- test_create_list_domain_account_project.py
all_test_primary_storage Skipped --- test_primary_storage.py
all_test_create_network Skipped --- test_create_network.py
all_test_network_acl Skipped --- test_network_acl.py
all_test_network_ipv6 Skipped --- test_network_ipv6.py
all_test_deploy_vm_extra_config_data Skipped --- test_deploy_vm_extra_config_data.py

@blueorangutan
Copy link

Trillian test result (tid-5434)
Environment: vmware-67u3 (x2), Advanced Networking with Mgmt server 7
Total time taken: 52438 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr6841-t5434-vmware-67u3.zip
Smoke tests completed. 104 look OK, 1 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_upgrade_kubernetes_cluster Error 4005.55 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 583.69 test_kubernetes_clusters.py
ContextSuite context=TestKubernetesCluster>:teardown Error 381.46 test_kubernetes_clusters.py

@weizhouapache
Copy link
Member

code lgtm, but I wonder ##6736 will be back again

@DaanHoogland
Copy link
Contributor Author

code lgtm, but I wonder ##6736 will be back again

I don´t think so. @borisstoyanov can you look at that?

@DaanHoogland DaanHoogland reopened this Dec 29, 2022
@DaanHoogland
Copy link
Contributor Author

@DaanHoogland this is closed ?

yes it was, forgot to reopen to restart actions...

@codecov
Copy link

codecov bot commented Dec 29, 2022

Codecov Report

Merging #6841 (7a48cef) into main (4a06363) will increase coverage by 0.89%.
The diff coverage is 0.00%.

@@             Coverage Diff              @@
##               main    #6841      +/-   ##
============================================
+ Coverage     10.84%   11.73%   +0.89%     
- Complexity     7095     8028     +933     
============================================
  Files          2485     2514      +29     
  Lines        245370   266358   +20988     
  Branches      38319    46572    +8253     
============================================
+ Hits          26602    31257    +4655     
- Misses       215500   230996   +15496     
- Partials       3268     4105     +837     
Impacted Files Coverage Δ
...om/cloud/storage/dao/GuestOSHypervisorDaoImpl.java 32.25% <0.00%> (ø)
...va/com/cloud/upgrade/dao/DatabaseAccessObject.java 0.00% <0.00%> (-97.50%) ⬇️
...ain/java/com/cloud/upgrade/dao/DbUpgradeUtils.java 0.00% <0.00%> (-92.31%) ⬇️
...in/java/com/cloud/upgrade/dao/Upgrade444to450.java 0.00% <0.00%> (-50.00%) ⬇️
...in/java/com/cloud/upgrade/dao/Upgrade453to460.java 0.00% <0.00%> (-50.00%) ⬇️
...java/com/cloud/upgrade/DatabaseUpgradeChecker.java 0.00% <0.00%> (-46.67%) ⬇️
...in/java/com/cloud/upgrade/dao/Upgrade431to440.java 0.00% <0.00%> (-40.00%) ⬇️
...in/java/com/cloud/upgrade/dao/Upgrade432to440.java 0.00% <0.00%> (-40.00%) ⬇️
...in/java/com/cloud/upgrade/dao/LegacyDbUpgrade.java 0.00% <0.00%> (-33.34%) ⬇️
.../com/cloud/storage/dao/StoragePoolTagsDaoImpl.java 12.90% <0.00%> (-32.26%) ⬇️
... and 348 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@vladimirpetrov
Copy link
Contributor

From what I can see, this haven't been fixed yet, here is what I got when testing as described in issue #6736:

When registering the mentioned template (PI-VA-3.10.0.0.205.ova) with 'Read from OVA', here is the result:
Did not find a guest OS (Red Hat Enterprise Linux 7 (64-bit)) with type "rhel7_64Guest" and minimal hypervisor hardware version null.

image

when 'Read from OVA' is false, the same template is properly registered.

@sonarcloud
Copy link

sonarcloud bot commented Jan 18, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@DaanHoogland
Copy link
Contributor Author

From what I can see, this haven't been fixed yet, here is what I got when testing as described in issue #6736:

When registering the mentioned template (PI-VA-3.10.0.0.205.ova) with 'Read from OVA', here is the result: Did not find a guest OS (Red Hat Enterprise Linux 7 (64-bit)) with type "rhel7_64Guest" and minimal hypervisor hardware version null.

image

when 'Read from OVA' is false, the same template is properly registered.

i think we have to check if this is a scenario that would work before this PR.

@@ -157,7 +157,7 @@ public List<GuestOSHypervisorVO> listByOsNameAndHypervisorMinimumVersion(String
sc.and(sc.entity().getGuestOsName(), SearchCriteria.Op.EQ, guestOsName);
sc.and(sc.entity().getHypervisorType(), SearchCriteria.Op.EQ, hypervisorType);
sc.and().op(sc.entity().getHypervisorVersion(), SearchCriteria.Op.GTEQ, minHypervisorVersion);
sc.or(sc.entity().getHypervisorVersion(), SearchCriteria.Op.NEQ, "default");
sc.or(sc.entity().getHypervisorVersion(), SearchCriteria.Op.EQ, "default");
Copy link
Member

Choose a reason for hiding this comment

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

should this be GTEQ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

no, default is not part of the simver and it is OR'ed so I think EQ is good

@weizhouapache weizhouapache added this to the 4.18.1.0 milestone May 12, 2023
@weizhouapache
Copy link
Member

added to 4.18.1.0 milestone

@rohityadavcloud
Copy link
Member

Not sure if manual testing is needed, but other LGTM. Thanks @DaanHoogland

@DaanHoogland DaanHoogland changed the base branch from main to 4.18 July 3, 2023 09:40
@rohityadavcloud
Copy link
Member

ping @weizhouapache
@blueorangutan package

@blueorangutan
Copy link

@rohityadavcloud a [SF] 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

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

@weizhouapache
Copy link
Member

manual test is required to test if #6736 is fixed or not.

@weizhouapache
Copy link
Member

weizhouapache commented Aug 17, 2023

@DaanHoogland
I doubt if it works.

it looks default have much fewer guest os mappings than 7.0. If we search guest os mapping by hypervisor version default, it may return empty results, which leads to #6736 to appear again.

mysql> select count(1) from guest_os_hypervisor where hypervisor_type ='VMware' and hypervisor_version ='default';
+----------+
| count(1) |
+----------+
|      118 |
+----------+
1 row in set (0.00 sec)

mysql> 
mysql> 
mysql> select count(1) from guest_os_hypervisor where hypervisor_type ='VMware' and hypervisor_version ='7.0';
+----------+
| count(1) |
+----------+
|      258 |
+----------+
1 row in set (0.00 sec)

@DaanHoogland
Copy link
Contributor Author

@weizhouapache I think this is a solution looking for a problem. Shall I close?

@weizhouapache
Copy link
Member

@weizhouapache I think this is a solution looking for a problem. Shall I close?

@DaanHoogland
The old logic seems wrong but fixed #6736 (the return results are always not empty)
the new logic looks good, but #6736 may come back again (the return results might be null).
I have no idea how to proceed ..

@DaanHoogland
Copy link
Contributor Author

@weizhouapache I think this is a solution looking for a problem. Shall I close?

@DaanHoogland The old logic seems wrong but fixed #6736 (the return results are always not empty) the new logic looks good, but #6736 may come back again (the return results might be null). I have no idea how to proceed ..

ok, closing. we can always re-open

@rohityadavcloud rohityadavcloud removed this from the 4.18.2.0 milestone Aug 29, 2023
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.

None yet

6 participants