Bug 1248233 - Deleting a locked system leaves a stale lock entry and causes an error when locking/unlocking systems
Summary: Deleting a locked system leaves a stale lock entry and causes an error when l...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 2.3
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-07-29 23:31 UTC by Jesse Weisner
Modified: 2019-10-21 12:21 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-10-21 12:21:04 UTC
Embargoed:


Attachments (Terms of Use)

Description Jesse Weisner 2015-07-29 23:31:24 UTC
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

Comment 1 Michael Mráka 2019-10-21 12:21:04 UTC
Spacewalk 2.8 (and older) has already reached it's End Of Life.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before end of life. If you would still like
to see this bug fixed and are able to reproduce it against current version
of Spacewalk 2.9, you are encouraged change the 'version' and re-open it.


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