Skip to content

[API] ISO download does not work if ISO has 255 chars name #11731

Closed

Description

@OlegChuev

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:

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

http://acs/client/api/?id=4c9b4c93-f619-4c51-b31c-cadd1c1b87c5&zoneid=b4ea7028-40ff-465f-a4a4-57a599dbf988&mode=HTTP_DOWNLOAD&command=extractIso&response=json
  1. Check response
{
  "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

Activity

  1. added this to the 4.20.3 milestone on Sep 26, 2025
  2. added theissue type on Sep 26, 2025
  3. sudo87 commented on Jan 15, 2026

    @sudo87
    Contributor

    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> 
    

    command.add("ln -sf /mnt/SecStorage/" + cmd.getParent() + File.separator + cmd.getInstallPath() + " " + extractDir + filename);

    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 (200 or so) limit on ISO filename used for RegisterIsoCmd. cc @DaanHoogland

  4. moved this from Todo to Dev In Progress in Apache CloudStack BugFest - Issueson Jan 15, 2026
  5. DaanHoogland commented on Jan 15, 2026

    @DaanHoogland
    Contributor

    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.

  6. moved this from Dev In Progress to ready for Review in Apache CloudStack BugFest - Issueson Jan 16, 2026
  7. moved this from ready for Review to ready for Testing in Apache CloudStack BugFest - Issueson Jan 16, 2026
  8. moved this from ready for Testing to In Testing in Apache CloudStack BugFest - Issueson Jan 22, 2026
  9. self-assigned this
    on Jan 22, 2026
  10. DaanHoogland commented on Jan 23, 2026

    @DaanHoogland
    Contributor

    fixed by #12430

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions