Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RHEL 7 Hostname not set correctly in example snippets. #1653

Closed
Asysadmin opened this issue Apr 8, 2016 · 5 comments
Closed

RHEL 7 Hostname not set correctly in example snippets. #1653

Asysadmin opened this issue Apr 8, 2016 · 5 comments

Comments

@Asysadmin
Copy link

Summary: Cobbler 2.6.10 is setting the hostname wrong for RHEL 7 systems.

Steps to reproduce:
Create an entry under "Systems" and in "Networking(Global)" set a hostname in the "Hostname" field.

Research:
Cobbler will set that hostname by adding it to /etc/sysconfig/network. While this is correct for RHEL6, is is wrong for RHEL7.

Under RHEL 7 (per redhat)* The correct way to set the hostname is:
hostnamectl set-hostname name

Note: It appears that (once I fixed a bug in my config) the hostname is getting set even though we are not following the RHEL recommended way of doing this in RHEL7.

*Ref: https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec_Configuring_Host_Names_Using_hostnamectl.html

@Asysadmin Asysadmin changed the title RHEL 7 Hostname not set RHEL 7 Hostname not set correctly in example snippets. Apr 8, 2016
@nacc
Copy link

nacc commented Apr 11, 2016

Can you clarify after your last update? It seems like the RHEL 7 hostname is set correctly? Just not being done in the recommended by RH way?

@Asysadmin
Copy link
Author

You are correct that it is getting set. But per the RHEL documentation what the script is doing is not supported, and what the script is ding should not work. It does, but it should not.

It would probably be best if we did some sort of RHEL6/RHEL7 check and then called an appropriate action.

@nacc
Copy link

nacc commented Apr 12, 2016

I think you are reading the documentation too literally -- nothing in that page says what the current script does should not work, on my first reading? Can you quote such a section?

Tbh, this sounds like a nice-to-have (feel free to send a PR), but it would need thorough testing that that command is available in all environments.

@Asysadmin
Copy link
Author

I looked again with a fresh viewpoint, and your right. While they recommend using the new method to make the change it looks like as long as the file gets updated that works to.

So go ahead and reject this change as user error. :-)

@jmaas jmaas closed this as completed May 15, 2016
@dkanbier
Copy link

dkanbier commented Jun 9, 2016

@Asysadmin could you elaborate on the bug you fixed in the config? I'm facing the same issue..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants