Bug 644909 - Repo API calls that affect the pulp.repo need to poke subscribed agents to update.
Summary: Repo API calls that affect the pulp.repo need to poke subscribed agents to up...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: z_other
Version: unspecified
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: verified-to-close
TreeView+ depends on / blocked
 
Reported: 2010-10-20 15:25 UTC by Jeff Ortel
Modified: 2011-08-16 14:20 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-16 14:20:02 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeff Ortel 2010-10-20 15:25:22 UTC
Description of problem:

When Repo API methods are invoked that impact the repo in such a way that affects
the pulp.repo, an asynchronous RMI needs to be invoked on all subscribed (bound) consumers
to update the .repo file.  Examples:
 * Changes to GPG keys.
 * Changes to 'published' flag.
 * Changes to 'relative_path'.


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


How reproducible:

Always


Steps to Reproduce:
1. Subscribe a consumer to a repo.
2. Add a package signed with a new GPG key
3. Add the new GPG key
4. Do yum install the <new package>
5. Watch yum barf.
  
Actual results:

Yum fails to install package.

Expected results:

The .repo file should be updated and yum downloads the new key.

Additional info:

Comment 1 Jeff Ortel 2010-10-27 20:58:42 UTC
agent RepoLib.update() is called via RMI for consumers that are subscribed to repos modified in any of the following ways:
 * publish flag changes
 * gpg keys changed.

Comment 2 Jay Dobies 2010-10-29 16:58:21 UTC
Fixed in 0.77.

Comment 3 Jay Dobies 2010-11-03 19:35:17 UTC
Fixed in build 0.78.

Comment 4 Preethi Thomas 2011-01-04 18:57:29 UTC
jortel basically you create a repo and bind a consumer ...
jortel make sure the agent (gofer) is running ..
jortel then, change something like the  'publish' flag and see that it update the pulp.repo.  should set enabled=0
jortel things like that.
jortel or, you can set  a gpgkey on the repo and then change it.  then, observe the change in the .repo file

Comment 5 Preethi Thomas 2011-01-10 20:04:26 UTC
[root@preethi ~]# yum clean all
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Cleaning repos: f14-updates fedora fedora-pulp updates
Cleaning up Everything
0 delta-package files removed, by presto
[root@preethi ~]# yum repolist
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
f14-updates                                              | 4.7 kB     00:00     
f14-updates/primary_db                                   | 3.7 MB     00:00     
fedora/metalink                                          |  21 kB     00:00     
fedora                                                   | 4.3 kB     00:00     
fedora/primary_db                                        |  14 MB     00:00     
fedora-pulp                                              | 1.3 kB     00:00     
fedora-pulp/primary                                      | 3.0 kB     00:00     
fedora-pulp                                                               10/10
updates/metalink                                         |  18 kB     00:00     
updates                                                  | 4.7 kB     00:00     
updates/primary_db                                       | 3.7 MB     00:00     
repo id                     repo name                                     status
f14-updates                 f14-updates                                    5,280
fedora                      Fedora 14 - x86_64                            22,161
fedora-pulp                 Pulp Testing Builds                               10
updates                     Fedora 14 - x86_64 - Updates                   5,280
repolist: 32,731
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]# service goferd status
goferd (25472) is running.
[root@preethi ~]# vi /etc/gofer/agent.conf
[root@preethi ~]# 
[root@preethi ~]# pulp-admin repo publish --id=f14-updates --disable
Repository [f14-updates] 'published' has been set to [False]

[root@preethi ~]# yum clean all
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
Cleaning repos: f14-updates fedora fedora-pulp updates
Cleaning up Everything
0 delta-package files removed, by presto
[root@preethi ~]# yum repolist
Loaded plugins: langpacks, presto, refresh-packagekit
Adding en_US to language list
https://localhost/pulp/repos/pub/fedora/linux/updates/14/x86_64/repodata/repomd.xml: [Errno 14] HTTP Error 404 : https://localhost/pulp/repos/pub/fedora/linux/updates/14/x86_64/repodata/repomd.xml 
Trying other mirror.
repo id                     repo name                                     status
f14-updates                 f14-updates                                   0
fedora                      Fedora 14 - x86_64                            0
fedora-pulp                 Pulp Testing Builds                           0
updates                     Fedora 14 - x86_64 - Updates                  0
repolist: 0
[root@preethi ~]# cat /etc/yum.repos.d/pulp.repo 
#
# Pulp Repositories
# Managed by Pulp client
#

[f14-updates]
name = f14-updates
baseurl = https://localhost/pulp/repos/pub/fedora/linux/updates/14/x86_64
enabled = 1
sslverify = 0[root@preethi ~]# 
[root@preethi ~]# 
[root@preethi ~]#

Comment 6 Preethi Thomas 2011-01-10 21:54:58 UTC
Jeff,

Please see my results in the above comment. The enabled doesn't seem to be switching to 0.

Comment 7 Jeff Ortel 2011-01-11 20:36:08 UTC
All of the pulp.repo updates are broken.  The remote 'RepoLib' was renamed to 'Repo' and the RepoApi and ConsumerApi was not updated to match.

Fixing for this and 663729 in pulp now.

Also, the exception should have been logged.  Will be fixed in gofer 0.13.

Comment 8 Jeff Ortel 2011-01-11 20:41:30 UTC
Fixed: d471805924691b5f349ab66c5abb3dad75d2841e

Comment 9 Jay Dobies 2011-01-12 19:36:56 UTC
Fixed in build 0.123.

Comment 10 Preethi Thomas 2011-01-13 17:39:11 UTC
verified
[root@preethi ~]# rpm -q pulp
pulp-0.0.123-1.fc14.noarch

[root@preethi ~]# pulp-admin repo publish --id=pulp-repo  --disable
Repository [pulp-repo] 'published' has been set to [False]


[root@10 ~]# cat /etc/yum.repos.d/pulp.repo 
#
# Pulp Repositories
# Managed by Pulp client
#

[f13]
name = f13
baseurl = https://preethi.usersys.redhat.com/pulp/repos/released/F-13/GOLD/Fedora/x86_64/os
enabled = 1
sslverify = 0

[pulp-repo]
name = pulp-repo
baseurl = https://preethi.usersys.redhat.com/pulp/repos/repos/pulp/pulp/testing/fedora-13/x86_64
enabled = 0

Comment 11 Preethi Thomas 2011-08-16 14:20:02 UTC
Closing with Community Release 15

pulp-0.0.223-4.


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