Bug 1319562

Summary: Cannot disable Satellite's default redhat_register snippet (cleanly) if custom registration is being used in %post
Product: Red Hat Satellite 5 Reporter: jalviso <jalviso>
Component: ProvisioningAssignee: Jan Dobes <jdobes>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 570CC: dyordano, jalviso, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-03-29 15:52:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description jalviso 2016-03-21 04:03:15 UTC
Description of problem:

Cannot disable Satellite's default redhat_register snippet (cleanly) if custom registration is being used in %post

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


How reproducible:


Steps to Reproduce:
1. Create a kickstart profile and fill in required settings.
2. Create custom snippet to register system and assigned cloned base/child
   channels
3. Kickstart the system 

Actual results:

Two system profiles, instead of one, are shown in RHN Satellite after the installation.

Expected results:

There should only be one system registered.


Additional info:

Tried to disable the default snippet "spacewalk/redhat_register" snippet to avoid duplication but there is no cleaner way to do it. 

We have to comment out registration line in both files:

# rhnreg_ks --serverUrl=$endpoint --sslCACert=$mycert --activationkey=$redhat_management_key

/var/lib/cobbler/snippets/redhat_register
/var/lib/rhn/kickstarts/snippets/redhat_register

Comment 1 Tomas Lestach 2016-03-21 10:30:18 UTC
I've already asked the reporter on satellite-tech-list, what does the customer miss in the registration snippet
 http://post-office.corp.redhat.com/archives/satellite-tech-list/2016-March/msg00158.html
I'm trying to understand, why would someone need to rewrite redhat_register snippet.

Comment 3 Tomas Lestach 2016-03-29 15:52:45 UTC
It's clear, why it does not make sense to use two registration snippets during one kickstart.
However, the default registration snippet supports registrations with a custom activation key, that registers the kickstarted system to the channels as set in the activation key.
Any subsequent actions can be defined either via post-script actions or custom snippets.

I'm closing this BZ as NOTABUG.