Bug 1097434 - Errata install does not work (No Package(s) available)
Summary: Errata install does not work (No Package(s) available)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: 2.4.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 2.4.0
Assignee: Randy Barlow
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 950743
TreeView+ depends on / blocked
 
Reported: 2014-05-13 19:55 UTC by Justin Sherrill
Modified: 2014-08-20 03:31 UTC (History)
4 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-09 06:56:53 UTC
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2014-05-13 19:55:31 UTC
Description of problem:
Trying to install an errata with pulp-server-2.4.0-0.13.beta.el6.noarch does not seem to work properly.  It does not seem to matter what type of errata it is, they all seem to fail.  The error on the client agent looks like:

 *:krb5-libs-0:1.10.3-15.el6_5.1.x86_64-*-*.*: No package(s) available to install

Fuller traceback:

May 13 15:52:07 dhcp129-193 goferd: [ERROR][worker-0] pulp.agent.lib.dispatcher:80 - Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/pulp/agent/lib/dispatcher.py", line 76, in install report = handler.install(conduit, units, dict(options)) File "/usr/lib/python2.6/site-packages/pulp_rpm/handlers/rpm.py", line 111, in install details = pkg.install(names) File "/usr/lib/python2.6/site-packages/pulp_rpm/handlers/rpmtools.py", line 118, in install raise caught InstallError: *:krb5-libs-0:1.10.3-15.el6_5.1.x86_64-*-*.*: No package(s) available to install

To me it looks like pulp is constructing some sort of weird string to install the package that doesn't work.  

For example:  'yum install krb5-libs-0:1.10.3-15.el6_5.1.x86_64' works fine.

'yum install *:krb5-libs-0:1.10.3-15.el6_5.1.x86_64-*-*.*' does not.


Version-Release number of selected component (if applicable):
pulp-server-2.4.0-0.13.beta.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. Register a consumer with outdated packages and bind it to a repo with errata
2. Trigger an errata install

Actual results:
errata fails to install

Comment 1 Michael Hrivnak 2014-05-13 21:21:48 UTC
Please provide the full API call that you made to produce this error.

Comment 2 Michael Hrivnak 2014-05-13 21:29:47 UTC
Also, please look in the log especially for any statements that start with "Translated errata"

Comment 3 Justin Sherrill 2014-05-13 21:31:08 UTC
Log statement:  

May 13 15:52:07 dhcp129-76 pulp: pulp.plugins.pulp_rpm.plugins.profilers.yum:INFO: Translated errata <Unit [key={u'id': u'RHBA-2014:0359'}] [type=erratum] [id=00111ff0-9041-4653-9a0e-2f426b9702fe]> to <[{'unit_key': {'name': u'krb5-libs-0:1.10.3-15.el6_5.1.x86_64'}, 'type_id': 'rpm'}]>

Comment 4 Justin Sherrill 2014-05-13 21:37:42 UTC
Rest Call:

[DEBUG 2014-05-13 15:52:07 pulp_rest] RestClient.post "https://dhcp129-76.rdu.redhat.com/pulp/api/v2/consumers/067a3995-0d3e-432c-8f6f-4de8fab037d6/actions/content/install//

Body:

{"units":[{"type_id":"erratum","unit_key":{"id":"RHBA-2014:0359"}}],"options":{"importkeys":true}}

Comment 5 Justin Sherrill 2014-05-13 21:38:07 UTC
Information provided above

Comment 6 Randy Barlow 2014-05-13 21:50:54 UTC
Silly Justin, removing the Priority, Severity, and most importantly for us to work on it, Target Release. Tsk tsk tsk…

Comment 7 Randy Barlow 2014-05-14 21:23:33 UTC
https://github.com/pulp/pulp_rpm/pull/488

Comment 8 Randy Barlow 2014-05-15 17:00:10 UTC
The fix for this bug is included in the pulp-2.4.0-0.14.beta builds.

Comment 9 Preethi Thomas 2014-05-17 20:59:12 UTC
Not sure if this working

I synced the errata repo from the demo repos.

Manually installed grinder-2 

[root@dell-pe2950-02 ~]# rpm -ivh http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/grinder_test_package-2.0-1.fc14.noarch.rpm
Retrieving http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/grinder_test_package-2.0-1.fc14.noarch.rpm
Preparing...                ########################################### [100%]
   1:grinder_test_package   ########################################### [100%]
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-2.0-1.fc14.noarch
[root@dell-pe2950-02 ~]# 
 Now tried to install the errata and it did not update the package

[root@dell-pe2950-02 ~]# pulp-admin rpm repo  content errata --repo-id errata
Description: None
Id:          RHEA-2010:9999
Severity:    
Summary:     
Title:       test package enhancements
Type:        enhancements

Description: None
Id:          grinder_test_2
Severity:    
Summary:     
Title:       Test Errata referring to grinder_test_package-2.0
Type:        enhancements

Description: None
Id:          grinder_test_3
Severity:    
Summary:     
Title:       Test Errata referring to grinder_test_package-3.0
Type:        enhancements

Description: None
Id:          grinder_test_4
Severity:    
Summary:     
Title:       Test Errata referring to grinder_test_package-4.0
Type:        enhancements


[root@dell-pe2950-02 ~]# pulp-admin rpm consumer errata  install run --consumer-id consumer1 --name grinder_test_3
Command: run
Description: triggers an immediate errata install on a consumer

Available Arguments:

  --bg            - if specified, the client process will end immediately (the
                    task will continue to run on the server)
  --consumer-id   - (required) unique identifier; only alphanumeric, ., -, and _
                    allowed
  --errata-id, -e - (required) erratum id; may repeat for multiple errata
  --no-commit     - test the transaction without committing it
  --reboot        - reboot after a successful transaction
  --import-keys   - import GPG keys as needed
The following options were specified but do not exist on the command:
  --name
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# pulp-admin rpm consumer errata  install run --consumer-id consumer1 -e grinder_test_3
Install task created with id [ af466728-9b6c-49ab-8b8c-a999dd5459a8 ]

This command may be exited via ctrl+c without affecting the request.



Install Succeeded


[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-2.0-1.fc14.noarch
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# pulp-admin rpm consumer errata  install run --consumer-id consumer1 -e grinder_test_4
Install task created with id [ 67ff903a-6f3c-4c66-9abd-7ff1d8858492 ]

This command may be exited via ctrl+c without affecting the request.



Install Succeeded


[root@dell-pe2950-02 ~]# pulp-admin rpm consumer errata  install run --consumer-id consumer1 -e grinder_test_2
Install task created with id [ bdc77256-8d49-4292-a11b-0d3d4d3804ab ]

This command may be exited via ctrl+c without affecting the request.



Install Succeeded


[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-2.0-1.fc14.noarch
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# rpm -Uvh http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/grinder_test_package-3.0-1.fc14.noarch.rpm
Retrieving http://repos.fedorapeople.org/repos/pulp/pulp/demo_repos/test_errata_install/grinder_test_package-3.0-1.fc14.noarch.rpm
Preparing...                ########################################### [100%]
   1:grinder_test_package   ########################################### [100%]
[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-3.0-1.fc14.noarch
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# pulp-admin rpm consumer errata  install run --consumer-id consumer1 -e grinder_test_4
Install task created with id [ 2321bbb5-7691-495e-b7bd-59a0a8976594 ]

This command may be exited via ctrl+c without affecting the request.



Install Succeeded


[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-3.0-1.fc14.noarch
[root@dell-pe2950-02 ~]# 



from the log

May 17 16:51:53 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO:   retval:
May 17 16:51:53 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO: {'reboot': {'scheduled': False, 'details': {}}, 'details': {}, 'succeeded': True, 'num_changes': 0}
May 17 16:53:56 dell-pe2950-02 pulp: pulp.plugins.pulp_rpm.plugins.profilers.yum:INFO: Errata <grinder_test_4> refers to 1 updated rpms of: [{u'src': u'grinder_test_package-4.0-1.fc14.src.rpm', u'name': u'grinder_test_package', u'sum': [u'md5', u'd89e83ed183fa55dfb0bd2eec14db93c'], u'filename': u'grinder_test_package-4.0-1.fc14.noarch.rpm', u'epoch': u'0', u'version': u'4.0', u'release': u'1.fc14', u'arch': u'noarch'}]
May 17 16:53:56 dell-pe2950-02 pulp: pulp.plugins.pulp_rpm.plugins.profilers.yum:INFO: Translated errata <Unit [key={u'id': u'grinder_test_4'}] [type=erratum] [id=85af5305-bf7e-47af-b130-c1257312fb46]> to <[]>
May 17 16:53:56 dell-pe2950-02 goferd: [INFO][worker-0] gofer.rmi.dispatcher:612 - call: Content.install() sn=5bef338c-9b34-418c-a096-050cbbf6dcc5 info={'task_id': '2321bbb5-7691-495e-b7bd-59a0a8976594', 'consumer_id': 'consumer1'}
May 17 16:53:56 dell-pe2950-02 goferd: [INFO][worker-0] gofer.agent.rmi:149 - sn=5bef338c-9b34-418c-a096-050cbbf6dcc5 processed in: 36 (ms)
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO: Task RMI (succeeded)
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO: Succeeded
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO:   sn : 5bef338c-9b34-418c-a096-050cbbf6dcc5
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO:   origin : 1da259cb-5cf7-4108-be2c-ace156f4a439
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO:   user data : {'task_id': '2321bbb5-7691-495e-b7bd-59a0a8976594', 'consumer_id': 'consumer1'}
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO:   retval:
May 17 16:53:56 dell-pe2950-02 pulp: pulp.server.agent.direct.services:INFO: {'reboot': {'scheduled': False, 'details': {}}, 'details': {}, 'succeeded': True, 'num_changes': 0}

Comment 10 Randy Barlow 2014-05-19 22:03:03 UTC
Hi Preethi!

The application of an erratum requires the server to know the consumer's profile. In your test, you installed grinder_test_package using rpm directly, rather than using yum. Pulp has a Yum plugin that reports profile changes to the server when packages are installed, but that plugin was not invoked since you installed the package using rpm directly. This means that the server did not know that grinder_test_package was installed when you asked it to apply the erratum, and so it did not do anything.

Can you try again, but this time install grinder_test_package using yum, and doing so after the system is already registered with Pulp as a consumer?

Comment 11 Preethi Thomas 2014-05-20 02:14:33 UTC
verified

Followed the suggestions above and retried.

Errata install works

[root@dell-pe2950-02 ~]# yum localinstall grinder_test_package-2.0-1.fc14.noarch.rpm 
Loaded plugins: product-id, pulp-profile-update, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Local Package Process
Examining grinder_test_package-2.0-1.fc14.noarch.rpm: grinder_test_package-2.0-1.fc14.noarch
Marking grinder_test_package-2.0-1.fc14.noarch.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package grinder_test_package.noarch 0:2.0-1.fc14 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===================================================================================================
 Package                 Arch      Version        Repository                                  Size
===================================================================================================
Installing:
 grinder_test_package    noarch    2.0-1.fc14     /grinder_test_package-2.0-1.fc14.noarch    0.0  

Transaction Summary
===================================================================================================
Install       1 Package(s)

Installed size: 0  
Is this ok [y/N]: y
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : grinder_test_package-2.0-1.fc14.noarch                                          1/1 
pulp: profile sent, status=201
  Verifying  : grinder_test_package-2.0-1.fc14.noarch                                          1/1 

Installed:
  grinder_test_package.noarch 0:2.0-1.fc14                                                         

Complete!
[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-2.0-1.fc14.noarch
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# 
[root@dell-pe2950-02 ~]# pulp-admin rpm consumer errata  install run --consumer-id consumer1 -e grinder_test_3
Install task created with id [ c5a4844b-1136-4d11-8fd9-f3e50dcffb5e ]

This command may be exited via ctrl+c without affecting the request.

Refresh Repository Metadata             [ OK ]
Downloading Packages                    [ OK ]
Check Package Signatures                [ OK ]
Running Test Transaction                [ OK ]
Running Transaction                     [ OK ]

Install Succeeded

+----------------------------------------------------------------------+
                               Installed
+----------------------------------------------------------------------+

Name:    grinder_test_package
Version: 3.0
Arch:    noarch
Repoid:  errata



[root@dell-pe2950-02 ~]# rpm -qa |grep grinder
grinder_test_package-3.0-1.fc14.noarch
[root@dell-pe2950-02 ~]#

Comment 12 Randy Barlow 2014-08-09 06:56:53 UTC
This has been fixed in Pulp 2.4.0-1.


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