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

feature request: doc about importing External bugs information #523

Open
mjtrangoni opened this issue Jul 29, 2016 · 10 comments
Open

feature request: doc about importing External bugs information #523

mjtrangoni opened this issue Jul 29, 2016 · 10 comments

Comments

@mjtrangoni
Copy link
Contributor

I couldn't find any documentation about how to import to a private FAF instance this information:

  • fedora-bugzilla
  • rhel-bugzilla
  • centos-mantisbt

Is there any way of doing that? How do you correlate this information later on?

Thanks!

@jfilak
Copy link
Contributor

jfilak commented Aug 2, 2016

If you want to add a link between a FAF report and a Bugzilla bug, you can either do that manually on the Report page or configure ABRT to attach the opened Bugzilla bug URL to the micro-report on your FAF instance.

Manual association

Make sure that the faf-bugtracker-centos-mantis, faf-bugtracker-fedora-bugzilla and faf-bugtracker-rhel-bugzilla packages are properly installed (the combination of "yum/dnf" and the command faf install does that). The strings from your question should be included in the output of faf bugtrackerlist.

Go to the report page and click the "Associate bug" button. If you cannot see that button, log in via OpenID.

If you are logged in and still cannot see the button, you must associate your user name with the component of the report - become a maintainer or watch the component in Fedora pkgdb.

If don't want to deal with components, you can make your account an administrator account:

echo "update users set admin='t' where username='<YOUR_USERNAME>'" | sudo -u faf psql

If ryou don't want to deal with user logging at all, you can configure FAF to allow everyone to associate a bug with a report by setting everyone_is_maintainer = yes in the /etc/faf/plugins/webfaf.conf file.

ABRT - automatic association

ABRT automatically associates FAF reports with Bugzilla bugs opened by ABRT (MantisBT reports must be pulled in on FAF $ faf attach-centos-bugs). The only thing you need to do is to configure ABRT to talk to your instance of FAF. Set "URL = " in the /etc/libreport/plugins/ureport.conf file.

If this does not answer your question, please, tell me your goal and we will find a way how to achieve it.

What kind of correlation you have on mind?

@mjtrangoni
Copy link
Contributor Author

Thanks Jakub for your quick response!
My point is, how can I synchronize those bugtrackers to my server?
I have no internet access at my FAF instance, so I want to pull all bugtrackers information to my server, maybe manually with rsync, and then, associate them internally. Is it possible to do that?

@jfilak
Copy link
Contributor

jfilak commented Aug 3, 2016

Well, there is no built-in support for this task but it is definitely possible. Every FAF report is identified by BTHASH (DB table reportbthashes) and every ABRT Bugzilla bug report and ABRT CentOS bug report should include an URL to a FAF report (the URL field in the both systems). The FAF URL consists of server name and BTHASH. So you can export all BTHASHes from your FAF instance (select hash from reportbthashes), find Bugzilla bugs and CentOS bugs with matching URLs, download required bug details to some file in some format and then import the file on your FAF instance. FAF does something similar with CentOS bugs in https://github.com/abrt/faf/blob/master/src/pyfaf/actions/attach_centos_bugs.py - the actions donwloads all CentOS bugs with matching BTHASHes in the bug external URL

@mjtrangoni
Copy link
Contributor Author

Hi Jakub! I already have the information in a JSON file. Which table has the State, External Bug, and Probably fixed values inside? Is it OK to update it manually?
Thanks!

@jfilak
Copy link
Contributor

jfilak commented Oct 3, 2016

Which table has the State,

bzbugs - https://github.com/abrt/faf/blob/master/src/pyfaf/storage/bugzilla.py#L60
mantisbugs - https://github.com/abrt/faf/blob/master/src/pyfaf/storage/mantisbt.py#L50

External Bug,

problems - https://github.com/abrt/faf/blob/master/src/pyfaf/storage/problem.py#L59

and Probably fixed values inside?

problems - https://github.com/abrt/faf/blob/master/src/pyfaf/storage/problem.py#L174

What about to create a python script using FAF API to load the JSON file into the database instead of direct modification of the database? I would love to see that script and maybe include it in FAF.

@djuarezg
Copy link
Collaborator

Sorry for pinging on such an old issue but:

ABRT automatically associates FAF reports with Bugzilla bugs opened by ABRT (MantisBT reports must be pulled in on FAF $ faf attach-centos-bugs). The only thing you need to do is to configure ABRT to talk to your instance of FAF. Set "URL = " in the /etc/libreport/plugins/ureport.conf file.

Does this mean that FAF would be able to automagically associate a problem with an existing bug if it matches certain conditions? I cannot seem to find related configuration for this to work.

@ernestask
Copy link
Collaborator

ernestask commented May 11, 2020

You need to run the pull-abrt-bugs (https://github.com/abrt/faf/blob/master/src/pyfaf/actions/pull_abrt_bugs.py) action periodically.

The condition is typically having abrt_hash in the status whiteboard: https://github.com/abrt/faf/blob/master/src/pyfaf/bugtrackers/fedorabz.py.

Edit: Or, I guess, attach-centos-bugs for CentOS MantisBT.

@djuarezg
Copy link
Collaborator

If the association FAF server problem - MantisBT bug is based on the previously commented BTHASH, I guess it is impossible to do the following according to the comments in this issue:

  • Run our own FAF server
  • Auto-link problems that our nodes reported to our FAF server with already existing CentOS MantisBT bugs, as BTHASH will not match.

@ernestask
Copy link
Collaborator

It’s a hash of a stack trace. If the trace is identical, the hash will be identical as well.

@djuarezg
Copy link
Collaborator

djuarezg commented May 26, 2020

@ernestask Regarding your previous comment, the same error, reported to two different instances, creates a different bthash:

faf=# select * from reportbthashes;
 type  |                   hash                   | backtrace_id 
-------+------------------------------------------+--------------
 NAMES | 0a71a4adf9b2efcb9d6608d6568c1e6836f15574 |            1
 NAMES | d2c00324955eeb5973b0f37b53aab7086faf7144 |            1
(2 rows)
[djuarezg@localhost ~]$ abrt-cli list
Private Reports is enabled, use 'abrt-cli -a COMMAND' to get the detected problems.
id 6e108d1053e4e12b96d7db1dab05205fa6318293
reason:         sleep killed by SIGSEGV
time:           Mon 25 May 2020 04:36:26 PM CEST
cmdline:        sleep 10m
package:        coreutils-8.22-24.el7
uid:            1000 (djuarezg)
count:          2
Directory:      /var/spool/abrt/ccpp-2020-05-25-16:36:26-27533
Reported:       https://abrtanalytics.web.cern.ch/faf/reports/bthash/5bb483b5ca0ea992b911f4d845479a085eab0f24
                https://retrace.fedoraproject.org/faf/reports/bthash/058896b486386a0060459830992f69a275e7f3fd

(Forcing the same error but changing the FAF URL the ureport is sent to)

So AFAIU attaching my reports to existing bugs will not work.

EDIT: I would gladly create a different issue for this, but I think this is strictly related to the problem mentioned on this one.

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

No branches or pull requests

5 participants