Bug 985947 - attempt to register RHEL5-GOLD system twice generates 'IntegrityError: duplicate key value violates unique constraint "rhn_sp_snep_uq"' in error_log
Summary: attempt to register RHEL5-GOLD system twice generates 'IntegrityError: duplic...
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: sat560-blockers
TreeView+ depends on / blocked
 
Reported: 2013-07-18 14:51 UTC by Jan Hutař
Modified: 2019-10-10 09:09 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-03 13:58:03 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jan Hutař 2013-07-18 14:51:44 UTC
Description of problem:
When you attempt to register RHEL5-GOLD system twice, it generates 'IntegrityError: duplicate key value violates unique constraint "rhn_sp_snep_uq"' in error_log on Satellite and systemid file is missing on the client.


Version-Release number of selected component (if applicable):
Server:
  spacewalk-backend-1.9.46-23.el6sat.noarch
  spacewalk-java-1.9.83-46.el6sat.noarch
Client:
  rhn-client-tools-0.4.13-1.el5
  rhnlib-2.2.5-1.el5


How reproducible:
1 of 1


Steps to Reproduce:
1. Register RHEL5-GOLD system to Satellite 5.6.0
2. Then try again and again ... I have used `while true...`
   # rhnreg_ks --force --username=<user> --password=<pass>


Actual results:
On client:

# rhnreg_ks --force --username=admin --password=nimda
An error has occurred:
Connection timed out on readline
See /var/log/up2date for more information

On Satellite in error_log

IntegrityError: duplicate key value violates unique constraint "rhn_sp_snep_uq"


Expected results:
Should work


Additional info:
This might be related to bug 924179 or is just caused by already fixed bug in this old RHEL Client tools.

I'm reporting this mostly to have a decision whether this use case (see steps above) is a problem for 5.6.0 or not.

Comment 1 Jan Hutař 2013-07-19 08:23:22 UTC
And this is in the DB log:

2013-07-18 11:05:06.625 EDT ERROR:  duplicate key value violates unique constraint "rhn_sp_snep_uq"
2013-07-18 11:05:06.625 EDT STATEMENT:  
                    insert into rhnServerPackage
                    (server_id, name_id, evr_id, package_arch_id, installtime)
                    values (1000010005, LOOKUP_PACKAGE_NAME(E'indent'), LOOKUP_EVR(NULL, E'2.2.9', E'14.fc6'),
                        LOOKUP_PACKAGE_ARCH(E'x86_64'), TO_TIMESTAMP(E'2013-07-18 04:50:54', 'YYYY-MM-DD HH24:MI:SS')
                    )


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