Iocage: alias vs. tag

Created on 17 Mar 2017  路  3Comments  路  Source: iocage/iocage

I'm a bit biased here given I come from how SmartOS handles things but bare with me for a second.

vmadm uses aliases for zones/vms/whatevers which are 'helpful' but not identifying. It make seeing what a vm does quite easy as you can alias it as 'whatever'.

iocage uses a tag to some extend the same way, with the one difference that tags carry a meaning, as in they identify the jail the same way a uuid does. Which leads to the situation that jails don't only have to have unique UUIDs (hah double unique!) but also unique tags.

I see two potential issues with this (which are partially based on the way I'm looking at iocage ;):

1) in a multi Tennant environment it's highly likely that two people want to have a jail named 'nginx' or 'webserver' or 'db' which would horribly explode.
2) the word 'tag' is a bit misleading to me, in most contexts I can think of (and I probably forgbot a few) tags are neither unique nor limited to one. When I read tag I thought "Oh nice so I could slap on a number of tags that identify what the vm does"

I suspect it'll be easy enough to implement a 'alias' like function along the comment property (just put something in there) and read it.

question

All 3 comments

Well the way I see it, in a multi-tenant situation, you'd prefix every tag with the user user1_nginx or some other system. That seems to be more a user exercise.

I can appreciate what you expected with the tag, but I believe the comment property serves that purpose better. It's called tag because of historical purposes, and it just didn't make sense to make everyone switch over to a whole naming scheme with the new one.

The tags are really meant for small deployments and home users. Since it creates a shortcut in /iocage/tags/TAG so they don't need the UUID and lets them manage everything easier. In the situations you're talking about I'd recommend not setting a tag at all and using the UUID for every operation. You can use short UUIDs as that makes life much easier, all the way down to 1 character.

makes perfect sense!

:D

Was this page helpful?
0 / 5 - 0 ratings