Skip to content

Xenserver smoke-test: Allow emojis to be accepted in volume name during volume creation #10774

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

Merged
merged 3 commits into from
Apr 29, 2025

Conversation

Pearl1594
Copy link
Contributor

@Pearl1594 Pearl1594 commented Apr 24, 2025

Description

This PR fixes: #10756
Fixes consistent test failure observed on Xenserver / XCP-ng

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?

[root@ref-trl-8376-x-mol8-pearl-dsilva-marvin ~]# nosetests --with-xunit --xunit-file=results.xml --with-marvin --marvin-config=/marvin/ref-trl-8376-x-Mol8-pearl-dsilva-advanced-cfg -s -a tags=fix --hypervisor=Xenserver resource_names.py 
/usr/local/lib/python3.6/site-packages/paramiko/transport.py:32: CryptographyDeprecationWarning: Python 3.6 is no longer supported by the Python core team. Therefore, support for it is deprecated in cryptography. The next release of cryptography will remove support for Python 3.6.
  from cryptography.hazmat.backends import default_backend

==== Marvin Init Started ====

=== Marvin Parse Config Successful ===

=== Marvin Setting TestData Successful===

==== Log Folder Path: /marvin/MarvinLogs/Apr_24_2025_12_30_11_0V0CT0 All logs will be available here ====

=== Marvin Init Logging Successful===

==== Marvin Init Successful ====
=== TestName: test_02_create_volume | Status : SUCCESS ===

=== Final results are now copied to: /marvin//MarvinLogs//N1C2O3 ===

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

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes missing coverage. Please review.

Project coverage is 16.02%. Comparing base (603cd84) to head (c74cdef).
Report is 12 commits behind head on 4.20.

Files with missing lines Patch % Lines
.../xenserver/resource/XenServerStorageProcessor.java 0.00% 12 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               4.20   #10774      +/-   ##
============================================
- Coverage     16.02%   16.02%   -0.01%     
- Complexity    13128    13130       +2     
============================================
  Files          5652     5652              
  Lines        496021   496032      +11     
  Branches      60065    60067       +2     
============================================
- Hits          79488    79484       -4     
- Misses       407665   407680      +15     
  Partials       8868     8868              
Flag Coverage Δ
uitests 4.00% <ø> (ø)
unittests 16.86% <0.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.

@weizhouapache
Copy link
Member

@blueorangutan package

@blueorangutan
Copy link

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

@Pearl1594
do you have an example what the name label (contains emoji) looks like on the xen/xcp-ng host ?

@Pearl1594
Copy link
Contributor Author

@weizhouapache while we create a volume with a name that comprises of on emoji - at this phase the volume isn't created on Xen. When the attachVolume operation is performed - first the VDI gets created on xen with the name given and then when the attach operation is performed where the name gets changed to -DATA. So ideally you don't really see this name (the one with emojis) on Xen.

@blueorangutan
Copy link

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

@weizhouapache
Copy link
Member

@weizhouapache while we create a volume with a name that comprises of on emoji - at this phase the volume isn't created on Xen. When the attachVolume operation is performed - first the VDI gets created on xen with the name given and then when the attach operation is performed where the name gets changed to -DATA. So ideally you don't really see this name (the one with emojis) on Xen.

thanks @Pearl1594
I was just wondering what the name label would be. for example, the name label of 😄

@Pearl1594
Copy link
Contributor Author

Pearl1594 commented Apr 25, 2025

@weizhouapache when the attach volume command is performed:

  1. It first creates a volume / VDI - Volume name - pearlVolume10🙂
    Screenshot from 2025-04-25 10-15-31
  2. The attaches it to a VM where it gets renamed to -DATA
    image

@weizhouapache
Copy link
Member

@weizhouapache when the attach volume command is performed:

  1. It first creates a volume / VDI - Volume name - pearlVolume10🙂
    Screenshot from 2025-04-25 10-15-31
  2. The attaches it to a VM where it gets renamed to -DATA
    image

thanks @Pearl1594
can we encode the special characters only ? for example, do not encode [0-9a-zA-Z]

Copy link
Contributor

@sureshanaparti sureshanaparti left a comment

Choose a reason for hiding this comment

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

clgtm (These changes are to allow volume creation with name containing unicode chars in XenServer. VDI.create fails without it. Anyways, the name label is renamed to <VM-Internal-Name>-DATA later during attach).

@sureshanaparti
Copy link
Contributor

sureshanaparti commented Apr 25, 2025

@weizhouapache when the attach volume command is performed:

  1. It first creates a volume / VDI - Volume name - pearlVolume10🙂
    Screenshot from 2025-04-25 10-15-31
  2. The attaches it to a VM where it gets renamed to -DATA
    image

thanks @Pearl1594 can we encode the special characters only ? for example, do not encode [0-9a-zA-Z]

@Pearl1594 Pls check this if possible. Also, check if it is Ok/feasible to update the name changed in CloudStack after attache cmd from the answer - so name is in sync with the hypervisor, any other thoughts @weizhouapache @harikrishna-patnala

@Pearl1594
Copy link
Contributor Author

@weizhouapache when the attach volume command is performed:

  1. It first creates a volume / VDI - Volume name - pearlVolume10🙂
    Screenshot from 2025-04-25 10-15-31
  2. The attaches it to a VM where it gets renamed to -DATA
    image

thanks @Pearl1594 can we encode the special characters only ? for example, do not encode [0-9a-zA-Z]

@Pearl1594 Pls check this if possible. Also, check if it is Ok/feasible to update the name changed in CloudStack after attache cmd from the answer - so name is in sync with the hypervisor, any other thoughts @weizhouapache @harikrishna-patnala

Created a Volume named - VolumeEmoji:smile: then Attached it to a vm
On placing a breakpoint at createVolume - where the VDI is created - we see the VDI created on Xen with the following name:
image

image

After attaching the VDI gets renamed:
image

image

@Pearl1594
Copy link
Contributor Author

@blueorangutan package

@blueorangutan
Copy link

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

@Pearl1594 Pearl1594 requested a review from weizhouapache April 25, 2025 07:15
@Pearl1594 Pearl1594 changed the title Xenserver: Allow emojis to be accepted in volume name during volume creation Xenserver smoke-test: Allow emojis to be accepted in volume name during volume creation Apr 25, 2025
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 (is the smoke test enough for this?)

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 40%)

See analysis details on SonarQube Cloud

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

@blueorangutan
Copy link

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

@Pearl1594
Copy link
Contributor Author

@blueorangutan test ol8 xcpng82

@blueorangutan
Copy link

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

@blueorangutan
Copy link

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

Test Result Time (s) Test File
test_01_condensed_drs_algorithm Failure 170.32 test_cluster_drs.py
test_02_balanced_drs_algorithm Failure 184.52 test_cluster_drs.py
ContextSuite context=TestSharedNetworkWithConfigDrive>:setup Error 12.61 test_network.py
test_01_non_strict_host_anti_affinity Error 224.41 test_nonstrict_affinity_group.py
test_02_non_strict_host_affinity Error 112.42 test_nonstrict_affinity_group.py
test_05_scale_vm_dont_allow_disk_offering_change Failure 71.74 test_scale_vm.py
test_02_restore_vm_strict_tags_failure Failure 66.45 test_vm_strict_host_tags.py
test_02_scale_vm_strict_tags_failure Failure 69.67 test_vm_strict_host_tags.py
test_06_deploy_vm_on_any_host_with_strict_tags_failure Failure 7.68 test_vm_strict_host_tags.py

@Pearl1594
Copy link
Contributor Author

merging - as the test_resource_names.py test passes

@Pearl1594 Pearl1594 merged commit 0e0ae22 into 4.20 Apr 29, 2025
33 of 50 checks passed
@github-project-automation github-project-automation bot moved this from In Progress to Done in ACS 4.20.1 Apr 29, 2025
@DaanHoogland DaanHoogland deleted the allow-emoji-volume-name-xen branch April 29, 2025 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Attach volume operation fails on Xenserver when volume name comprises of special characters or emojis
5 participants