Bug 985947 - attempt to register RHEL5-GOLD system twice generates 'IntegrityError: duplicate key value violates unique constraint "rhn_sp_snep_uq"' in error_log
attempt to register RHEL5-GOLD system twice generates 'IntegrityError: duplic...
Status: CLOSED WORKSFORME
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server (Show other bugs)
unspecified
Unspecified Unspecified
high Severity high
: ---
: ---
Assigned To: Michael Mráka
Red Hat Satellite QA List
:
Depends On:
Blocks: sat560-blockers
  Show dependency treegraph
 
Reported: 2013-07-18 10:51 EDT by Jan Hutař
Modified: 2016-04-18 18:17 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-03 09:58:03 EDT
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 Jan Hutař 2013-07-18 10:51:44 EDT
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 04:23:22 EDT
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.