Bug 999068 - Add --nohostname to agetty services
Add --nohostname to agetty services
Status: CLOSED WONTFIX
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 12:31 EDT by Jóhann B. Guðmundsson
Modified: 2013-09-11 15:11 EDT (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-11 15:11:37 EDT
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)
getty show full hostname patch (901 bytes, patch)
2013-08-20 12:31 EDT, Jóhann B. Guðmundsson
no flags Details | Diff
serial getty show full hostname patch (953 bytes, patch)
2013-08-20 12:59 EDT, Jóhann B. Guðmundsson
no flags Details | Diff
Adding --nohostname to agetty service (1.82 KB, patch)
2013-08-22 16:03 EDT, Jóhann B. Guðmundsson
no flags Details | Diff

  None (edit)
Description Jóhann B. Guðmundsson 2013-08-20 12:31:36 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

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 12:59:36 EDT
Created attachment 788562 [details]
serial getty show full hostname patch
Comment 2 Zbigniew Jędrzejewski-Szmek 2013-08-20 23:05:50 EDT
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 04:24:12 EDT
(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 16:03:03 EDT
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 17:08:26 EDT
FESCO ticket https://fedorahosted.org/fesco/ticket/1161

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