You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by "OlegChuev (via GitHub)" <gi...@apache.org> on 2025/09/26 07:48:23 UTC

[I] [API] ISO download does not work if ISO has 255 chars name [cloudstack]

OlegChuev opened a new issue, #11731:
URL: https://github.com/apache/cloudstack/issues/11731

   ### problem
   
   Low-priority edge case: when I try to download an ISO with a 255-character name, it fails with a 530 error code.
   
   Error details:
   
   ```text
   Unable to create a link for entity at ... on ssvm
   Error in linking  err=ln: failed to access ... File name too long
   ```
   
   ### versions
   
   4.20.1.0
   
   ### The steps to reproduce the bug
   
   1. Create ISO with 255 characters name
   
   2. Click download ISO 
   ```text
   http://acs/client/api/?id=4c9b4c93-f619-4c51-b31c-cadd1c1b87c5&zoneid=b4ea7028-40ff-465f-a4a4-57a599dbf988&mode=HTTP_DOWNLOAD&command=extractIso&response=json
   ```
   
   3. Check response
   
   ```json
   {
     "accountid": "fd3e34a9-2a85-11f0-ac08-02420a000a3d",
     "account": "admin",
     "domainid": "da3cc579-2a85-11f0-ac08-02420a000a3d",
     "domainpath": "ROOT",
     "userid": "fd3f18a1-2a85-11f0-ac08-02420a000a3d",
     "cmd": "org.apache.cloudstack.api.command.user.iso.ExtractIsoCmd",
     "jobstatus": 2,
     "jobprocstatus": 0,
     "jobresultcode": 530,
     "jobresulttype": "object",
     "jobresult": {
       "errorcode": 530,
       "errortext": "Unable to create a link for entity at template/tmpl/8/321/321-8-51a8ff71-e1e8-37b8-a498-30c164def1a7.iso on ssvm, Error in linking  err=ln: failed to access '/var/www/html/userdata/a6df0ad8-7046-4a8b-8b26-e718ab89aa15/P3B5tC3uv5BJMDRQWa7wo001l9WI9cmtVn4yDSQcOUu8ACSzzaC966P6Rgpu0rzQU0uikKKRIfLfLRDiUiSRiegUundPK6Zwmlrb9MHYhxFHOu7IV4aygBXLMnXPNCKKbBU4XtrwLUcyb3V3nu0HsSnma8SkTQUAIUneRweW0Eq5rFLS1e9mcdbpnlvTcjULAtnWC1HQYkemaTSfjlkkFhhuXq7mLNhhj670ulBFCdhNeibm0E2Nyv5Al5eHV.iso': File name too long"
     },
     "jobinstancetype": "Iso",
     "jobinstanceid": "4c9b4c93-f619-4c51-b31c-cadd1c1b87c5",
     "created": "2025-09-26T07:41:49+0000",
     "completed": "2025-09-26T07:41:49+0000",
     "jobid": "24edb09b-f9c9-4179-8fc7-46dd2ed5f392"
   }
   ```
   
   ### What to do about it?
   
   Either limit the ISO/Template name/description to fewer characters (I’d suggest 100 should be more than enough), or update the system to allow longer filenames and handle this case properly


-- 
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-unsubscribe@cloudstack.apache.org.apache.org

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


Re: [I] [API] ISO download does not work if ISO has 255 chars name [cloudstack]

Posted by "sudo87 (via GitHub)" <gi...@apache.org>.
sudo87 commented on issue #11731:
URL: https://github.com/apache/cloudstack/issues/11731#issuecomment-3753247295

   Issue is seen while creating symlink: 
   ```
   /bin/bash -c ln -sf /mnt/SecStorage/11fc2b10-65df-34b1-a17e-489c41bdc41a/template/tmpl/2/226/226-2-870822a4-5c09-381b-8bb3-4ae3c52b277e.iso /var/www/html/userdata/c1ce5fef-8445-49d3-a129-04fa05c1df7d/<LONG-NAME-ISO> 
   ```
    https://github.com/apache/cloudstack/blob/507c4cd12899b26acdd5ad9cff4eb91e4ddb1849/services/secondary-storage/server/src/main/java/org/apache/cloudstack/storage/template/UploadManagerImpl.java#L300
   
   Linux filesystems (ext4/xfs/btrfs) enforce: Maximum filename length (NAME_MAX): 255 bytes. Supporting 255 or longer file names would not be possible. 
   
   We can put decent limit on ISO filename used for RegisterIsoCmd. cc @DaanHoogland 


-- 
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-unsubscribe@cloudstack.apache.org

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


Re: [I] [API] ISO download does not work if ISO has 255 chars name [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #11731:
URL: https://github.com/apache/cloudstack/issues/11731#issuecomment-3753601305

   As discussed on call @sudo87 , I think to prevent any backwards compatibility issue we have to use 251 ; 255 - strlen(“.iso”) on all related APIs.


-- 
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-unsubscribe@cloudstack.apache.org

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


Re: [I] [API] ISO download does not work if ISO has 255 chars name [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland closed issue #11731: [API] ISO download does not work if ISO has 255 chars name
URL: https://github.com/apache/cloudstack/issues/11731


-- 
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-unsubscribe@cloudstack.apache.org

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


Re: [I] [API] ISO download does not work if ISO has 255 chars name [cloudstack]

Posted by "DaanHoogland (via GitHub)" <gi...@apache.org>.
DaanHoogland commented on issue #11731:
URL: https://github.com/apache/cloudstack/issues/11731#issuecomment-3790846604

   fixed by #12430 


-- 
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-unsubscribe@cloudstack.apache.org

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