-
Notifications
You must be signed in to change notification settings - Fork 30
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
Conversation
Requires Katello/katello#6438 |
|
||
from yum.plugins import PluginYumExit, TYPE_CORE, TYPE_INTERACTIVE | ||
from rhsm.config import RhsmConfigParser, initConfig | ||
from tracer import Query |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! 👍
b63ad5f
to
4b56eb9
Compare
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. |
Weird, I haven't been able to reproduce it, could you dig further please?
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' |
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? |
packages = [] | ||
for pkg in pkgs: | ||
pkg.modified = time.time() | ||
packages.append(pkg) |
There was a problem hiding this comment.
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?
No description provided.