Bug 1572262 - atomic uninstall -f rhel7/sssd realm leave -v <AD-DOMAIN> throws warning unable to find <uuid> in the installed containers
Summary: atomic uninstall -f rhel7/sssd realm leave -v <AD-DOMAIN> throws warning unab...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: atomic
Version: 7.5
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Giuseppe Scrivano
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-26 14:40 UTC by Niranjan Mallapadi Raghavender
Modified: 2018-12-19 21:58 UTC (History)
11 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-08-22 13:37:34 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Niranjan Mallapadi Raghavender 2018-04-26 14:40:31 UTC
Description of problem:
atomic uninstall throws a warning message and returns with error code 1. 

Below is the use case where i am uninstalling an application container. 

[root@host-8-251-130 sssd]# atomic uninstall -f rhel7/sssd realm leave -v JUNO.TEST
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh realm leave -v JUNO.TEST
Unable to find 4ded565230b4c2bf9da4f1ea7a3c80c36c023f0e6b8658ba44f1b265c8c79476 in the installed containers

Version-Release number of selected component (if applicable):
atomic-1.22.1-3.git2fd0860.el7.x86_64

How reproducible:


Steps to Reproduce:
1. Install sssd application container
atomic install --opt1='--dns=10.65.223.136 --dns-search=juno.test --hostname=abc.juno.test -e SSSD_CONTAINER_TYPE=application --net=default' rhel7/sssd realm join -v JUNO.TEST

2.Uninstall the container

atomic uninstall -f rhel7/sssd realm leave -v JUNO.TEST
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh realm leave -v JUNO.TEST
Unable to find 4ded565230b4c2bf9da4f1ea7a3c80c36c023f0e6b8658ba44f1b265c8c79476 in the installed containers



Actual results:

Throws warning Unable to find 4ded565230b4c2bf9da4f1ea7a3c80c36c023f0e6b8658ba44f1b265c8c79476 in the installed containers and return error code 1

Expected results:


Should not throw any warning and uninstall should be clean. 


Additional info:

Comment 3 Giuseppe Scrivano 2018-04-26 16:50:30 UTC
could you try with this version:

https://github.com/projectatomic/atomic/pull/1219

Comment 4 Niranjan Mallapadi Raghavender 2018-04-27 09:47:58 UTC
I pull Atomic from Github and applied your patch  on non Atomic Host. 

1. git clone https://github.com/projectatomic/atomic.git
2. wget https://patch-diff.githubusercontent.com/raw/projectatomic/atomic/pull/1219.patch
3. git apply  /root/1219.patch
4. cd atomic/
5. python setup.py install

2 Test cases i checked. 
Test case1. Install SSSD as application container and Uninstalling it
Test Case2. Install SSSD as system container and Uninstalling it. 


Test case1. Install SSSD as application container and Uninstalling it
=====================================================================

A. Install sssd container as Application container:

$ atomic install --opt1='--dns=10.65.223.136 --dns-search=juno.test --hostname=abc.juno.test -e SSSD_CONTAINER_TYPE=application --net=default' rhel7/sssd realm join -v JUNO.TEST



B. Uninstall the container:

[root@client-8844 ~]# atomic uninstall -f rhel7/sssd realm leave -v JUNO.TEST
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh realm leave -v JUNO.TEST
[root@client-8844 ~]# atomic install --opt1='--dns=10.65.223.136 --dns-search=juno.test --hostname=abc.juno.test -e SSSD_CONTAINER_TYPE=application --net=default' rhel7/sssd realm join -v JUNO.TEST


Test Case2. Install SSSD as system container and Uninstalling it. 
==================================================================

Join to Windows AD

1. atomic install rhel7/sssd realm join -v --membership-software=samba JUNO.TEST

2. Start the system container
systemctl start sssd

3. Stop the container
systemctl stop sssd

4. Uninstall the container
$ atomic uninstall -f rhel7/sssd realm leave -v JUNO.TEST
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh realm leave -v JUNO.TEST
Initializing configuration context from host ...
Warning: Failed to copy /etc/yp.conf to host. It cannot be a directory
 * Removing entries from keytab for realm
 * /usr/sbin/sss_cache --users --groups --netgroups --services --autofs-maps
No cache object matched the specified search
 ! Flushing the sssd cache failed
 * Removing domain configuration from sssd.conf
 * /usr/sbin/authconfig --update --disablesssdauth --nostart
 * /usr/bin/systemctl disable sssd.service
 * Successfully unenrolled machine from realm
Copying new configuration to host ...
Removing /etc/krb5.keytab
Removing /etc/pam.d/smtp
Removing /etc/sssd/systemctl-lite-enabled/sssd.service
Removing /etc/yp.conf
Removing /var/lib/sss/pipes/private/sbus-dp_juno.test.71
Removing /var/lib/sss/pipes/private/sbus-monitor
Removing /var/lib/sss/pipes/private/sbus-dp_juno.test.13
Removing /var/lib/sss/pipes/private/sbus-dp_juno.test
Removing /var/lib/sss/pipes/private/pam

No errors Seen.

Comment 5 Niranjan Mallapadi Raghavender 2018-04-27 09:49:04 UTC
But i would like a test build that i can install atomic host and run a whole test suites that we have for sssd to check if there is anything else we need to check.

Comment 6 Nikhil Dehadrai 2018-05-02 07:57:00 UTC
sssd-container-image:
sssd-docker-7.5-8

ipa-server :
ipa-server-4.5.4-10.el7_5.1.x86_64

ipa-client:
ipa-client-4.5.4-10.el7_5.1.x86_64

atomic-host-version:
 Version: 7.5.1 (2018-04-19 14:39:11)

This issue is also observed when sssd-container images is installed as an ipa-client, and upon uninstalling, the same Warning message is observed.


Type-1:
-------
[root@ipasssdclient ~]# atomic uninstall -f rhel7/sssd
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh
Initializing configuration context from host ...
Unenrolling client from IPA server
Removing Kerberos service principals from /etc/krb5.keytab
Disabling client Kerberos and LDAP configurations
Redundant SSSD configuration file /etc/sssd/sssd.conf was moved to /etc/sssd/sssd.conf.deleted
Restoring client configuration files
Unconfiguring the NIS domain.
nscd daemon is not installed, skip configuration
nslcd daemon is not installed, skip configuration
Client uninstall complete.
The ipa-client-install command was successful
Copying new configuration to host ...
Removing /etc/ipa/nssdb/pwdfile.txt
Removing /etc/ipa/nssdb/secmod.db
Removing /etc/ipa/nssdb/cert8.db
Removing /etc/ipa/nssdb/key3.db
Removing /etc/ipa/ca.crt
Removing /etc/ipa/default.conf
Removing /etc/sssd/systemctl-lite-enabled/sssd.service
Removing /etc/sssd/systemctl-lite-enabled/rhel-domainname.service
Removing /etc/sssd/sssd.conf
Removing /var/lib/ipa-client/sysrestore/eaab4f1ec7c5c910-nsswitch.conf
Removing /var/lib/ipa-client/sysrestore/sysrestore.index
Removing /var/lib/ipa-client/sysrestore/14439d64e18dabec-krb5.conf
Removing /var/lib/ipa-client/sysrestore/sysrestore.state
Removing /var/lib/ipa-client/sysrestore/efd22eb9ead31166-ldap.conf
Removing /var/lib/ipa-client/sysrestore/e805a80fcfb66c5d-ssh_config
Removing /var/lib/ipa-client/sysrestore/5486b0adf0fe619a-sshd_config
Removing /var/lib/sss/mc/passwd
Removing /var/lib/sss/mc/group
Removing /var/lib/sss/pipes/private/sbus-dp_nd2may.pnq.88
Removing /var/lib/sss/pipes/private/sbus-monitor
Removing /var/lib/sss/pipes/private/sbus-dp_nd2may.pnq.12
Removing /var/lib/sss/pipes/private/sbus-dp_nd2may.pnq
Removing /var/lib/sss/pipes/private/pam
Removing /var/lib/sss/db/cache_nd2may.pnq.ldb
Removing /var/lib/sss/db/ccache_ND2MAY.PNQ
Unable to find 4ded565230b4c2bf9da4f1ea7a3c80c36c023f0e6b8658ba44f1b265c8c79476 in the installed containers
[root@ipasssdclient ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@ipasssdclient ~]# 


Type-2: (application-container)
---------
[root@ipasssdclient ~]# atomic uninstall -f rhel7/sssd
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh
Unable to find 4ded565230b4c2bf9da4f1ea7a3c80c36c023f0e6b8658ba44f1b265c8c79476 in the installed containers
[root@ipasssdclient ~]# docker ps
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS              PORTS               NAMES
[root@ipasssdclient ~]#

Comment 7 Niranjan Mallapadi Raghavender 2018-06-20 09:02:54 UTC
which version of Atomic contains this fix, I check with atomic-1.22.1-4.git1895984.el7.x86_64 on RHEL7.5.2 Atomic Host and this issue still persists:

[root@client2 sssd]# atomic uninstall -f rhel7/sssd realm leave -v CENTAUR.TEST
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh realm leave -v CENTAUR.TEST
Unable to find fcad3b87bd8bc3e3369250121d8154ef0aba0d9cda1641217a4fee96dcd0db8b in the installed containers
[root@client2 sssd]# echo $?
1
[root@client2 sssd]# rpm -q atomic 
atomic-1.22.1-4.git1895984.el7.x86_64

Comment 9 Niranjan Mallapadi Raghavender 2018-06-20 09:57:24 UTC
Is this version will be part of RHEL7.5.2 Atomic Host ?. We can test this individually but it's important to be part of RHEL7.5.2 Atomic Host.

Comment 10 Giuseppe Scrivano 2018-06-20 14:07:03 UTC
@Baude, will the new build be part of RHEL7.5.2?

Comment 14 Brent Baude 2018-06-20 15:24:07 UTC
deferring to lokesh and frantisek...

Comment 19 Nikhil Dehadrai 2018-06-22 10:58:00 UTC
atomic-host-version:
Version: 7.5.2 (2018-06-21 19:45:26)


Tested with latest Atomic host version, I was unable to see the error mentioned at comment#6

Console:

[root@ipasssdclient ~]# atomic uninstall -f rhel7/sssd
docker run --rm=true --privileged --net=host -v /:/host -e NAME=sssd -e IMAGE=rhel7/sssd -e HOST=/host rhel7/sssd /bin/uninstall.sh
[root@ipasssdclient ~]# rpm -q atomic
atomic-1.22.1-22.git5a342e3.el7.x86_64
[root@ipasssdclient ~]#


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