Skip to content

Support user data content upto 1048576 bytes - updated jetty maxFormContentSize value to 1048576 bytes (default is 200000 bytes)#8420

Merged
shwstppr merged 1 commit intoapache:mainfrom
shapeblue:jetty-content-size-limit-update-for-userdata
Jan 9, 2024
Merged

Support user data content upto 1048576 bytes - updated jetty maxFormContentSize value to 1048576 bytes (default is 200000 bytes)#8420
shwstppr merged 1 commit intoapache:mainfrom
shapeblue:jetty-content-size-limit-update-for-userdata

Conversation

@sureshanaparti
Copy link
Copy Markdown
Contributor

Description

This PR enables support for user data content upto 1048576 bytes - updates jetty maxFormContentSize value to 1048576 bytes (default is 200000 bytes).

CloudStack can support max user data content to 1048576 bytes (the size can be configurable through vm.userdata.max.length setting, max 1048576), but it's limited due to the default Jetty max content size, which is 200000 bytes.

Configuration Reference from jetty doc:
https://eclipse.dev/jetty/documentation/jetty-9/index.html#configuring-specific-webapp-deployment (check with maxFormContentSize here)

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?

Manually tested by creating instance with manual user data entry.

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

…00000 bytes), to support user data upto 1048576 bytes
@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 1, 2024

Codecov Report

Attention: 6 lines in your changes are missing coverage. Please review.

Comparison is base (6d916ca) 30.85% compared to head (3c1239a) 30.80%.
Report is 7 commits behind head on main.

Files Patch % Lines
.../main/java/org/apache/cloudstack/ServerDaemon.java 0.00% 6 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main    #8420      +/-   ##
============================================
- Coverage     30.85%   30.80%   -0.06%     
+ Complexity    34048    33980      -68     
============================================
  Files          5341     5341              
  Lines        374861   374870       +9     
  Branches      54518    54518              
============================================
- Hits         115659   115468     -191     
- Misses       243973   244145     +172     
- Partials      15229    15257      +28     
Flag Coverage Δ
simulator-marvin-tests 24.71% <0.00%> (-0.04%) ⬇️
uitests 4.39% <ø> (ø)
unit-tests 16.46% <ø> (+<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.

@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan package

@blueorangutan
Copy link
Copy Markdown

@sureshanaparti 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
Copy Markdown

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

@sureshanaparti
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

Copy link
Copy Markdown
Member

@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

@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_08_migrate_vm Error 0.05 test_vm_life_cycle.py

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

Copy link
Copy Markdown
Member

@kiranchavala kiranchavala 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 it manually by passing a user-data of size 686kb and there was no Error code 400 observed.

Also changed the global setting parameter value

"Vm userdata max length (vm.userdata.max.length) " to its max value of 1048576

sample userdata
test2.zip

@shwstppr shwstppr added this to the 4.19.0.0 milestone Jan 9, 2024
@shwstppr shwstppr merged commit 2b28a66 into apache:main Jan 9, 2024
@DaanHoogland DaanHoogland deleted the jetty-content-size-limit-update-for-userdata branch January 9, 2024 12:15
dhslove pushed a commit to ablecloud-team/ablestack-cloud that referenced this pull request Jan 12, 2024
…00000 bytes), to support user data upto 1048576 bytes (apache#8420)

This PR enables support for user data content upto 1048576 bytes - updates jetty maxFormContentSize value to 1048576 bytes (default is 200000 bytes).

CloudStack can support max user data content to 1048576 bytes (the size can be configurable through vm.userdata.max.length setting, max 1048576), but it's limited due to the default Jetty max content size, which is 200000 bytes.

Configuration Reference from jetty doc:
https://eclipse.dev/jetty/documentation/jetty-9/index.html#configuring-specific-webapp-deployment (check with maxFormContentSize here)
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.

6 participants