Project

Profile

Help

Issue #584

closed

Consumer profile data not showing up on server

Added by contact@andreagiardini.com about 9 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
3. High
Version:
Platform Release:
2.6.0
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

Description of problem:

Right now the pulp consumer updates the server about the packages profile every N minutes, where N is specified in /etc/pulp/consumer/consumer.conf under [profile] minutes.

I think it makes sense to be able to trigger the package profile update via pulp-consumer after a yum/puppet event instead of on a time basis.

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

How reproducible:

Steps to Reproduce:
1.
2.
3.

Actual results:

Expected results:

Additional info:

+ This bug was cloned from Bugzilla Bug #1155192 +

Actions #1

Updated by jortel@redhat.com about 9 years ago

Pulp provides a yum plugin which reports the installed packages profile at the end of every yum install/update/uninstall transaction. It is packaged in the pulp-rpm-yumplugins RPM.

+ This comment was cloned from Bugzilla #1155192 comment 1 +

Actions #2

Updated by jortel@redhat.com about 9 years ago

We'll review the docs to be sure this is documented sufficiently.
Do you have the plugin installed?

+ This comment was cloned from Bugzilla #1155192 comment 2 +

Actions #3

Updated by contact@andreagiardini.com about 9 years ago

I didn't know about this plugin but I found out that it's already installed in my system (Is it included in the pulp-consumer group?), but I haven't found any documentation for it.

In any case the plugin it's not working as i expect, as you can see here the reports it sent every 10 minutes:

Oct 27 10:21:52 pulp-consumer2 goferd: [INFO][Actions] pulpplugin:438 - profile (rpm), reported: 201
Oct 27 10:23:50 pulp-consumer2 yum[1201]: Erased: htop
Oct 27 10:31:52 pulp-consumer2 goferd: [INFO][Actions] pulpplugin:438 - profile (rpm), reported: 201

pulp-rpm-yumplugins-2.4.5-1.el6.noarch installed

Do i need to activate it?

+ This comment was cloned from Bugzilla #1155192 comment 3 +

Actions #4

Updated by bmbouter about 9 years ago

I believe if yum lists the plugin in its plugin list when you do a yum operation than it is installed. I have the plugin enabled, and when I do a 'yum search asdfasdf' I see the output:

Loaded plugins: langpacks, pulp-profile-update, refresh-packagekit

The presence of the pulp-profile-update tells me that the plugin is loaded. Is yours loaded?

I learned more about this behavior since we originally filed the bug. I think it currently does what this BZ is requesting. If the plugin is loaded then it will report the consumer profile to pulp with every yum operation. This in effect will cause it to update after any yum event. I can't say the same for Puppet, but regarding yum I believe this behavior already does the requested behavior.

Given this new info, do you still feel this is an issue?

I do feel this behavior could be documented a little more clearly in the pulp-rpm guide. I think this BZ should be used for that purpose.

+ This comment was cloned from Bugzilla #1155192 comment 4 +

Actions #5

Updated by contact@andreagiardini.com about 9 years ago

I agree with you, the plugin is doing exactly what i was looking for, so it can't be classified as an RFE anymore, but i still have problems with the plugin so maybe we should leave this issue open.

The plugin is loaded in yum, still no reports after yum install.

Maybe conflicting with another plugin?


/etc/yum/pluginconf.d/pulp-profile-update.conf:

  1. Updates package profile information for a registered consumer on pulp server

[main]
enabled=1
verbose=1


/var/log/messagges:

Oct 28 01:02:06 pulp-consumer1 goferd: [INFO][Actions] pulpplugin:438 - profile (rpm), reported: 201
Oct 28 01:10:12 pulp-consumer1 yum[16358]: Installed: screen-4.0.3-16.el6.x86_64
Oct 28 01:12:06 pulp-consumer1 goferd: [INFO][Actions] pulpplugin:438 - profile (rpm), reported: 201


yum install screen:

[root@pulp-consumer1 pluginconf.d]# yum install screen
Loaded plugins: changelog, kernel-module, priorities, pulp-profile-update, rpm-warm-cache, security, tsflags, versionlock
1766 packages excluded due to repository priority protections
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package screen.x86_64 0:4.0.3-16.el6 will be installed
--> Finished Dependency Resolution
Beginning Kernel Module Plugin
Finished Kernel Module Plugin

Dependencies Resolved

======================================================================
Package Arch Version Repository Size
======================================================================
Installing:
screen x86_64 4.0.3-16.el6 slc6-os 493 k

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

Total download size: 493 k
Installed size: 795 k
Is this ok [y/N]: y
Downloading Packages:
screen-4.0.3-16.el6.x86_64.rpm | 493 kB 00:00
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
Installing : screen-4.0.3-16.el6.x86_64 1/1

Verifying  : screen-4.0.3-16.el6.x86_64                                                                                                                             1/1 

Installed:
screen.x86_64 0:4.0.3-16.el6

Complete!

_**____

+ This comment was cloned from Bugzilla #1155192 comment 5 +

Actions #6

Updated by bmbouter about 9 years ago

From everything you've provided it looks like the plugin is working as intended.

You say you are having problems with the plugin, and that no profiles are reported. How are you trying to view the profiles currently? Do you use pulp-admin commands for that? If so, which ones.

+ This comment was cloned from Bugzilla #1155192 comment 6 +

Actions #7

Updated by contact@andreagiardini.com about 9 years ago

In the /var/log/messagges that i previousely attached you can see the wrong behaviour: I got one report at 01:02:06, then i installed screen at 01:10:12, but the next update to the server was submitted at 01:12:06.
So the updates are submitted to the server every 10 minutes, not after a yum install (10 is the interval that i set in the /etc/consumer/consumer.conf for periodic update to the server).

I get the packages from the pulp server with this command:

curl -u admin:admin -k https://localhost/pulp/api/v2/consumers/pulp-consumer1/profiles/rpm/

And i see that the list is updated every ten minutes, not after a yum install. The profile is displayed correctly, but it's not updated after yum instal

+ This comment was cloned from Bugzilla #1155192 comment 7 +

Actions #8

Updated by contact@andreagiardini.com about 9 years ago

I think there is a little confusion... The profile is shown correctly, but it's not updated in real time.

+ This comment was cloned from Bugzilla #1155192 comment 8 +

Actions #9

Updated by bmbouter about 9 years ago

I see the 10 minutes you are referring to in the log. This BZ indicates that the rpm profile is not updated after each run, but it is being updated correctly by goferd in a time-based way. The 10 minute reported profiles are the only ones viewable through the API for that consumer.

We recently fixed an issue with profile reporting [0], but that had a different error message with it. It did prevent the profile reporting from working correctly, so perhaps that regression is what you are running into and you aren't seeing the error message.

If it is related to that other issue, you could try patching your code with the diff from that fix [1], or using a remote debugger in the code path [2] to see if the data is being submitted with each run of yum. That would help identify the root cause.

Given the new information I'm going to send this back to be re-triaged.

[0]: https://bugzilla.redhat.com/show_bug.cgi?id=1152633
[1]: https://github.com/pulp/pulp_rpm/pull/583/files
[2]: https://github.com/bmbouter/pulp_rpm/blob/master/handlers/usr/lib/yum-plugins/pulp-profile-update.py#L54

+ This comment was cloned from Bugzilla #1155192 comment 9 +

Actions #10

Updated by contact@andreagiardini.com about 9 years ago

Applied the patch using:

git format-patch 1 7d0bc2697343f9f0987560c29a0133dba584c254
patch -p1 < 0001-Pulp-Yum-plugin-can-now-find-consumer.conf-settings
.patch

The file /usr/lib/yum-plugins/pulp-profile-update.py was correctly updated and the pyc/pyo files were compiled correctly.
Still no reports after yum install.

Oct 29 10:23:15 pulp-consumer1 goferd: [INFO][Actions] pulpplugin:438 - profile (rpm), reported: 201
Oct 29 10:25:36 pulp-consumer1 yum[30783]: Installed: htop-1.0.1-2.el6.x86_64
Oct 29 10:33:16 pulp-consumer1 goferd: [INFO][Actions] pulpplugin:438 - profile (rpm), reported: 201

I'm not able to find any log about the pulp-plugin.

+ This comment was cloned from Bugzilla #1155192 comment 10 +

Actions #11

Updated by bmbouter about 9 years ago

After some investigation, it was discovered that the root cause of this bug is that the verify_ssl_ca conf attribute is being evaluated as 'False' and not False which is causing the default of True to always be used. To reproduce, set verify_ssl_ca to false, and watch profile reporting fail.

Note also: verify_ssl_ca was renamed to verify_ssl in 2.5.0

+ This comment was cloned from Bugzilla #1155192 comment 11 +

Actions #12

Updated by contact@andreagiardini.com about 9 years ago

https://github.com/pulp/pulp_rpm/pull/588

Should fix the problem

+ This comment was cloned from Bugzilla #1155192 comment 12 +

Actions #13

Updated by bmbouter about 9 years ago

Re-opened a new PR with the correct branches:

https://github.com/pulp/pulp_rpm/pull/590

+ This comment was cloned from Bugzilla #1155192 comment 13 +

Actions #14

Updated by bmbouter about 9 years ago

merged to 2.5-dev -> master

+ This comment was cloned from Bugzilla #1155192 comment 14 +

Actions #15

Updated by bmbouter about 9 years ago

QA, to verify this you should set verify_ssl = False in consumer.conf and have the SSL certificate that Pulp is presenting via the API be a valid cert, but not be signed by a trusted CA. With that setup then:

1) have a consumer machine setup and bound to a repo
2) use yum to install any package on the consumer
3) list the profile details for that consumer, and observe that the change you just made is not in the list.

Note, that we believe periodic reporting is working. The aspect that is not working is the profile posting with each run of yum.

+ This comment was cloned from Bugzilla #1155192 comment 15 +

Actions #16

Updated by cduryee about 9 years ago

fixed in pulp 2.6.0-0.2.beta

+ This comment was cloned from Bugzilla #1155192 comment 16 +

Actions #17

Updated by pthomas@redhat.com about 9 years ago

verified
[root@cloud-qe-4 ~]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch

checked in the database to make sure that consumer_unit_profiles is updated after each install of rpms.

+ This comment was cloned from Bugzilla #1155192 comment 17 +

Actions #18

Updated by bmbouter about 9 years ago

  • Severity changed from High to 3. High
Actions #19

Updated by rbarlow about 9 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #21

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF