Skip to content

Add support for java 21 for debian packages - #14418

Open
vishesh92 wants to merge 1 commit into
apache:4.22from
shapeblue:debian-13-java-21-support
Open

vishesh92 wants to merge 1 commit into
apache:4.22from
shapeblue:debian-13-java-21-support

Conversation

@vishesh92

Copy link
Copy Markdown
Member

Description

This PR adds support for java 21 in the debian packages for debian 13 & ubuntu 26.04

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?

@vishesh92
vishesh92 marked this pull request as ready for review October 16, 2026 08:07
@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

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

@weizhouapache

Copy link
Copy Markdown
Member

Points to consider:

  • Build JDK: the Build-Depends order puts openjdk-17-jdk ahead of openjdk-21-jdk. On a host with both installed, the build picks whichever apt resolves first. That’s probably fine, but it’s worth confirming which JDK the Debian 13 and Ubuntu 26.04 build actually uses.
  • Remaining mysql.connector users: tools/marvin/marvin/dbConnection.py and some tools/docker files still use mysql.connector directly. They are test tooling, so this is probably out of scope, but they’ll have the same problem on these distros.

@codecov

codecov Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.03%. Comparing base (c7667d8) to head (0fada8d).

Additional details and impacted files
@@            Coverage Diff            @@
##               4.22   #14418   +/-   ##
=========================================
  Coverage     18.03%   18.03%           
- Complexity    16286    16289    +3     
=========================================
  Files          5937     5937           
  Lines        536771   536771           
  Branches      65782    65782           
=========================================
+ Hits          96787    96797   +10     
+ Misses       428932   428921   -11     
- Partials      11052    11053    +1     
Flag Coverage Δ
uitests 4.04% <ø> (ø)
unittests 19.10% <ø> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Harness.
📢 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.

@blueorangutan

Copy link
Copy Markdown

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

@vishesh92

vishesh92 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member Author

Points to consider:

* Build JDK: the Build-Depends order puts openjdk-17-jdk ahead of openjdk-21-jdk. On a host with both installed, the build picks whichever apt resolves first. That’s probably fine, but it’s worth confirming which JDK the Debian 13 and Ubuntu 26.04 build actually uses.

On distros that ship both (e.g. Ubuntu 24.04), a fresh install still pulls OpenJDK 17 since it's the first alternative, so existing setups see no change. OpenJDK 21 is only used when it's the only one available (Debian 13) or already installed.

* Remaining mysql.connector users: tools/marvin/marvin/dbConnection.py and some tools/docker files still use mysql.connector directly. They are test tooling, so this is probably out of scope, but they’ll have the same problem on these distros.

I don't think we need to make any changes for this in the PR.

@vishesh92

Copy link
Copy Markdown
Member Author

@blueorangutan package

@blueorangutan

Copy link
Copy Markdown

@vishesh92 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]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✖️ suse15. SL-JID 19583

@weizhouapache weizhouapache left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

ubuntu26 and debian13 environments have been created successfully without extra step to install python3 connector

Image

@wido wido left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I reviewed this manually and then used Claude Fable to check and build the PR.

Built the PR head on Temurin JDK 21.0.12 with -P developer,systemvm -Dsimulator -DskipTests. All modules build, including the UI, apidocs and marvin. Unit tests of utils, framework/db, engine/orchestration and the KVM plugin also pass on JDK 21 (the one QemuImgTest error is a missing libvirt.so on my machine).

Package side: Debian 13 ships neither openjdk-17 nor python3-mysql.connector, so there Java 21 and PyMySQL are the only options. Ubuntu 26.04 still has openjdk-17 and python3-mysql.connector 9.5.0, so a fresh install there keeps running on 17.

The PyMySQL fallback is API compatible with how the three scripts use the connection: single statements, explicit commit, ping and fetchall.

One point, following up on Wei's remark about the build JDK. debian/rules does not set JAVA_HOME, so the build runs on whatever update-alternatives selects, not on the first Build-Depends alternative. On Ubuntu 26.04 default-jre-headless is openjdk-25 and maven lists it as its first alternative. If openjdk-25 ends up on the build host, the build fails in cloud-utils on aspectjweaver 1.8.13 (zip64 header rejected by JDK 24+). I hit this on my own 26.04 machine. It would be safer if build-deb.sh or debian/rules exported JAVA_HOME to the newest of java-21 or java-17 under /usr/lib/jvm when present. Fine as a follow-up.

Nit: the description only mentions Java 21, but half of the PR is the PyMySQL fallback. Worth a line in the description and ticking a box in the template.

@wido wido left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

CLGTM

@blueorangutan

Copy link
Copy Markdown

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

Test Result Time (s) Test File
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Error 111.18 test_internal_lb.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Error 111.19 test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces Failure 6.83 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Failure 8.88 test_internal_lb.py
ContextSuite context=TestDeployVmWithVariedPlanners>:setup Error 0.00 test_deploy_vms_with_varied_deploymentplanners.py
ContextSuite context=TestIpv4Routing>:setup Error 0.00 test_ipv4_routing.py
ContextSuite context=TestImportAndUnmanageVolumes>:setup Error 0.00 test_import_unmanage_volumes.py
test_01_1_create_iso_with_checksum_sha1_negative Error 66.55 test_iso.py
test_01_create_iso_with_checksum_sha1 Error 66.53 test_iso.py
test_01_create_iso_with_checksum_sha1 Error 66.53 test_iso.py
test_02_1_create_iso_with_checksum_sha256_negative Error 66.51 test_iso.py
test_02_create_iso_with_checksum_sha256 Error 66.47 test_iso.py
test_02_create_iso_with_checksum_sha256 Error 66.47 test_iso.py
test_03_1_create_iso_with_checksum_md5_negative Error 66.49 test_iso.py
test_03_create_iso_with_checksum_md5 Error 66.54 test_iso.py
test_03_create_iso_with_checksum_md5 Error 66.55 test_iso.py
test_04_create_iso_with_no_checksum Error 66.53 test_iso.py
test_04_create_iso_with_no_checksum Error 66.54 test_iso.py
test_01_create_iso Failure 1513.74 test_iso.py
ContextSuite context=TestISO>:setup Error 3026.62 test_iso.py
test_01_invalid_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 0.00 test_kubernetes_clusters.py
test_12_test_deploy_cluster_different_offerings_per_node_type Failure 0.00 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 1802.09 test_kubernetes_supported_versions.py
test_hostha_enable_ha_when_host_disabled Error 6.35 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 307.68 test_hostha_kvm.py

@blueorangutan

Copy link
Copy Markdown

[SF] Trillian test result (tid-110)
Environment: kvm-ubuntu26 (x2), zone: Advanced Networking with Mgmt server u26, storage: NFS (x2)
Total time taken: 77666 seconds
Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr14418-n110-kvm-ubuntu26.zip
Smoke tests completed. 136 look OK, 13 have errors, 0 did not run
Only failed and skipped tests results shown below:

Test Result Time (s) Test File
ContextSuite context=TestNASBackupAndRecovery>:setup Error 0.00 test_backup_recovery_nas.py
test_02_internallb_roundrobin_1RVPC_3VM_HTTP_port80 Failure 11.10 test_internal_lb.py
test_03_vpc_internallb_haproxy_stats_on_all_interfaces Failure 9.85 test_internal_lb.py
test_04_rvpc_internallb_haproxy_stats_on_all_interfaces Failure 12.99 test_internal_lb.py
test_07_vpc_and_tier_with_routed_mode Error 3.94 test_ipv4_routing.py
test_09_connectivity_between_network_and_vpc_tier Failure 0.14 test_ipv4_routing.py
test_11_isolated_network_with_dynamic_routed_mode Error 3.72 test_ipv4_routing.py
test_11_isolated_network_with_dynamic_routed_mode Error 3.72 test_ipv4_routing.py
test_12_vpc_and_tier_with_dynamic_routed_mode Error 1.09 test_ipv4_routing.py
ContextSuite context=TestIpv4Routing>:teardown Error 1.37 test_ipv4_routing.py
test_01_invalid_upgrade_kubernetes_cluster Failure 0.01 test_kubernetes_clusters.py
test_02_upgrade_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_03_deploy_and_scale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_04_autoscale_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_05_basic_lifecycle_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_06_delete_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_08_upgrade_kubernetes_ha_cluster Failure 0.00 test_kubernetes_clusters.py
test_10_vpc_tier_kubernetes_cluster Failure 0.00 test_kubernetes_clusters.py
test_11_test_unmanaged_cluster_lifecycle Error 0.00 test_kubernetes_clusters.py
test_12_test_deploy_cluster_different_offerings_per_node_type Failure 0.00 test_kubernetes_clusters.py
test_01_add_delete_kubernetes_supported_version Error 1802.80 test_kubernetes_supported_versions.py
ContextSuite context=TestListIdsParams>:setup Error 0.00 test_list_ids_parameter.py
ContextSuite context=TestListVolumes>:setup Error 0.00 test_list_volumes.py
ContextSuite context=TestLoadBalance>:setup Error 0.00 test_loadbalance.py
ContextSuite context=TestMetrics>:setup Error 0.00 test_metrics_api.py
test_01_native_to_native_network_migration Error 14.70 test_migration.py
test_02_native_to_native_vpc_migration Error 7.27 test_migration.py
test_nic_secondaryip_add_remove Error 1517.77 test_multipleips_per_nic.py
test_01_vpn_usage Error 1.29 test_usage.py
test_hostha_enable_ha_when_host_disabled Error 4.13 test_hostha_kvm.py
test_hostha_enable_ha_when_host_in_maintenance Error 306.39 test_hostha_kvm.py

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants