Uh oh!
There was an error while loading. Please reload this page.
engine/schema: fix duplicated guest OSes in 4.18.0.0 - #7799
Conversation
weizhouapache
commented
Aug 2, 2023
@blueorangutan package |
blueorangutan
commented
Aug 2, 2023
@weizhouapache 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
commented
Aug 2, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6622 |
Codecov Report
@@ Coverage Diff @@## 4.18 #7799 +/- ##
============================================
- Coverage 13.06% 13.05% -0.01% + Complexity 9084 9083 -1
============================================
Files 2720 2720 Lines 257289 257370 +81 Branches 40116 40124 +8 ============================================
Hits 33612 33612 - Misses 219455 219537 +82 + Partials 4222 4221 -1
... and 1 file with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
| } | ||
| guestOsId = getGuestOsId(categoryId, displayName); | ||
| } else { | ||
| // TODO: update is_user_defined to false |
There was a problem hiding this comment.
In my opinion, we better leave the user_defined flag as is to keep track of operator activities.
There was a problem hiding this comment.
we can use the user_defined flag to decide which ones to remove and only keep the system defined one. In this case we, will have to allow for the ectra definition to begin with and deduplicate it right away.
There was a problem hiding this comment.
In my opinion, we better leave the user_defined flag as is to keep track of operator activities.
If so, user will be able to remove the guest os
There was a problem hiding this comment.
How about adding a new guest OS entry if the existing one is user-defined ?
We are anyways deduplicating the list from listGuestOS command starting 4.19 version, we will show only the latest entry if there duplicates. cc @DaanHoogland
There was a problem hiding this comment.
@harikrishna-patnala is there another place the deduplication is already taking place (see my pseudo code)?
I do agree we should look at the user defined flag during deduplication. seems like the cleanest way.
There was a problem hiding this comment.
@DaanHoogland I'm thinking of not doing any merge operation as it may affect the old entries in older versions as well.
I think the problem here is only that we have duplicate guest OS entries, which is not a critical/major issue.
My proposal is to leave them as is and make fix for future entries.
Regarding the "Red Hat Enterprise Linux 9" and other similar entries, instead of doing a merge operation, I would suggest adding new mapping entries for both the names (RHEL and RHEL9*) so that if the operator uses any of the Guest OSs it won't behave differently while deploying VM (otherwise if the mapping is not found, CS may choose "default").
d10fa3e to
5f17012CompareThis pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
2572ce5 to
8462915Comparec8c82a1 to
7353166CompareDaanHoogland
commented
Aug 10, 2023
@blueorangutan package |
blueorangutan
commented
Aug 10, 2023
@DaanHoogland 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
commented
Aug 10, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6739 |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| GuestOSVO rc = null; | ||
| for (GuestOSVO guestOSVO: setOfGuestOSes) { | ||
| if (rc == null || (guestOSVO.getId() > rc.getId() && !guestOSVO.getIsUserDefined())) { | ||
| rc = guestOSVO; |
There was a problem hiding this comment.
just return guestOSVO here ?
There was a problem hiding this comment.
no, bad pattern to have multiple exit points from a method
There was a problem hiding this comment.
ok. you can add a break; then
Uh oh!
There was an error while loading. Please reload this page.
24f5f24 to
01ab9f3Compare| usage_type = 24 AND usage_display like '% io write'; No newline at end of file | ||
| usage_type = 24 AND usage_display like '% io write'; | ||
| CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.guest_os', 'display', 'tinyint(1) DEFAULT ''1'' COMMENT ''should this guest_os be shown to the end user'' '); No newline at end of file |
There was a problem hiding this comment.
@DaanHoogland
as we discussed, add this to 4.16.0->4.16.1->4.17.0->4.17.1->4.17.2 as well ?
There was a problem hiding this comment.
no, I checked (and will test) the guestosmapper is not yet used in those.
Uh oh!
There was an error while loading. Please reload this page.
DaanHoogland
commented
Aug 14, 2023
@blueorangutan package |
blueorangutan
commented
Aug 14, 2023
@DaanHoogland 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
commented
Aug 14, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6769 |
blueorangutan
commented
Aug 18, 2023
@weizhouapache 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
commented
Aug 18, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6827 |
weizhouapache
commented
Aug 18, 2023
@blueorangutan test keepEnv |
blueorangutan
commented
Aug 18, 2023
@weizhouapache a [SF] Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Aug 18, 2023
[SF] Trillian test result (tid-7471)
|
blueorangutan
commented
Aug 18, 2023
[SF] Trillian test result (tid-7479)
|
test1: fresh installation with this PR, all looks good |
weizhouapache
commented
Aug 21, 2023
test2: upgrade from 4.16.1.1 to 4.18, then to this PR
the RHEL 9 issue also exist
|
weizhouapache
commented
Aug 21, 2023
test3:
|
DaanHoogland
left a comment
There was a problem hiding this comment.
tested and reviewed, @BryanMLima can you approve it this way?
weizhouapache
commented
Aug 21, 2023
@rohityadavcloud@harikrishna-patnala |
This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch. |
weizhouapache
commented
Aug 22, 2023
@blueorangutan package |
blueorangutan
commented
Aug 22, 2023
@weizhouapache 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
commented
Aug 22, 2023
Packaging result [SF]: ✔️ el7 ✔️ el8 ✔️ el9 ✔️ debian ✔️ suse15. SL-JID 6854 |
weizhouapache
commented
Aug 22, 2023
@blueorangutan test matrix |
blueorangutan
commented
Aug 22, 2023
@weizhouapache a [SF] Trillian-Jenkins matrix job (centos7 mgmt + xenserver71, rocky8 mgmt + vmware67u3, centos7 mgmt + kvmcentos7) has been kicked to run smoke tests |
blueorangutan
commented
Aug 22, 2023
[SF] Trillian test result (tid-7506)
|
blueorangutan
commented
Aug 22, 2023
[SF] Trillian test result (tid-7508)
|
blueorangutan
commented
Aug 23, 2023
[SF] Trillian test result (tid-7507)
|
DaanHoogland
commented
Aug 23, 2023
@BryanMLima@weizhouapache are we ready with this? |
weizhouapache
commented
Aug 23, 2023
retested all steps above, got same results thanks @DaanHoogland for the fix, merging |
Description
This PR fixes#7783 and #7781
(Need to merge duplicated guest OSes, and keep only one of them)
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?