#1368 ipa-client-install should configure hostname
Closed: Fixed None Opened 11 years ago by dpal.


Description of problem:
When enrolling a client which has been previously installed and set up to use
DHCP, the client's hostname can be more or less anything. Using
ipa-client-install --hostname sets the hostname for the client at the server
but leaves the client's /etc/sysconfig/network unmodified which might cause the
client to use a DHCP provided hostname which will be in conflict with the
hostname configured on the master side.

ipa-client-install should at least optionally configure /etc/sysconfig/network
to use the hostname specified with --hostname.

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

So, I've got this working for Fedora/RHEL. However, I think as it is, this is wrong way to proceed with ipa-install-client. As in ticket #1369, we can have different systems which store this information (in case of the ticket #1368, static hostname configuration) differently so a single way is not something that will work.

As with #1369, we would actually like to see tuning which is platform/system/distribution-specific. I can work out one that is for RHEL/Fedora but then we'll need more, at least for Debian/Ubuntu.

As proposed on freeipa-devel@, correct way seems to provide ipapython/ipautil/<system>.py which would override platform-specific functionality in ipapython/ipautil.py (service management, configuration files, etc). We don't need to do run time detection of the platform as ipa-client-install would be part of a platform-provided package anyway and packagers can set up python things properly in their debian/rules or RPM spec files.

Patch sent for review.

Metadata Update from @dpal:
- Issue assigned to abbra
- Issue set to the milestone: FreeIPA 2.1 - 2011/07

5 years ago

Login to comment on this ticket.