| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Codecov Report❌ Patch coverage is 21.42857% with 33 lines in your changes missing coverage. Please review. @@ Coverage Diff @@
## 4.20 #11659 +/- ##
============================================
- Coverage 16.17% 16.17% -0.01%
+ Complexity 13297 13296 -1
============================================
Files 5656 5656
Lines 498151 498144 -7
Branches 60441 60441
============================================
- Hits 80588 80569 -19
- Misses 408591 408605 +14
+ Partials 8972 8970 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry.
|
Sorry, something went wrong.
There was a problem hiding this comment.
code lgtm
Sorry, something went wrong.
|
@weizhouapache 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. |
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15062 |
Sorry, something went wrong.
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
There was a problem hiding this comment.
should do the job (clgtm)
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I feel the problem is not the lack of transaction but we are we are using UserVmDao.getNextSequence twice. First to find the internal name and then at the time of actual commit
https://github.com/apache/cloudstack/blob/main/server/src/main/java/org/apache/cloudstack/vm/UnmanagedVMsManagerImpl.java#L2871-L2877
Maybe we can move the ^^ code inside importVm method or also start passing id to the importVm method
Sorry, something went wrong.
|
[SF] Trillian test result (tid-14374)
|
Sorry, something went wrong.
There was a problem hiding this comment.
Looks like not fixed:
mysql> select id,instance_name,created from vm_instance where removed is null; +----+---------------+---------------------+ | id | instance_name | created | +----+---------------+---------------------+ | 1 | s-1-VM | 2025-08-26 08:25:12 | | 2 | v-2-VM | 2025-08-26 08:25:07 | | 4 | r-4-VM | 2025-08-26 13:00:49 | | 45 | i-2-45-VM | 2025-09-18 08:54:38 | | 49 | i-2-48-VM | 2025-09-18 08:56:11 | +----+---------------+---------------------+
Sorry, something went wrong.
|
Thanks @shwstppr - I have refactored based on your suggestion @blueorangutan package |
Sorry, something went wrong.
|
@nvazquez 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. |
Sorry, something went wrong.
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 15082 |
Sorry, something went wrong.
|
@nvazquez a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Sorry, something went wrong.
|
[SF] Trillian test result (tid-14381)
|
Sorry, something went wrong.
There was a problem hiding this comment.
Code looks good. One comment on redundant code
Sorry, something went wrong.
| String instanceSuffix = _configDao.getValue(Config.InstanceName.key()); | ||
| if (instanceSuffix == null) { | ||
| instanceSuffix = "DEFAULT"; | ||
| } |
There was a problem hiding this comment.
This is already done in the configure method
Sorry, something went wrong.
|
@nvazquez |
Sorry, something went wrong.
|
Hi @weizhouapache - yes I have tested and verified the fix, it is ready for review and testing. I'm updating the PR description, have applied the fix on the environment where @rajujith detected the issue and could verify the fix after VM ID = 50. mysql> select id,instance_name,created from vm_instance where removed is null; +----+---------------+---------------------+ | id | instance_name | created | +----+---------------+---------------------+ | 1 | s-1-VM | 2025-08-26 08:25:12 | | 2 | v-2-VM | 2025-08-26 08:25:07 | | 4 | r-4-VM | 2025-08-26 13:00:49 | | 45 | i-2-45-VM | 2025-09-18 08:54:38 | | 49 | i-2-48-VM | 2025-09-18 08:56:11 | | 50 | i-2-50-VM | 2025-09-19 17:47:38 | | 51 | i-2-51-VM | 2025-09-19 17:52:47 | +----+---------------+---------------------+ 7 rows in set (0.00 sec) |
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM.
mysql> select id,instance_name,created from vm_instance where removed is null; +----+---------------+---------------------+ | id | instance_name | created | +----+---------------+---------------------+ | 1 | s-1-VM | 2025-08-26 08:25:12 | | 2 | v-2-VM | 2025-08-26 08:25:07 | | 4 | r-4-VM | 2025-08-26 13:00:49 | | 49 | i-2-48-VM | 2025-09-18 08:56:11 | | 50 | i-2-50-VM | 2025-09-19 17:47:38 | | 51 | i-2-51-VM | 2025-09-19 17:52:47 | | 52 | i-2-52-VM | 2025-09-23 06:26:19 | +----+---------------+---------------------+
Sorry, something went wrong.
|
merging based on approvals and manual testing by @rajujith thanks all |
Sorry, something went wrong.
* Fix VM import DB sequence issue on import failure * Remove ununsed imports * Refactor to avoid duplicating the next ID for VM sequence
| Back | FazBrowse Home | New Git URL |
Description
This PR fixes the VM import naming mismatch with the internal VM ID on database as described on #11658
Fixes: #11658
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
After the fix:
How did you try to break this feature and the system with this change?