Snapcraft produces too long instance name, instance launch fails
Metadata
Current evaluation
⚠️ This summary may be outdated — the issue content or evaluation prompts have changed since this evaluation was made.
Abandoned without resolution. Snapcraft generated LXC instance names exceeding the 63-character limit, causing launch failures. The suggested hashed naming approach was not implemented.
Suggested action: —
No scores available.
Issue body
$ snap info snapcraft|grep ^installed
installed: 7.0.11.post26+gita61c6032 (7943) 65MB classic
$ snapcraft pack
Failed to launch instance 'snapcraft-octavia-diskimage-retrofit-on-amd64-for-amd64-12194235'.
* Command that failed: "lxc --project snapcraft launch craft-com.ubuntu.cloud-buildd:core22 local:snapcraft-octavia-diskimage-retrofit-on-amd64-for-amd64-12194235 --config 'raw.idmap=both 1000 0' --config security.syscalls.intercept.mknod=true"
* Command exit code: 1
* Command output: b'Creating snapcraft-octavia-diskimage-retrofit-on-amd64-for-amd64-12194235\n'
* Command standard error output: b'Error: Failed instance creation: Invalid instance name: Name must be 1-63 characters long\n'
If you remove the snap name altogether the base name of the instance is:
snapcraft--on-amd64-for-amd64-12194235
$ echo -n"snapcraft--on-amd64-for-amd64-12194235"|wc
1 1 41
Which leaves 22 characters for the snap name in this case, or 20 if the inode number nears the max value.
Would you think this is sufficient? What about using a hashed instance name instead?
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Abandoned without resolution. Snapcraft generated LXC instance names exceeding the 63-character limit, causing launch failures. The suggested hashed naming approach was not implemented. | |
| qwen/qwen3.6-35b-a3b | — | — | Closed without resolution. Snapcraft generated LXC instance names exceeding the 63-character limit, causing pack failures. A hashed naming solution was suggested but never implemented. The report was abandoned due to inactivity. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Closed without resolution. Snapcraft generated LXC instance names exceeding the 63-character limit, causing pack failures. The author suggested hashing names, but no fix was implemented. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1590620 snapcraft can generage snaps with a name longer than 107 characters | snapcraft (launchpad) | open | Snapcraft only limits the generated snap file name, not the snap name itself, so it can build snaps whose names exceed the store's 107-character limit and fail at upload. Open since 2016, no labels or comments, untriaged. |