Bug 1454708

Summary: KS tree synced via `spacewalk-repo-sync --sync-kickstart ...` is marked as invalid by default
Product: Red Hat Satellite 5 Reporter: Jan Hutař <jhutar>
Component: Satellite SynchronizationAssignee: Jiří Dostál <jdostal>
Status: CLOSED NOTABUG QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: low Docs Contact:
Priority: unspecified    
Version: 580CC: jdostal, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-16 11:43:19 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:
Bug Depends On:    
Bug Blocks: 1450111    

Description Jan Hutař 2017-05-23 11:25:19 UTC
Description of problem:
Kickstartable tree synced via `spacewalk-repo-sync --sync-kickstart ...` is marked as invalid by default


Version-Release number of selected component (if applicable):
spacewalk-backend-tools-2.5.3-133.el6sat.noarch


How reproducible:
always


Steps to Reproduce:
1. Have repo http://<mirror>/pub/fedora/linux/releases/25/Server/x86_64/os/ attached to channel  bz1070866
2. # spacewalk-repo-sync -c  bz1070866 --include '' --sync-kickstart
3. Check Systems -> Kickstarts -> Create Kickstart Profile -> select channel "bz1070866"
4. Check Systems -> Kickstarts -> Distributions -> column "Valid?"


Actual results:
For Systems -> Kickstarts -> Create Kickstart Profile -> select channel "bz1070866", new KS is not offered in "Kickstartable Tree:" drop-down menu

For Systems -> Kickstarts -> Distributions, column "Valid?" does not have gree check. You have to open the KS tree first (note the warning box in upper part of the page), do not change anything and click "Update Kickstart Distribution"

Before clicking "Update Kickstart Distribution", the KS is:

rhnschema=# select * from rhnkickstartabletree where label='bz1070866';
 id | org_id |   label   |                base_path                 | channel_id | cobbler_id | cobbler_xen_id |   boot_image   | kstree_type | install_type |         last_modified         |            created            |           modif
ied            
----+--------+-----------+------------------------------------------+------------+------------+----------------+----------------+-------------+--------------+-------------------------------+-------------------------------+----------------
---------------
 23 |      1 | bz1070866 | /var/satellite/rhn/kickstart/1/bz1070866 |        133 |            |                | spacewalk-koan |           2 |            7 | 2017-05-23 07:00:56.693821-04 | 2017-05-23 07:00:56.693821-04 | 2017-05-23 07:0
0:56.693821-04
(1 row)

after clicking it:

rhnschema=# select * from rhnkickstartabletree where label='bz1070866';
 id | org_id |   label   |                base_path                 | channel_id |             cobbler_id              | cobbler_xen_id |   boot_image   | kstree_type | install_type |         last_modified         |            created    
        |           modified            
----+--------+-----------+------------------------------------------+------------+-------------------------------------+----------------+----------------+-------------+--------------+-------------------------------+-----------------------
--------+-------------------------------
 23 |      1 | bz1070866 | /var/satellite/rhn/kickstart/1/bz1070866 |        133 | MTQ5NTUzODA2Ni4yMzEzODAxMTMuMDE1MjE |                | spacewalk-koan |           2 |            7 | 2017-05-23 07:00:56.693821-04 | 2017-05-23 07:00:56.69
3821-04 | 2017-05-23 07:14:26.096889-04
(1 row)


Expected results:
KS should be available right after sync

Comment 1 Jan Hutař 2017-05-23 11:29:28 UTC
Note this is not a regression against Satellite 5.7.0.

Comment 2 Jiří Dostál 2017-08-16 10:09:45 UTC
Seems that kickstart validation after spacewalk-repo-sync is done via taskomatic. At first I wasn't able to reproduce the issue, until I stopped taskomatic service --- kickstart wasn't marked as valid until I pressed "Update Kickstart Distribution". Other way to validate the kickstart after repo-sync is to keep taskomatic running. It is not a bug in my opinion.

Comment 3 Jan Hutař 2017-08-16 11:56:20 UTC
Err, I agree. I have tried myself on Vega and was not able to reproduce now as well.