Yenya
(Jan "Yenya" Kasprzak)
February 28, 2025, 7:20am
1
Hi all,
it seems that there is an incorrect check for duplicate image names, which prohibits renaming images to a new name with different case:
$ oneimage create -d 100 --name test --type DATABLOCK --size 1
ID: 42
$ oneimage rename 42 xxx
$ oneimage rename 42 Xxx
[one.image.rename] image cannot be renamed to Xxx because it collides with image 42
$ oneimage delete 42
This is ONe 6.10.0 CE. Thanks,
-Yenya
FrancJP
(Francisco Picolini)
March 3, 2025, 12:32pm
2
Hello @Yenya ,
Renaming an image to a name differing only by letter case results in a conflict error due to OpenNebula’s case-insensitive handling of image names.
You can find more information on the documentation
As a workaround, you can rename it by using an intermediate name. However, if you feel this shouldn’t be the behaviour, you are more than welcome to file an issue on the repo.
Let me know, so I can do a follow-up if needed.
Cheers,
Yenya
(Jan "Yenya" Kasprzak)
March 5, 2025, 8:29am
3
Hi @FrancJP - issue created:
opened 08:28AM - 05 Mar 25 UTC
Status: Pending
**Description**
It should be possible to rename objects (VMs, templates, images,… etc.) to a new name differing only in character case. Currently ONe does not allow this, complaining that object of the same name already exists. A workaround is to do two renames with a completely different intermediate name.
**To Reproduce**
```
$ oneimage create -d 100 --name test --type DATABLOCK --size 1
ID: 42
$ oneimage rename 42 xxx
$ oneimage rename 42 Xxx
[one.image.rename] image cannot be renamed to Xxx because it collides with image 42
$ oneimage delete 42
```
**Expected behavior**
`oneimage rename 42 Xxx` above should succeed, even if the original name is `xxx`.
**Details**
- Affected Component: Sunstone, XML API
- Hypervisor: KVM
- Version: 6.10.0 CE
**Additional context**
Originally discussed here:
https://forum.opennebula.io/t/bug-renaming-image-case-only-fails/13613
## Progress Status
- [ ] Code committed
- [ ] Testing - QA
- [ ] Documentation (Release notes - resolved issues, compatibility, known issues)
-Yenya
1 Like