Bug 961836

Summary: CLI - user delete does not work
Product: Red Hat Satellite Reporter: Hayk Hovsepyan <hhovsepy>
Component: HammerAssignee: Eric Helms <ehelms>
Status: CLOSED CURRENTRELEASE QA Contact: Katello QA List <katello-qa-list>
Severity: high Docs Contact:
Priority: medium    
Version: NightlyCC: gkhachik, jsherril, omaciel
Target Milestone: UnspecifiedKeywords: Regression, Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-18 21:21:11 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hayk Hovsepyan 2013-05-10 14:12:54 UTC
Description of problem:
When deleting user by CLI, user still exists in outputs of 'user info' and 'user list' commands.

Version-Release number of selected component (if applicable):
katello-configure-1.4.3-1.el6.noarch
katello-glue-candlepin-1.4.2-1.git.222.82e7958.el6.noarch
katello-1.4.2-1.git.222.82e7958.el6.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-common-1.4.2-1.git.39.6fb67c1.el6.noarch
katello-qpid-broker-key-pair-1.0-1.noarch
katello-common-1.4.2-1.git.222.82e7958.el6.noarch
katello-selinux-1.4.3-1.git.3.ce8227b.el6.noarch
katello-glue-pulp-1.4.2-1.git.222.82e7958.el6.noarch
katello-all-1.4.2-1.git.222.82e7958.el6.noarch
katello-cli-1.4.2-1.git.39.6fb67c1.el6.noarch
katello-repos-1.4.2-1.el6.noarch
signo-katello-0.0.7-1.el6.noarch
katello-glue-elasticsearch-1.4.2-1.git.222.82e7958.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-certs-tools-1.4.2-1.el6.noarch


How reproducible:
always

Steps to Reproduce:
1. Create user by CLI: 'user create --username "usr1" --password "password" --email "usr1@localhost"'
2.Delete user by CLI: 'user delete --username "usr1"'. It shows that user is deleted.
3. Try to list users in CLI, and you will see that just deleted user is listed there, which is bug.
4. Try to execute CLI 'user info --username "usr1"' and it shows information instead of error, which is bug. And in output it hows: "Disabled : False"
5. Try to delete user once again, and it will show error: "{"http_request_method": "DELETE", "exception": null, "error_message": "Missing resource(s): resource_id=usr-1368193901-1d0d4458", "_href": "/pulp/api/v2/roles/super-users/users/usr-1368193901-1d0d4458/", "http_status": 404, "traceback": null, "resources": {"resource_id": "usr-1368193901-1d0d4458"}}
 (com.redhat.qe.tools.SSHCommandRunner.runCommandAndWait)"
  
Actual results:
user delete shows that it is deleted, but in fact 'user list' and 'user info' shows that user.

Expected results:
user should be deleted, and 'user info' should show Error 65 that user does not exists, and 'user list' should not list deleted users.
Second time of deleting the same user, it must show shorter message that user does not exist.

Additional info:

Comment 2 Eric Helms 2013-05-17 14:05:01 UTC
This issue was broader than just the CLI. All user deletion was broken. The fix is being tracked here - https://github.com/Katello/katello/pull/2325

Comment 3 Eric Helms 2013-05-17 14:06:26 UTC
commit 25e4ce8fe2f8fcbbe7c8e7effe30859a2e687776
Author: Eric D Helms <ehelms>
Date:   Fri May 17 09:25:38 2013 -0400

    BZ 961836: Fixes broken user deletion.
    
    For new orchestration events, if there is no create or destroy event
    the functions would return the default nil and cause orchestration
    to fail. This manifested itself by preventing user deletion in the
    database but leaving the user deleted in Pulp.

Comment 4 Garik Khachikyan 2013-05-17 14:17:27 UTC
i really hope it's a generic fix: as like repo is affected (seen just today).

Comment 7 Sam Kottler 2013-05-23 23:40:16 UTC
Moving to ON_QA for drop 2.

Comment 8 Hayk Hovsepyan 2013-05-24 13:26:06 UTC
Verified on revision:
katello-certs-tools-1.4.2-2.el6sat.noarch
signo-katello-0.0.12-1.el6sat.noarch
katello-glue-pulp-1.4.2-7.el6sat.noarch
katello-configure-foreman-1.4.3-10.el6sat.noarch
katello-foreman-all-1.4.2-7.el6sat.noarch
ruby193-rubygem-katello_api-0.0.3-2.el6_4.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
katello-qpid-client-key-pair-1.0-1.noarch
katello-cli-1.4.2-6.el6sat.noarch
ruby193-rubygem-foreman-katello-engine-0.0.7-1.el6sat.noarch
katello-configure-1.4.3-10.el6sat.noarch
katello-common-1.4.2-7.el6sat.noarch
katello-selinux-1.4.3-3.el6sat.noarch
katello-glue-candlepin-1.4.2-7.el6sat.noarch
ruby193-rubygem-katello-foreman-engine-0.0.1-1.el6_4.noarch
katello-all-1.4.2-7.el6sat.noarch
katello-agent-1.4.2-4.el6sat.noarch
katello-cli-common-1.4.2-6.el6sat.noarch
katello-glue-elasticsearch-1.4.2-7.el6sat.noarch
katello-1.4.2-7.el6sat.noarch
katello-qpid-broker-key-pair-1.0-1.noarch

Comment 9 Mike McCune 2013-07-18 21:21:11 UTC
mass move to CLOSED:CURRENTRELEASE since MDP1 has been released.