Bug 799122 - Present warning with confirmation on promotion of changeset with failed repo sync
Summary: Present warning with confirmation on promotion of changeset with failed repo ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: API
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
high
high vote
Target Milestone: Unspecified
Assignee: Justin Sherrill
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-01 20:01 UTC by Og Maciel
Modified: 2019-09-26 13:31 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-05-15 18:55:59 UTC
Target Upstream Version:


Attachments (Terms of Use)
warning msg raised during promotio of repo which is being synced (31.49 KB, image/png)
2012-03-29 11:21 UTC, Sachin Ghai
no flags Details
warning message when the sync has failed for the repo and we are trying to promote it to next env (38.40 KB, image/png)
2012-03-30 08:16 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:0665 0 normal SHIPPED_LIVE new packages: katello 2012-05-15 22:27:22 UTC

Description Og Maciel 2012-03-01 20:01:45 UTC
Description of problem:

Seems that if one tries to sync a couple of repositories and one fails, if you promote it and subscribe a system, the failed repo also "makes its way" to the subscribed system and yum doesn't like that much. 

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

* candlepin-0.5.23-1.el6.noarch
* candlepin-tomcat6-0.5.23-1.el6.noarch
* katello-0.1.300-1.el6.noarch
* katello-all-0.1.300-1.el6.noarch
* katello-certs-tools-1.0.2-2.el6.noarch
* katello-cli-0.1.100-2.el6.noarch
* katello-cli-common-0.1.100-2.el6.noarch
* katello-common-0.1.300-1.el6.noarch
* katello-configure-0.1.100-7.el6.noarch
* katello-glue-candlepin-0.1.300-1.el6.noarch
* katello-glue-foreman-0.1.300-1.el6.noarch
* katello-glue-pulp-0.1.300-1.el6.noarch
* katello-httpd-ssl-key-pair-1.0-1.noarch
* katello-qpid-broker-key-pair-1.0-1.noarch
* katello-repos-0.1.5-1.el6.noarch
* katello-selinux-0.1.7-1.el6.noarch
* katello-trusted-ssl-cert-1.0-1.noarch
* pulp-1.0.0-4.el6.noarch
* pulp-common-1.0.0-4.el6.noarch
* pulp-selinux-server-1.0.0-4.el6.noarch

How reproducible:


Steps to Reproduce:
1. I believe you could create a repository with a phony url and attempt to sync it. The way I did it was by uploading a manifest and selecting 2 repositories:
 * RHEL 6.2 Server RPMs x86_64
 * CF Tools 6.2 x86_64

Because my Base Url was pointing to cdn.redhat.com and the packages for CF Tools were not yet available on production CDN, my sync process only synced the Server repository and failed to sync CF Tools

2. I then promoted my RHEL product to the Dev1 environment of my Org
3. I registered and subscribed a RHEL 6.2 client
4. Running yum repolist or install fails because the client cannot "talk" to the CF Tools repository, which imho should not be available to it.

Actual results:

yum install -y katello-all
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Tokyo_Internal_BREW                                                                         | 2.8 kB     00:00     
Tokyo_Internal_el6-tools                                                                    | 2.3 kB     00:00     
https://qetello01.usersys.redhat.com/pulp/repos/Tokyo/Dev1/content/dist/rhel/server/6/6Server/x86_64/cf-tools/1.0/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-6-server-cf-tools-1-rpms. Please verify its path and try again

Expected results:


Additional info:


[root@qeclient01 ~]# yum repolist
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Tokyo_Internal_BREW                                                                         | 2.8 kB     00:00     
Tokyo_Internal_BREW/primary_db                                                              | 3.4 MB     00:00     
Tokyo_Internal_el6-tools                                                                    | 2.3 kB     00:00     
Tokyo_Internal_el6-tools/primary_db                                                         |  18 kB     00:00     
https://qetello01.usersys.redhat.com/pulp/repos/Tokyo/Dev1/content/dist/rhel/server/6/6Server/x86_64/cf-tools/1.0/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
repo id                                         repo name                                                    status
Tokyo_Internal_BREW                             BREW                                                         5,089
Tokyo_Internal_el6-tools                        el6-tools                                                       32
rhel-6-server-cf-tools-1-rpms                   Red Hat CloudForms Tools for RHEL 6 (RPMs)                       0
rhel-6-server-rpms                              Red Hat Enterprise Linux 6 Server (RPMs)                         0
repolist: 5,121
[root@qeclient01 ~]# yum install -y katello-all
Loaded plugins: product-id, security, subscription-manager
Updating certificate-based repositories.
Tokyo_Internal_BREW                                                                         | 2.8 kB     00:00     
Tokyo_Internal_el6-tools                                                                    | 2.3 kB     00:00     
https://qetello01.usersys.redhat.com/pulp/repos/Tokyo/Dev1/content/dist/rhel/server/6/6Server/x86_64/cf-tools/1.0/os/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: rhel-6-server-cf-tools-1-rpms. Please verify its path and try again

Comment 7 Justin Sherrill 2012-03-09 21:55:46 UTC
by only allowing promotion if there are no sync errors, we also bring up the question of "Do we allow you to promote an unsynced repository?"  Currently we do.   Two such changes could be made:


1.  only properly synced repos are allowed to be promoted.  Ones that had not been synced could not be promoted.  I seem to remember at one point we required at least 1 sync before allowing promotion, this changed for some reason, do we want to go back to that?

2. only allow promotion of a repo if it has been synced with no errors or has never been synced.  This just seems silly, as we would allow you to promote until you tried to unsuccessfully sync.  


Thoughts?

Comment 8 Og Maciel 2012-03-09 22:20:50 UTC
At a first glance I like option (1). Furthermore, if for whatever reason I make changes to my product and the sync after those changes fail, I'd recommend that the user should not promote until all reasons for breaking the synchronization process are ironed out to prevent perfectly good environments to get corrupted.

Comment 9 Justin Sherrill 2012-03-12 13:59:08 UTC
After a lengthy discussion I believe we settled on the following:

If a product contains a repository that has a failed sync and the user has added some part of the product to the changeset we will present a warning message to them saying that a specified repository has failed to sync and could cause errors in the promotion.  

The user will then have to manually click continue.  We did this because we did not want to intentionally prohibit the user from promoting 6.1 content for example, if 6.0 failed to sync.

Comment 11 Justin Sherrill 2012-03-14 19:05:09 UTC
should be fixed in katello master:

ce58078895b2a9997e14586f057ef0a1650bff24

Comment 13 Justin Sherrill 2012-03-14 19:18:47 UTC
to clarify after this change, when hitting promote, if some product in the changeset has a repo that is either currently syncing or has an error on its last sync, we will show a warning.  The user can still continue or cancel, but we are at least warning the user.

Comment 15 Sachin Ghai 2012-03-26 09:49:24 UTC
I tried to verify this defect with following build:

pulp-1.0.0-6.el6.noarch
katello-0.1.306-1.el6.noarch
mod_wsgi-3.3-3.pulp.el6.x86_64
katello-glue-candlepin-0.1.306-1.el6.noarch
pulp-common-1.0.0-6.el6.noarch
m2crypto-0.21.1.pulp-7.el6.x86_64
candlepin-0.5.26-1.el6.noarch
pulp-selinux-server-1.0.0-6.el6.noarch
katello-glue-pulp-0.1.306-1.el6.noarch
katello-candlepin-cert-key-pair-1.0-1.noarch
python-oauth2-1.5.170-2.pulp.el6.noarch
candlepin-tomcat6-0.5.26-1.el6.noarch
katello-cli-0.1.107-1.el6.noarch


However, couldn't see the warning message when repo associated to selected product is in sync and user is trying to promote the same product.

I tried from cli as well as from UI. UI raised another weird error so for that I logged a another defect (806801).

Hi Justin, could you please confirm if this defect is fixed in 0.1.306 ?

Comment 16 Sachin Ghai 2012-03-29 11:02:03 UTC
Verified with following build:

pulp-1.0.0-8.el6.noarch
katello-0.1.307-1.el6.noarch
katello-cli-0.1.107-1.el6.noarch


Warning message is added when we promote a product and the associated repo is being synced. Please see the attachment in next comment.

Comment 17 Sachin Ghai 2012-03-29 11:21:45 UTC
Created attachment 573638 [details]
warning msg raised during promotio of repo which is being synced

Comment 18 Sachin Ghai 2012-03-30 08:14:20 UTC
Reverified this with following CFSE build:

katello-0.1.307-1.el6.noarch
pulp-1.0.2-1.el6.noarch


Proper warning messages are raised when promoting the product which is either being synced or has an error on its last sync.

Comment 19 Sachin Ghai 2012-03-30 08:16:30 UTC
Created attachment 573912 [details]
warning message when the sync has failed for the repo and we are trying to promote it to next env

Comment 20 errata-xmlrpc 2012-05-15 18:55:59 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.

http://rhn.redhat.com/errata/RHEA-2012-0665.html


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