Over the last couple days I've been sorta-kinda helping Adam move OpenQA
to AMQP and he has, through no fault of his own, had a rough time of it.
The problems boil down to permissions issues and a lack of visibility
into the broker. I'd like to propose two changes so that folks can help
themselves rather than blindly guessing and hoping I am around (there is
a bus around every corner and lottery tickets in every shop).
Firstly, I propose we allow authenticated users to create objects in the
/pubsub (private) vhost using the AMQP client. These users already can
create objects, but they have to do it through Ansible roles rather than
through the AMQP object. Since the AMQP client configuration is checked
into Ansible, though, it's rather redundant to make them declare the
queue separately. When they don't declare it properly, they can't tell
and so it's actually quite a pain point. This is an easy change, we just
change all the accounts to have configure permissions
Secondly, I propose we offer a read-only monitoring account to the web
interface RabbitMQ provides. One great thing about switching from ZeroMQ
to AMQP is that the broker gives us tons of tools to make monitoring and
debugging easier. Allowing users to easily see the objects in the broker
(queues, bindings, exchanges, connections) means they can solve their
own deployment problems rather than pinging me.
I think if we make an account with no AMQP permissions and the
"monitoring" permission, folks should be able to see everything and
not be able to do anything destructive. Then it's just a question of how
to share the credentials (or just make the account name guest with the
username guest?) and how to expose the management UI port (just require
people to sshuttle?).
Notice: I am no longer watching the infrastructure repo, because it
results in a huge volume of mail most of which is not relevant to me,
and I am about to take an extended leave of absence and don't want to
return to thousands of e-mails. However, due to a long-standing Pagure
bug, this means that mentioning me with @bowlofeggs will also not
result in an e-mail, nor will assigning an issue to me. Thus, if you
need my attention on something, you should contact me via some other
I plan to watch the repo again once my extended leave ends.
Gsoc Intern here,want to fetch auth token for the user from
team.fedoraproject.taiga via the api to do stuff but it seems there is
no integration on the api end. Would love some more information about
Another thing i noticed is one should be able to login via the normal
login via api even if the user is registered using fas.
Hello, I am Alisha Mohanty(IRC Handel- alishpapun, FASID - alishapapun), an Outreachy intern working for Fedora Happiness Packet this summer. My skill set includes Docker and Django which are relevant to the project. But I am new to system administration. In Phase 2 of Outreachy internship, we are looking forward to building a staging environment for our project and get it deployed in a production environment. I am looking forward to having a good mentorship and a great time with you all.
On Mon, 2019-06-10 at 09:24 +0900, Tristan Cacqueray wrote:
> On Mon, Jun 10, 2019 at 01:24 Igor Gnatenko wrote:
> > Hello,
> > I have been trying to write some script which would listen on
> > generation of new repository / successful build is tagged in Koji and
> > do some actions locally. Or basically whenever someone pushes commits,
> > I want to fetch repo locally.
> > I was reading https://fedora-messaging.readthedocs.io/en/latest/consuming.html,
> > but it is not very clear to me where I can find list of topics and
> > what data messages will contain...
As well as the doc, there is a sample consumer:
and a couple of sample config files:
that you will probably find useful.
> Hi Igor,
> you can find the list of topics and their associated schema here:
Treat this with caution, because it is...sometimes a lie. It is in fact
auto-generated from the test cases for the
which is where the metadata providers that produce things like the
human-readable summaries you get from FMN live.
If you maintain a thing that publishes fedmsgs, you are *supposed to*
also maintain a provider in fedmsg_meta that can interpret all the
fedmsgs your thing publishes, and a test suite for that provider which
includes tests for every topic your provider publishes on and useful
docstrings for each test. That doc page is then actually built more or
less just by gluing all the test docstrings together.
However, there is no enforcement of any of this. Which means that it
quite often isn't really all in sync. I think there may still be some
fedmsg publishers which don't have a metadata provider or tests at all.
There are definitely some where a provider and tests exist, but the
fedmsg publisher's behaviour has changed a lot since they were written
and no-one has updated the provider or the tests, so the doc no longer
actually lists the topics on which messages are now being published.
I don't really use this list any more because of issues like that...
> And you can also find samples on this website:
...this is much more useful, because it is just a log of all the
*actual* fedmsgs that have ever been published. It can be a bit
unwieldy to work with, but it's not too bad. You can see all Koji
messages from the last two days here:
You can tweak the 'delta' arg (given in seconds), or use 'start' and
'end' (given as Unix timestamps) instead, to get messages from
Note, datagrepper consumes and publishes *fedmsgs*, not fedora-
messaging messages (at least at present). We are currently in the
middle of trying to move things over from fedmsg (the old 0MQ-based
system) to fedora-messaging (the new AMQP-based system). To aid this,
there are bridges in place in both directions: messages published to
fedora-mesaging are re-published as fedmsgs, and messages published as
fedmsgs are re-published to fedora-messaging. Even for messages that
are actually natively published to fedora-messaging, what you see on
datagrepper is the result of the AMQP->0MQ bridge: it's not the actual
original message, but the re-published fedmsg. AFAIK there is no
publicly available 'datagrepper-for-fedora-messaging' ATM, though, so
you can't really look at an archive of the actual messages as they're
seen on the new system.
There is one very important wrinkle you should bear in mind thanks to
this: the message format.
If you're writing an AMQP consumer in Python, what you'll ultimately
get for your consumer to process is a `message` object which is an
instance of a fedora_messaging.api.Message() (or a subclass of it - a
message schema class). This will have a `body` attribute which should
be a dict of the message 'body' - the main meat of the message. If the
message was natively published as a fedora-messaging AMQP message, that
is indeed what it will be. However, if it was published as a fedmsg,
what you get as `message.body` is actually the *entire* fedmsg dict -
the whole dict as you see it when you view a message on datagrepper,
with a bunch of headers and a 'msg' dict with the real body in it, e.g.
To get to what is effectively the 'body' of a fedmsg, you need to take
message.body['msg']. This wrinkle is currently under discussion at
I came across this while converting fedmsg consumers to fedora-
messaging, and I wrote a little helper to deal with it:
Whenever you want the body of a message you just run it through that
and it should give you the 'true' body. That also means you won't have
to worry if the bridge gets changed to fix the bug, that function will
still give the correct result.
If you want to look at some real-world fedora-messaging consumers, that
file contains three consumers for scheduling openQA jobs and reporting
their results. Also see the reference config files (the '.toml' files)
and the README, at top level of the fedora-messaging branch:
You can also look at Bodhi, which has also been converted to fedora-
the config file for Bodhi is in infra ansible:
Oh, one more wrinkle I had fun with: if you want to use the 'public'
credentials for the brokers, be aware that the amqp_url setting and
[tls] block settings in the sample config files are correct, but the
necessary certificate and key files for the staging broker are not
included in the `fedora-messaging` package at present. If you look in
/etc/fedora-messaging after installing it you'll see only the files for
the production broker are there. If you want to listen to the staging
broker, you have to grab the files from a git checkout (they're in the
'configs' dir) and copy them to /etc/fedora-messaging .
Fedora QA Community Monkey
IRC: adamw | Twitter: AdamW_Fedora | XMPP: adamw AT happyassassin . net
I am Shraddha Agrawal, an Outreachy intern with Fedora this summer. My IRC
nick/ FAS ID is shraddhaag.
I'm working on Fedora Happiness Packet. In this phase of my internship,
we'll deploy the application using Docker containers to staging and
eventually automate deployment for production.
My skillset that are relevant to the same include Django and Docker.
I have been trying to write some script which would listen on
generation of new repository / successful build is tagged in Koji and
do some actions locally. Or basically whenever someone pushes commits,
I want to fetch repo locally.
I was reading https://fedora-messaging.readthedocs.io/en/latest/consuming.html,
but it is not very clear to me where I can find list of topics and
what data messages will contain...
Bonus point who can tell me how does it know which messages should be
re-queued and how to manipulate that.