Skip to content

Conversation

sudo87
Copy link
Collaborator

@sudo87 sudo87 commented Sep 15, 2025

Description

This PR fixes #11603 and considers templateid passed in import vm api request.

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
  • test (unit or integration test code)

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?

@sudo87 sudo87 marked this pull request as ready for review September 15, 2025 16:53
@sudo87 sudo87 requested a review from nvazquez September 15, 2025 16:53
@weizhouapache weizhouapache added this to the 4.20.3 milestone Sep 15, 2025
Copy link

codecov bot commented Sep 15, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 16.17%. Comparing base (0cbebbd) to head (5fac4f0).
⚠️ Report is 7 commits behind head on 4.20.

Files with missing lines Patch % Lines
.../apache/cloudstack/vm/UnmanagedVMsManagerImpl.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##               4.20   #11640   +/-   ##
=========================================
  Coverage     16.17%   16.17%           
  Complexity    13297    13297           
=========================================
  Files          5656     5656           
  Lines        498151   498147    -4     
  Branches      60441    60440    -1     
=========================================
  Hits          80588    80588           
+ Misses       408591   408586    -5     
- Partials       8972     8973    +1     
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 17.03% <50.00%> (+<0.01%) ⬆️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@sudo87 sudo87 closed this Sep 15, 2025
@sudo87 sudo87 reopened this Sep 15, 2025
Copy link
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

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

Nice, thanks @sudo87 - LGTM. Just a minor non-blocking comment

@nvazquez
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Copy link
Contributor

@DaanHoogland DaanHoogland left a comment

Choose a reason for hiding this comment

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

clgtm

@nvazquez
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File

Copy link
Contributor

@harikrishna-patnala harikrishna-patnala 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

@DaanHoogland DaanHoogland linked an issue Sep 17, 2025 that may be closed by this pull request
@weizhouapache weizhouapache modified the milestones: 4.20.3, 4.20.2 Sep 18, 2025
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

@weizhouapache weizhouapache self-assigned this Sep 22, 2025
@weizhouapache
Copy link
Member

tested ok

@rajujith
can you test it as well ? thanks

Copy link

@rajujith rajujith left a comment

Choose a reason for hiding this comment

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

LGTM

Tested.


🐱 > import vm name=Sept43-1 displayname=Sept24-1 importsource=shared hypervisor=kvm storageid=66db3292-7010-33a1-afe5-207ac57d9572 diskpath=Sept24-1.qcow2 networkid=9bd3611f-ea90-4c47-a66f-d332f412f5d1 serviceofferingid=40c50a8c-5436-45cd-bfd2-d829598db7a9 migrateallowed=true zoneid=848078d5-437f-46db-9859-add728d7193f clusterid=44be2e50-783a-4b52-bb02-6f3b476fb4cc templateid=52237ee7-9908-11f0-a5f2-1e001f000a0a
{
  "virtualmachine": {
    "account": "admin",
    "affinitygroup": [],
    "arch": "x86_64",
    "cpunumber": 1,
    "cpuspeed": 500,
    "created": "2025-09-24T06:29:38+0000",
    "deleteprotection": false,
    "details": {
      "deployvm": "true"
    },
    "displayname": "Sept24-1",
    "displayvm": true,
    "domain": "ROOT",
    "domainid": "521d71c5-9908-11f0-a5f2-1e001f000a0a",
    "domainpath": "/",
    "guestosid": "52325051-9908-11f0-a5f2-1e001f000a0a",
    "haenable": false,
    "hasannotations": false,
    "hypervisor": "KVM",
    "id": "2ef17308-476d-40b9-8bf1-7fab2c25ef66",
    "instancename": "i-2-5-VM",
    "ipaddress": "10.1.1.53",
    "isdynamicallyscalable": false,
    "memory": 512,
    "name": "Sept43-1",
    "nic": [
      {
        "broadcasturi": "vlan://1104",
        "deviceid": "0",
        "extradhcpoption": [],
        "gateway": "10.1.1.1",
        "id": "bfc5fbd5-db2f-4c12-b0fe-52a3117042f9",
        "ipaddress": "10.1.1.53",
        "isdefault": true,
        "isolationuri": "vlan://1104",
        "macaddress": "02:01:00:cc:00:03",
        "netmask": "255.255.255.0",
        "networkid": "9bd3611f-ea90-4c47-a66f-d332f412f5d1",
        "networkname": "mynet",
        "secondaryip": [],
        "traffictype": "Guest",
        "type": "Isolated"
      }
    ],
    "osdisplayname": "CentOS 5.5 (64-bit)",
    "ostypeid": "52325051-9908-11f0-a5f2-1e001f000a0a",
    "passwordenabled": false,
    "pooltype": "NetworkFilesystem",
    "receivedbytes": 0,
    "rootdeviceid": 1,
    "rootdevicetype": "ROOT",
    "securitygroup": [],
    "sentbytes": 0,
    "serviceofferingid": "40c50a8c-5436-45cd-bfd2-d829598db7a9",
    "serviceofferingname": "Small Instance",
    "state": "Stopped",
    "tags": [],
    "templatedisplaytext": "CentOS 5.5(64-bit) no GUI (KVM)",
    "templateformat": "QCOW2",
    "templateid": "52237ee7-9908-11f0-a5f2-1e001f000a0a",
    "templatename": "CentOS 5.5(64-bit) no GUI (KVM)",
    "templatetype": "BUILTIN",
    "userid": "a100524d-9908-11f0-a5f2-1e001f000a0a",
    "username": "admin",
    "zoneid": "848078d5-437f-46db-9859-add728d7193f",
    "zonename": "pr11640-t7138-kvm-rocky9"
  }

```}

@weizhouapache
Copy link
Member

thanks @rajujith !

merging

@weizhouapache weizhouapache merged commit a18b551 into apache:4.20 Sep 24, 2025
26 checks passed
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.

importVm ignores parameter templateid
7 participants