Bug 498275 - obtainReactivationKey doesnt update key in webui and old key is not replaced
obtainReactivationKey doesnt update key in webui and old key is not replaced
Product: Red Hat Satellite 5
Classification: Red Hat
Component: API (Show other bugs)
All Linux
low Severity medium
: ---
: ---
Assigned To: Brad Buckingham
Sayli Karmarkar
Depends On:
Blocks: 456996
  Show dependency treegraph
Reported: 2009-04-29 13:33 EDT by Sayli Karmarkar
Modified: 2015-03-22 21:09 EDT (History)
2 users (show)

See Also:
Fixed In Version: sat530
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2009-09-10 15:55:32 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Sayli Karmarkar 2009-04-29 13:33:03 EDT
Description of problem:

reference bz# 496318 : 

So, here are two issues that I am seeing. 

#1. I register a system and create reactivation key using api client.system.obtainReactivationKey(key, sysemid). It shows up created key in webUI for first time but not after that. 

[root@rlx-3-20 ~]# rhnreg_ks --activationkey="1-aa3b47975110ee23d6ac98cb6c72229d" --force
[root@rlx-3-20 ~]# 

The system is registered without error and with usage-limit set to 1. So when you generate reactivation key multiple times, call seems to succeed however key cannot be seen in webui after first couple of times. 

1. Register a system to satellite.
2. client.system.obtainReactivationKey(key, sysid)
4. Go to https://sat-url/network/systems/details/activation.pxt?sid=1000010302
(You can see the created reactivation key )
3. rhnreg_ks --activationkey=key --force  (This will succeed)
4. Follow sequence 2 to 4  3-4 times and check whether activation key is shown each time in webui 

Reactivation key is not see on webui after initial try which shouldn't happen.

#2. If I invoke api multiple times without actually using reactivation key, old key doesnt seem to have replaced by new key. I can still register systems using old key. (unlike the behavior when we create reactivation key using webui.)

1. Register a system to satellite.
2. client.system.obtainReactivationKey(key, sysid)  (lets say generated key value is key1)
3. client.system.obtainReactivationKey(key, sysid)  (lets say generated key value is key2)
3. rhnreg_ks --activationkey=key1 --force  (This will succeed)
   So basically when we generated key2, key1 was not removed or replaced by key2. It still exists.     

If we follow above 2 sequences just using generate reactivation key in webui, we can see the key every time and also the new key is replaced by old key. So, if we try to register using old key it gives invalid key which makes sense.
Comment 1 Brad Buckingham 2009-04-30 11:50:57 EDT
master git commit: 8fa2b65fedf786fc8841633cd456a3f4131acaa6
vader git commit: 66b40db71571aca6acb98d604c580267f4e91fb0

After investigation, the issue was that the API was creating a new reactivation key but not removing any existing ones when invoking the API.  Updated the API
to remove the existing and create a new.
Comment 2 Sayli Karmarkar 2009-05-12 14:38:20 EDT
Comment 3 Michael Mráka 2009-08-26 07:13:25 EDT
Validated in stage -> RELEASE_PENDING.

#1 - Reactivation key is always shown in webUI and works.
#2 - Old key is no longer valid.
  rhnreg_ks --serverUrl=http://dell-pem710-01.rhts.eng.bos.redhat.com/XMLRPC --activationkey=re-1-fbdd7c94eaefbadf3c238591852cd264  --force
Error Message:
    Could not find token 're-1-fbdd7c94eaefbadf3c238591852cd264'
Error Class Code: 60
Error Class Info: 
     The activation token specified could not be found on the server.
     Please retry with a valid key.
Comment 4 Brandon Perkins 2009-09-10 15:55:32 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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