Small tags inconsistency

mvtab

New Member
Jul 11, 2024
10
0
1
Hello,

I noticed that if I manually assign tags to a vm through the web interface, when retrieving the tags (i.e. with pvesh get nodes/<node>/qemu/<vmid>/config), they will be listed as tag1;tag2;tag3, while if I assign them through the command line (tested only at creation), when retrieving them from the same source they will be listed as tag1,tag2,tag3. I assume this is because of what semicolons do in a command line, but it would be nice if they were stored internally in the same format.

The problem is obviously hardly noticeable, and I seriously doubt it will affect anyone (like.. ever), but I was trying to automate some VM documentations and I stumbled upon this.
 
Last edited:
It does look like there is a bit of inconsistency.
Via GUI: tags: t1;t2;t3
Via 'qm set 9012 --tags "i1 i2"' : tags: i1;i2
Via 'qm create 999 --tags "l1 l2 l3"' : tags: l1 l2 l3
Update 999 via gui: tags: l1;l2;l3;l4

Although, I did not get a comma separator. Perhaps you should supply the CLI you used for that case.

P.S.
root@pve-2:~# qm create 999 --tags "l1,l2,l3"
root@pve-2:~# qm config 999|grep tag
tags: l1,l2,l3
Updated via GUI to add a tag
root@pve-2:~# qm config 999|grep tag
tags: l1;l2;l3;l4

PPS
Code:
root@pve-2:~# qm set 9012 --tags "l1,l3,l4"
update VM 9012: -tags l1,l3,l4
root@pve-2:~# qm config 9012|grep tag
tags: l1;l3;l4


Blockbridge : Ultra low latency all-NVME shared storage for Proxmox - https://www.blockbridge.com/proxmox
 
Last edited:
  • Like
Reactions: mvtab
Yeah, I think we might miss some normalization somewhere in the guest creation code path.
Most API properties that are a list (array) of simple strings (without special characters) are using a common separation mechanism that accepts comma, semicolon or space as separator interchangeably, so for PVE internally this is not a problem, but I can get why one, or their tooling, might be confused here.

Would be great if you could create an enhancement request for this over at https://bugzilla.proxmox.com/
 
  • Like
Reactions: mvtab and bbgeek17
Interesting, so it's actually kind of a "catch-all" system that caused the inconsistency.

@bbgeek17, I would be grateful if you could do it, you already gathered the most valuable info and I don't even have an account on Proxmox's Bugzilla yet.

Thank you for the clarifications!
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!