Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs #17230 - Upload apps that require a restart #38

Merged
merged 1 commit into from
Nov 9, 2016

Conversation

sean797
Copy link
Member

@sean797 sean797 commented Nov 4, 2016

No description provided.

@sean797
Copy link
Member Author

sean797 commented Nov 4, 2016

Requires Katello/katello#6438


from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE
from rhsm.config import RhsmConfigParser, initConfig
from tracer import Query
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will fail on below el7, should I wrap it in a try & except or should we not install it on below el7 using the spec file?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you can catch the import error and throw some sort of warning, that would probably be ideal. We'd want to exclude it from <el7 on the spec file regardless i think.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done! 👍

@sean797 sean797 force-pushed the tracer branch 2 times, most recently from b63ad5f to 4b56eb9 Compare November 7, 2016 09:38
@jlsherrill
Copy link
Member

I played with this a bit and it seemed to work well, except the yum plugin didn't seem to upload the results. I would see 'Uploading Tracer Profile' but no request would come into the rails server. I tried adding some debug but the results were quite odd, i never got a 'Unable to upload Tracer Profile', but its like the plugin just quit without an exception. Running katello-tracer-upload caused it to be uploaded just fine.

If you're not able to reproduce I can dig further.

@sean797
Copy link
Member Author

sean797 commented Nov 9, 2016

Weird, I haven't been able to reproduce it, could you dig further please?
A few things that might help:

I've just made a small change around line 44, it would have raised KeyError if 'yum' didn't exist in the dictionary before, but I doubt that was your problem since you never saw 'Unable to upload Tracer Profile'

@jlsherrill
Copy link
Member

Pulling in your changes and the new tracer version seemed to resolve this and it all worked great. I'll go ahead and merge this and the katello change. Thanks!

We can discuss in the packaging PR, but i'm guessing we'll want this in a subpackage?

@jlsherrill jlsherrill merged commit 78022e7 into Katello:master Nov 9, 2016
packages = []
for pkg in pkgs:
pkg.modified = time.time()
packages.append(pkg)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Of course after merging, i think i found an issue :)

It looks like this logic is only causing packages that were updated to be submitted and ignoring anything else. This causes for example:

yum update mongodb
yum update tuned

to first report mongodb, then report just tracer, so the UI ends up showing only tracer. When running katello-tracer-upload it properly reports both. Any reason to just not report all services during a yum action?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants