Red Hat Bugzilla – Bug 999068
Add --nohostname to agetty services
Last modified: 2013-09-11 15:11:37 EDT
Created attachment 788559 [details]
getty show full hostname patch
Description of problem:
With the introduction of machine slices we should start showing full hostname at login prompt and shell(s) for administration convenience which requires minor adjustments to the getty@.service where Execstart needs to be change from
ExecStart=-/sbin/agetty --noclear %I
ExecStart=-/sbin/agetty --noclear --long-hostname %I
Version-Release number of selected component (if applicable):
Steps to Reproduce:
Created attachment 788562 [details]
serial getty show full hostname patch
Hm, do you expect people to have the same hostname and different domain name in containers (not slices, I don't think slices have anything to do with this)? The domain name part is usually less interesting...
(In reply to Zbigniew Jędrzejewski-Szmek from comment #2)
> Hm, do you expect people to have the same hostname and different domain name
> in containers (not slices, I don't think slices have anything to do with
> this)? The domain name part is usually less interesting...
Hmm not following you,the standard practice is more or less always to use fqdn everywhere so it would be something like this...
ISP server blade,pizza box, something like for example ( depends on that internal corporate naming rule )
containers01.example.com ( blade01 )
| |-- machine-lamp-customer01.slice ( www.ackme.com - container01 )
|-- machine-pyweb-customer02.slice ( www.ackme.org - container02 )
as you can see this collides immediately since agetty splits at the first dot as in both these containers would appear as www <-- -on the login prompt and in bash ( patches filed for that as well) and would cause unnecessary administrative nuances and be prone to administrators mistakes.
I'm not sure if you know this but to be clear there needs to be two types of slices for two different types of containers for administrators to use in their infrastructure(s).
One is machine.slice which is an Linux OS container as in a container you would install something outside the parent OS ( even different distro like deb or arch ) into and spawn via systemd-nspawn -jbD
The other one is application container which you would reuse the entire host setup ( so the parent os would be setup like web server ) and spawn only separate application instances ( which you use the libvirt/selinux stuff to setup/use ) which I do believe we lack and need to introduce to make that distinction clear ( unless ofcourse Lennart thought of using system slice for that purpose but that's misleading ).
So basically there should be four ( or five if we count .slice ) slice units from my administrative perspective as in...
System slice being only for the system while application slice is specifically for individual applications ( like httpd.service ) so you would end up with something like this in the overall design.
( OS Container Host )
| `-- machine-customer01.scope
| |-- application.slice
| | |-- httpd.service
| |-- system.slice
| | |-- console-getty.service
| | |-- systemd-journald.service
| `-- user.slice
( Application Container Host )
| |-- httpd.service
| |-- httpd.service
| |-- httpd.service
| |-- console-getty.service
| |-- systemd-journald.service
Created attachment 789330 [details]
Adding --nohostname to agetty service
After a bit of discussion on devel the cleanest way seems to be to add a new Host: $HOSTNAME to /etc/issue and remove short hostname from the login prompt.
The attach part takes care of the agetty parts of that.
I'm creating a fesco ticket to make the final decision on approve this implementation hence wait to commit until they have decided.
I'll make a note which ticket that is on this bug once I've created it.
FESCO ticket https://fedorahosted.org/fesco/ticket/1161