Bug 1248233 - Deleting a locked system leaves a stale lock entry and causes an error when locking/unlocking systems
Deleting a locked system leaves a stale lock entry and causes an error when l...
Status: NEW
Product: Spacewalk
Classification: Community
Component: Server (Show other bugs)
2.3
x86_64 Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Lestach
Red Hat Satellite QA List
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-29 19:31 EDT by Jesse Weisner
Modified: 2015-07-29 19:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jesse Weisner 2015-07-29 19:31:24 EDT
Description of problem:

If I delete a locked system, a row in the rhnset table is left orphaned. This causes an error when using the SSM to lock/unlock systems. There are also possibly orphaned rows in the rhnserver_log table, but I haven't experienced any ill effects from leaving them intact.

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

How reproducible:
Always

Steps to Reproduce:
1. Lock a system with the web interface (tried SSM and system overview page)
2. Delete that system from the web interface
3. Select one or more systems from the Systems > All view
4. Click "Manage"
5. Click "Lock/unlock systems"
6. Click "Select All", then click either the "Lock" or "Unlock" button

Actual results:
"We're sorry, but the system could not be found."

For this test I deleted a system with ID 1000010190

catalina.out:
2015-07-29 16:14:34,373 [TP-Processor6] WARN  com.redhat.rhn.common.errors.LookupExceptionHandler - Could not find server 1000010190 for user 3

PostgreSQL:
spacewalk=# select * from rhnset where element='1000010190';
 user_id |        label         |  element   | element_two | element_three 
---------+----------------------+------------+-------------+---------------
       3 | ssm_systems_set_lock | 1000010190 |             |              
(1 row)

spacewalk=# select count(*) from rhnserver_log where id='1000010190';
 count 
-------
    34
(1 row)

If I delete the row from rhnset, the SSM lock/unlock functionality works again.

I'm not sure if the entries left behind in rhnserver_log are intentional.

Expected results:
System(s) locked or unlocked.

Additional info:
External PostgreSQL 9.3.9 database, CentOS 6.6

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