-
Notifications
You must be signed in to change notification settings - Fork 169
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
Add reporter to report logs sent by foreman callback #870
Conversation
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.
Sounds good
Would it make sense to move this to the
instead of duplicating this for every log? |
@ezr-ondrej I agree that this would be better. However, |
For now I'd agree, but that can be changed quite "easily". |
today, |
@evgeni correct, but I regard it as the first step to add a change here, before we adopt it in foreman_ansible. |
Cool, then I think Foreman and Foreman Ansible should agree on a way forward and then we can implement the right tag in the callback :) |
If we won't move forward with my suggestion soon, I'd say we can role with what is here now and change just ansible implementation and once we agree get it done in core, we can change the implementation here. |
Now that theforeman/foreman#7819 is merged, I guess we need the matching change in |
and then probably set it like in https://github.com/theforeman/foreman-ansible-modules/pull/896/files to the global data, and not on every log object? |
@m-bucher could you update this to set it to the global data, please? For the record, @xprazak2 is already working on it in theforeman/foreman_ansible#261 |
When ansible fails to connect to remote host, callback sends a report to Foreman without any indication that the report comes from Ansible. As a result, Foreman is unable to determine the report origin. This adds a 'reporter' attribute into the logs that are sent.
dc430ae
to
e99e78b
Compare
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.
LGTM!
@xprazak2 should we merge this now, or wait on theforeman/foreman_ansible#261 -- IMHO merging now is OK if you don't anticipate any design changes in foreman_ansible
anymore
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.
I think we are good to merge, foreman_ansible
have all means now to adjust to this and IMHO it's the best place to put the reporter tag to, so it should 🤷
hmm what is the release process for this? 🤔 |
This == this collection? We release new stuff here on GH, it gets pushed to Galaxy, the next time Ansible decides to pull new stuff (aka: next is for 2.10.1) it gets in. |
Yeah, I meant this collection :) thanks, I was just checking about the backwards compatibility we will need to get. |
The collection is usable by 2.8 and newer, but in the case of 2.8/2.9 the user needs to install it explicitly to get the callback, instead of getting it automatically. |
|
When ansible fails to connect to remote host,
callback sends a report to Foreman without
any indication that the report comes from
Ansible. As a result, Foreman is unable
to determine the report origin.
This adds a 'reporter' attribute into
the logs that are sent.
Fixes #836