Bug 999147 - RFE: Add the ability to set labels for machine containers
RFE: Add the ability to set labels for machine containers
Status: NEW
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks: systemd-containers
  Show dependency treegraph
 
Reported: 2013-08-20 15:51 EDT by Jóhann B. Guðmundsson
Modified: 2016-08-25 16:17 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jóhann B. Guðmundsson 2013-08-20 15:51:36 EDT
Description of problem:

When dealing with multiple containers we should allow administrators to set alias for components which will allow them to easily identify multiple company's they are hosting/running containers for in their infrastructure.

Something in the form of ...

systemd-nspawn -xxx /containers/www.example.com/ -M www.example.com -A "Red Hat"

and or machinectl xxx -A "Red Hat" which would yield 

MACHINE                          CONTAINER SERVICE     Alias    
www.example.com                  container nspawn      Red Hat 

with multiple containers this for example would look like...

MACHINE                           CONTAINER SERVICE      Alias    
www.example1.com                  container nspawn      Red Hat 
www.example2.com                  container nspawn      Red Hat
www.example3.com                  container nspawn      Red Hat
www.example1.org                  container nspawn      Fedora 
www.example2.org                  container nspawn      Fedora
www.example3.org                  container nspawn      Fedora

Followed by something like machinectl list -A Fedora
MACHINE                           CONTAINER SERVICE      Alias
www.example1.org                  container nspawn      Fedora 
www.example2.org                  container nspawn      Fedora
www.example3.org                  container nspawn      Fedora

This would allow administrators to set all kinds of infrastructure policy's/code/scripts surrounding the "Alias" as opposed to the domain name.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
Comment 1 Lennart Poettering 2013-09-12 15:24:27 EDT
You want some kind of grouping here? The term "Alias" doesn't imply grouping?
Comment 2 Jóhann B. Guðmundsson 2013-09-12 15:56:56 EDT
Tag/alias/grouping basically something that says this container belongs to "X". 

If people want to charge or otherwise monitor resource usage on containers they need a way to see a) which customer/group the container belongs to and b) how much resources have been allocated to him.
Comment 3 Lennart Poettering 2013-09-12 17:45:26 EDT
Wouldn't it suffice if we support glob-based wildcard matching when listing machines, and then leaving it to the administrator to name his machines "customer1-foo", "customer1-bar", "customer2-waldo" so that he can match: "machinectl list-machines customer1-*" or so? That sounds a lot more powerful to me.
Comment 4 Jóhann B. Guðmundsson 2013-09-13 03:07:02 EDT
(In reply to Lennart Poettering from comment #3)
> Wouldn't it suffice if we support glob-based wildcard matching when listing
> machines, and then leaving it to the administrator to name his machines
> "customer1-foo", "customer1-bar", "customer2-waldo" so that he can match:
> "machinectl list-machines customer1-*" or so? That sounds a lot more
> powerful to me.

Not really ( all thou it makes sense to support that as well ) and I know you dont like hearing this but administrator would name the containers or the machines as you like to call it by their fqdn ( even application containers ) or by some other factors certainly not by their customer name which only work internally in small company's and small businesses and for home users . 

"Alias" is bad word "Label" is probably more appropriate since it could be used for whatever naming scheme is being used in the relevant infrastructure and I think we need to add that field to the entire type units we have and list it under the documentation field for services in status output if filled out.


MACHINE                           CONTAINER SERVICE      Label <-- 
www.example1.com                  container nspawn      Red Hat

And for application containers 

example.service - example service 
   Loaded: loaded (/usr/lib/systemd/system/example.service; disabled)
   Active: active (running) since Fri 2013-09-13 06:33:25 GMT; 2s ago
     Docs: foo
    Label: Red Hat <--
  Process: ...

Now if I weren't technology challenged coding monkey which limits me to provide feedback only, I would have called the command containerctl which clearly identifies for the administrators they are working with containers and I would have it output like this when ran ( and arguably add to that the resource assignement )

CONTAINER                     Type        SERVICE      Label <-- 
www.example1.com              machine     nspawn      Red Hat
httpd                         application nspawn      Red Hat
contained-gnome-application   application nspawn      Gnome
....

Note You need to log in before you can comment on or make changes to this bug.