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

Allow autoscale group and name override #8324

Merged

Conversation

rg9975
Copy link
Contributor

@rg9975 rg9975 commented Dec 6, 2023

… conventions

Description

Updates AutoScaleManager/AutoScaleManagerImpl so that getNextVmHostName and checkAutoScaleVmGroupName can be overridden in derivative implementations to allow for custom naming conditions and restrictions. If possible, would like to include this in 4.19 since it is a trivial change.

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

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?

Extended implementation class with different VM names and tested for shorter auto-scale names.

How did you try to break this feature and the system with this change?

Use group names longer than the extended code allowed.

@weizhouapache
Copy link
Member

@rg9975
it is trivial indeed. can you give more details how you will use the method ?

@rg9975
Copy link
Contributor Author

rg9975 commented Dec 6, 2023

We create an extension of AutoScaleManagerImpl.java, override these 2 methods, and override the spring-server-core-managers-context.xml to set the value of the manager to our extension class:

<bean id="autoScaleManagerImpl" class="com......CustomAutoScaleManagerImpl" />

This allows us to deploy local changes that may not make sense for Cloudstack submission. In this case, very specific naming size and format requirements.

Copy link

codecov bot commented Dec 6, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6001772) 29.13% compared to head (f3c37b7) 29.15%.
Report is 34 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8324      +/-   ##
============================================
+ Coverage     29.13%   29.15%   +0.02%     
- Complexity    31026    31269     +243     
============================================
  Files          5193     5251      +58     
  Lines        366232   368802    +2570     
  Branches      53546    53767     +221     
============================================
+ Hits         106692   107524     +832     
- Misses       244918   246564    +1646     
- Partials      14622    14714      +92     
Flag Coverage Δ
simulator-marvin-tests 25.04% <ø> (-0.03%) ⬇️
uitests 4.44% <ø> (-0.05%) ⬇️
unit-tests 14.89% <ø> (+0.08%) ⬆️

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.

@weizhouapache
Copy link
Member

We create an extension of AutoScaleManagerImpl.java, override these 2 methods, and override the spring-server-core-managers-context.xml to set the value of the manager to our extension class:

<bean id="autoScaleManagerImpl" class="com......CustomAutoScaleManagerImpl" />

This allows us to deploy local changes that may not make sense for Cloudstack submission. In this case, very specific naming size and format requirements.

@rg9975
thanks, looks ok to me

Copy link
Contributor

@shwstppr shwstppr left a comment

Choose a reason for hiding this comment

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

LGTM

@shwstppr shwstppr added this to the 4.19.0.0 milestone Dec 7, 2023
@shwstppr
Copy link
Contributor

shwstppr commented Dec 7, 2023

@blueorangutan package

@blueorangutan
Copy link

@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
Copy link

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

@DaanHoogland
Copy link
Contributor

@blueorangutan test

@blueorangutan
Copy link

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

@blueorangutan
Copy link

[SF] Trillian test result (tid-8505)
Environment: kvm-centos7 (x2), Advanced Networking with Mgmt server 7
Total time taken: 49697 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr8324-t8505-kvm-centos7.zip
Smoke tests completed. 118 look OK, 3 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_02_list_cpvm_vm Failure 0.03 test_ssvm.py
test_04_cpvm_internals Failure 0.04 test_ssvm.py
test_02_trigger_shutdown Failure 336.69 test_safe_shutdown.py
test_08_upgrade_kubernetes_ha_cluster Failure 748.78 test_kubernetes_clusters.py

@shwstppr shwstppr merged commit 9773ba3 into apache:main Dec 8, 2023
24 of 25 checks passed
Copy link

boring-cyborg bot commented Dec 8, 2023

Awesome work, congrats on your first merged pull request!

dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Dec 11, 2023
Updates AutoScaleManager/AutoScaleManagerImpl so that getNextVmHostName and checkAutoScaleVmGroupName can be overridden in derivative implementations to allow for custom naming conditions and restrictions. If possible, would like to include this in 4.19 since it is a trivial change.
This can be used to create an extension of AutoScaleManagerImpl.java, overriding these 2 methods
@rg9975 rg9975 deleted the allow-autoscale-group-and-name-override branch March 31, 2024 01:38
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

5 participants