cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

server: trim autoscale Windows VM hostname

Open shwstppr opened this issue 5 months ago • 44 comments

Description

Fixes #9505

Trim the generated hostname for Windows VM to 15 characters. Doc PR: https://github.com/apache/cloudstack-documentation/pull/575

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [x] 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?

shwstppr avatar Jul 29 '25 10:07 shwstppr

Codecov Report

:x: Patch coverage is 90.47619% with 2 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 17.56%. Comparing base (ac8c200) to head (d2544d4). :warning: Report is 66 commits behind head on main.

Files with missing lines Patch % Lines
...ava/com/cloud/network/as/AutoScaleManagerImpl.java 90.47% 1 Missing and 1 partial :warning:
Additional details and impacted files
@@            Coverage Diff            @@
##               main   #11327   +/-   ##
=========================================
  Coverage     17.56%   17.56%           
+ Complexity    15544    15543    -1     
=========================================
  Files          5909     5909           
  Lines        529059   529074   +15     
  Branches      64617    64620    +3     
=========================================
+ Hits          92941    92944    +3     
- Misses       425664   425675   +11     
- Partials      10454    10455    +1     
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.63% <90.47%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

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

codecov[bot] avatar Jul 29 '25 10:07 codecov[bot]

@blueorangutan package

shwstppr avatar Jul 30 '25 06:07 shwstppr

@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 avatar Jul 30 '25 06:07 blueorangutan

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

blueorangutan avatar Jul 30 '25 08:07 blueorangutan

This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch.

github-actions[bot] avatar Jul 31 '25 11:07 github-actions[bot]

@shwstppr is this ready for review ?

weizhouapache avatar Aug 25 '25 10:08 weizhouapache

@weizhouapache yes, though I wanted to confirm if it is a good idea to use the last 15 characters of the long generated name. Not using the first 15 as they can turn out to be the same.

shwstppr avatar Aug 25 '25 11:08 shwstppr

@weizhouapache yes, though I wanted to confirm if it is a good idea to use the last 15 characters of the long generated name. Not using the first 15 as they can turn out to be the same.

@shwstppr looks ok to me. I could not find a better solution to be honest.

is it possible the first letter is unaccepted (for example -) after the truncation ?

weizhouapache avatar Aug 25 '25 11:08 weizhouapache

@blueorangutan package

shwstppr avatar Aug 26 '25 04:08 shwstppr

@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 avatar Aug 26 '25 04:08 blueorangutan

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

blueorangutan avatar Aug 26 '25 06:08 blueorangutan

@blueorangutan package

shwstppr avatar Sep 10 '25 04:09 shwstppr

@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 avatar Sep 10 '25 04:09 blueorangutan

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

blueorangutan avatar Sep 10 '25 05:09 blueorangutan

@blueorangutan test

DaanHoogland avatar Sep 15 '25 08:09 DaanHoogland

@shwstppr I am getting this NPE with a Windows10 qcow2 template. Not sure if I did something wrong. I have a mixed kvm, vmware env.

Screenshot 2025-09-30 at 4 11 49 PM Screenshot 2025-09-30 at 4 10 58 PM

abh1sar avatar Sep 30 '25 10:09 abh1sar

@blueorangutan package

shwstppr avatar Sep 30 '25 13:09 shwstppr

@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 avatar Sep 30 '25 13:09 blueorangutan

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

blueorangutan avatar Sep 30 '25 14:09 blueorangutan

@abh1sar please try one again with new packages. Added a change. I didn't realize we store guest OSes with null name.

shwstppr avatar Sep 30 '25 15:09 shwstppr

@blueorangutan test

weizhouapache avatar Sep 30 '25 15:09 weizhouapache

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

blueorangutan avatar Sep 30 '25 15:09 blueorangutan

@shwstppr please see if we need to add this to documentation?

abh1sar avatar Oct 01 '25 04:10 abh1sar

Thanks @abh1sar. (I've also added minor refactoring to not consider OS as Windows if both name and display_name turn out to be NULL) Will check and update regarding documentation

shwstppr avatar Oct 01 '25 07:10 shwstppr

Added doc PR: https://github.com/apache/cloudstack-documentation/pull/575

@blueorangutan package

shwstppr avatar Oct 01 '25 07:10 shwstppr

@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 avatar Oct 01 '25 07:10 blueorangutan

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

blueorangutan avatar Oct 01 '25 08:10 blueorangutan

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

Test Result Time (s) Test File

blueorangutan avatar Oct 01 '25 08:10 blueorangutan

@blueorangutan package

shwstppr avatar Oct 08 '25 09:10 shwstppr

@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 avatar Oct 08 '25 09:10 blueorangutan