Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1056988 - Uninstalling ipa-client overwrite hostname
Summary: Uninstalling ipa-client overwrite hostname
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: ipa
Version: 6.5
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Martin Kosek
QA Contact: Namita Soman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-01-23 10:02 UTC by amedeo
Modified: 2014-02-06 12:07 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-06 12:07:00 UTC


Attachments (Terms of Use)

Description amedeo 2014-01-23 10:02:39 UTC
Description of problem:
When you uninstall ipa-client, and specifically when you uninstall it on a cloned virtual machine (due to change hostname / new VM with new hostname), ipa-client-install --uninstall restore hostname that it found on his configuration files, either if it's changed on /etc/sysconfig/network.

Version-Release number of selected component (if applicable):
# rpm -qa | grep ipa-
ipa-client-3.0.0-37.el6.x86_64
ipa-python-3.0.0-37.el6.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Clone VM (source hostname: client01) that it's an ipa-client;
2. boot cloned VM on single mode and change hostname on /etc/sysconfig/network to client02;
3. reboot VM client02 again on single mode;
4. on single mode, with no network (due to not contact ipa-server) launch ipa-client-install --uninstall on client02; 
5. reboot client02
6. now client02 has hostname parameter on /etc/sysconfig/network file equals to "client01"

Actual results:
ipa-client-install --uninstall overwrite hostname on /etc/sysconfig/network


Expected results:
No overwrite hostname on /etc/sysconfig/network file

Additional info:

Comment 2 Rob Crittenden 2014-01-23 14:12:24 UTC
Why would you enroll a host in IPA then clone it and change its name? It will still have the identity of the original system and likely won't work anyway.

ipa-client-install saves a lot of state of the way the system was prior to configuration and restores it if you uninstall. I don't see this as a problem.

Comment 3 amedeo 2014-01-23 16:06:16 UTC
(In reply to Rob Crittenden from comment #2)
> Why would you enroll a host in IPA then clone it and change its name? It

new deploy... new VM that is similar from the source but with new workload (and with applications stack just installed on it) --> the source VM still is alive, so at the end, there are two (or more) VM / entities, and for this reason I uninstall ipa-client without network, due to not inform ipa-server that ipa-client was uninstalled (otherwise I have to reinstall ipa-client on both source and destination VM)

> will still have the identity of the original system and likely won't work
> anyway.
> 
> ipa-client-install saves a lot of state of the way the system was prior to
> configuration and restores it if you uninstall. I don't see this as a
> problem.

I think (on my opinion) that if I've changed hostname on the host, and if I uninstall ipa-client, there are no reason to change hostname on the host -> It's my choice (to change hostname) and your software it's going away (ipa-client-install --uninstall)

Comment 4 Dmitri Pal 2014-01-24 18:09:26 UTC
If you change the host name why you do not stand up a new VM with a new host name, let it add itself to the DNS SRV records, remove the old one from SRV records, uninstall the old one or shut it down. This way you have consistent service without unnecessary operations. Of cause that assumes that the service is discovered by DNS, well, this is a general expectation nowadays.

Comment 5 amedeo 2014-01-26 16:09:38 UTC
No, the new VM will coesist with old / source VM! It need only to change hostname and configure authentication / monitoring tools... but the question is:

why when I uninstall ipa-client, it overwrite hostname? 
It's not requested and ipa-client it's goind away, so it has no reason to roll back this configuration file to previusly content.

Comment 6 Rob Crittenden 2014-01-27 14:18:25 UTC
This file is only restored if we save it. We only save it if --hostname is passed to ipa-client-install which changes the value of the hostname. You should be able to confirm this in /var/log/ipaclient-install.log on the original host.

So don't use the --hostname option if you are going to snapshot in this way.

Or better, don't enroll your template instance as an IPA client if the first thing you're going to do after cloning is unenroll it. This will have other consequences too for that original install.

Comment 7 Martin Kosek 2014-02-06 12:07:00 UTC
Rob is right, I do not think this is really a bug on FreeIPA side. Closing as NOTABUG.


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