Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1525858

Summary: cdn-sync doesn't warn user that synced channels are EOL
Product: Red Hat Satellite 5 Reporter: Jan Dobes <jdobes>
Component: Satellite SynchronizationAssignee: Jan Dobes <jdobes>
Status: CLOSED ERRATA QA Contact: Red Hat Satellite QA List <satqe-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 580CC: ggainey, tlestach
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: spacewalk-backend-2.5.3-161-sat Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-06 15:46:27 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 Dobes 2017-12-14 08:51:14 UTC
Description of problem:
In satellite-sync --list-channels output are unsupported channels marked as

"e = channel no longer supported (end-of-service)"

(And there might be other places using this EOL information, please investigate)

This information is based on 'eol' column in rhnChannel table in RHN database. Please note this values is not stored in rhnChannel table in Satellite database.

This feature is missing in cdn-sync. Let's add it here, this eol value is available in cdn-sync mapping files same as it used to be available from RHN.

Maybe we should change the wording from "end-of-service" to just "EOL".

Steps to Reproduce:
1. Sync some EOL channel on Satellite 5.7 using satellite-sync and on 5.8 using cdn-sync
2. Execute "satellite-sync -l" (5.7) and "cdn-sync -l" (5.8) commands and check output.

Actual results:
satellite-sync output displays information that this channel is EOL
cdn-sync output doesn't display information that this channel is EOL

Expected results:
cdn-sync output displays information that this channel is EOL

Comment 1 Jan Dobes 2018-01-02 15:05:33 UTC
After a closer look on satellite-sync code I need to correct this BZ's description. It seems that satellite-sync's end-of-service notice is not based on EOL date in RHN database but purely on fact if there is previously synced channel in Sat DB and now isn't available from RHN for some reason. So in fact it doesn't display any warning for channel with expired end-of-life date. When we start displaying info based on this EOL date in cdn-sync, it'll be a new thing in Sat 5 different to satellite-sync behavior.

Comment 2 Jan Dobes 2018-01-02 16:20:18 UTC
first enhancement, mark EOL channels in "cdn-sync -l" output, example:
...
17:14:01 rhel-x86_64-server-6:
17:14:01     . jb-coreservices-1-x86_64-server-6-rpm                      87 packages   (85.8M)
17:14:01     . jb-coreservices-1-x86_64-server-6-rpm-debuginfo            21 packages   (22.8M)
17:14:01 EOL . jb-ews-1-x86_64-server-6-rpm                                ? packages      (?B)
17:14:01 EOL . jb-ews-2-x86_64-server-6-rpm                              385 packages  (276.9M)
17:14:01 EOL . jb-ews-2-x86_64-server-6-rpm-debuginfo                     32 packages   (33.3M)
17:14:01     . jbappplatform-6-x86_64-server-6-rpm                      3214 packages    (4.9G)
17:14:01     . jbappplatform-6-x86_64-server-6-rpm-debuginfo              21 packages   (15.8M)
17:14:01     . jbappplatform-6.3-x86_64-server-6-rpm                    1959 packages    (2.7G)
...

spacewalk.git(master):
e0635286ac785487a7fddb5c3b02b17fb5fc28a8

Comment 3 Jan Dobes 2018-01-05 12:53:40 UTC
improved previous commit:

88e1f165576f818df9f7b3be38b800a5839fed9e

added note when syncing EOL channel:

32dfda977cdf921c0fb7a4e8f6610fcacb4786a0

Comment 4 Jan Dobes 2018-01-05 17:25:22 UTC
new --list-eol option added to cdn-sync showing list of EOL dates for syncable channels if these dates are defined

spacewalk.git(master):
b0d4a201d8fb7ead306badc6a7d82981d6a892af

Comment 5 Jan Dobes 2018-01-08 10:57:42 UTC
EOL channel list now contains also channels that were synced previously but now are unknown to cdn-sync-mappings (Bug 1507553).

Comment 8 Pavel Studeník 2018-02-22 11:16:46 UTC
Verified with spacewalk-backend-cdn-2.5.3-162.el6sat.noarch

>> cdn-sync -l | grep EOL
...
06:11:27 EOL . rhn-tools-rhel-x86_64-server-7.2.eus                      131 packages   (29.9M)
06:11:27 EOL . rhn-tools-rhel-x86_64-server-7.2.eus-debuginfo              2 packages  (194.2K)

>> cdn-sync --list-eol
...
06:13:42     . rhel-x86_64-server-7-ost-6-installer                2018-02-17
06:13:42     . rhel-x86_64-server-7-ost-6-installer-debuginfo      2018-02-17
06:13:42 Channels not reached end-of-life yet:
06:13:42     . rhel-x86_64-server-7-ost-8-director                 2018-04-20
06:13:42     . rhel-x86_64-ost-8-tools-server                      2018-04-20

>> cdn-sync -c rhel-x86_64-server-7-ost-6
06:15:09 ======================================
06:15:09 | Channel: rhel-x86_64-server-7-ost-6
06:15:09 ======================================
06:15:09 NOTE: This channel reached end-of-life on 2018-02-17.

Comment 12 errata-xmlrpc 2018-03-06 15:46:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:0393