Pearl1594 commented on code in PR #10774:
URL: https://github.com/apache/cloudstack/pull/10774#discussion_r2059624260


##########
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java:
##########
@@ -810,7 +811,7 @@ public Answer createVolume(final CreateObjectCommand cmd) {
             final SR poolSr = hypervisorResource.getStorageRepository(conn,
                     CitrixHelper.getSRNameLabel(primaryStore.getUuid(), 
primaryStore.getPoolType(), primaryStore.getPath()));
             VDI.Record vdir = new VDI.Record();
-            vdir.nameLabel = volume.getName();
+            vdir.nameLabel = getEncodedVolumeName(volume.getName());

Review Comment:
   In both places, the nameLabel is set to "cloud-<randomUUID>" before calling 
createVdi - so it shouldn't be an issue. I created a volume from a snapshot 
using a volume name that has an emoji and it created the following vdi:
   
![image](https://github.com/user-attachments/assets/b26de6ab-99f0-44dd-828e-5ee13f445ccd)
   
![image](https://github.com/user-attachments/assets/0ebe5fd5-90ea-44f3-8835-abbb062c353f)
   



##########
plugins/hypervisors/xenserver/src/main/java/com/cloud/hypervisor/xenserver/resource/XenServerStorageProcessor.java:
##########
@@ -810,7 +811,7 @@ public Answer createVolume(final CreateObjectCommand cmd) {
             final SR poolSr = hypervisorResource.getStorageRepository(conn,
                     CitrixHelper.getSRNameLabel(primaryStore.getUuid(), 
primaryStore.getPoolType(), primaryStore.getPath()));
             VDI.Record vdir = new VDI.Record();
-            vdir.nameLabel = volume.getName();
+            vdir.nameLabel = getEncodedVolumeName(volume.getName());

Review Comment:
   @sureshanaparti In both places, the nameLabel is set to "cloud-<randomUUID>" 
before calling createVdi - so it shouldn't be an issue. I created a volume from 
a snapshot using a volume name that has an emoji and it created the following 
vdi:
   
![image](https://github.com/user-attachments/assets/b26de6ab-99f0-44dd-828e-5ee13f445ccd)
   
![image](https://github.com/user-attachments/assets/0ebe5fd5-90ea-44f3-8835-abbb062c353f)
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to