Bug 999068

Summary: Add --nohostname to agetty services
Product: [Fedora] Fedora Reporter: Jóhann B. Guðmundsson <johannbg>
Component: systemdAssignee: systemd-maint
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: gholms, johannbg, lnykryn, msekleta, plautrba, systemd-maint, vpavlin, zbyszek
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-11 19:11:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1000189    
Attachments:
Description Flags
getty show full hostname patch
none
serial getty show full hostname patch
none
Adding --nohostname to agetty service none

Description Jóhann B. Guðmundsson 2013-08-20 16:31:36 UTC
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

to 

ExecStart=-/sbin/agetty --noclear --long-hostname %I


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Jóhann B. Guðmundsson 2013-08-20 16:59:36 UTC
Created attachment 788562 [details]
serial getty show full hostname patch

Comment 2 Zbigniew Jędrzejewski-Szmek 2013-08-21 03:05:50 UTC
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...

Comment 3 Jóhann B. Guðmundsson 2013-08-21 08:24:12 UTC
(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 )

/sys/fs/cgroup/

`-- systemd

    |-- machine.slice 

    |   |-- 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...

`-- systemd
    |-- machine.slice
    |...
    |-- application.slice
    |
    |-- system.slice
    |...
    `-- user.slice

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 )

/sys/fs/cgroup/

`-- systemd

    |-- machine.slice

    |   `-- machine-customer01.scope
    
    |       |-- application.slice

    |       |   |-- httpd.service

    |       |-- system.slice

    |       |   |-- console-getty.service

    |       |   |-- systemd-journald.service

    |       |   

    |       `-- user.slice 
    ....

( Application Container Host )

/sys/fs/cgroup/

`-- systemd

    |-- machine.slice

    |-- application-customer01.slice

    |   |-- httpd.service

    |-- application-customer02.slice

    |   |-- httpd.service

    |-- application-customer03.slice

    |   |-- httpd.service

    |-- system.slice

    |   |-- console-getty.service

    |   |-- systemd-journald.service

    |
    `-- user.slice

Comment 4 Jóhann B. Guðmundsson 2013-08-22 20:03:03 UTC
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.

Thanks

Comment 5 Jóhann B. Guðmundsson 2013-08-22 21:08:26 UTC
FESCO ticket https://fedorahosted.org/fesco/ticket/1161