#8462 fedoraplanet no longer emitting fedmsgs
Closed: Fixed 3 years ago by pingou. Opened 4 years ago by kevin.

Nagios says:

WARN: datanommer has not seen a 'planet' message in 37 days, 20 hours, 33 minutes, 26 seconds

Planet builds on people02.
It uses the 'venus' rpm.
It should emit fedmsgs and send them accross vpn to busgateway01 which should inject them into the bus.


That sounds familiar, we had that a while ago, too. It somehow fixed itself back then, do we know the reason for that ?

Nope, I have no idea why or how it started working again. ;( It might have been after a update/reboot cycle so we updated and rebooted people02/busgateway01?

Do we close this or keep it open?

It's still broken, so leave open. We need someone to dig into it.

Adding the dev tag here as we likely want to port it to fedora-messaging as well

Metadata Update from @pingou:
- Issue tagged with: dev

3 years ago

I decided to start working on the fedora-messaging port of the planet.

I found the source RPM here: https://kojipkgs.fedoraproject.org/packages/venus/bzrrev86/6.el7/src/

And found the patch that is adding the fedmsg support.

For fedora-messaging we need to have a scheme, should I do it as part of the patch, or should we create a standalone repository for the scheme? Similar to one like nuancier has.

The separate repository allow us to better manage versioning of the scheme itself.

Is this the correct topic org.fedoraproject.prod.planet.post.new the planet is publishing?

I confirmed the topic, because I was able to finally query some messages from datagrepper.

For fedora-messaging we need to have a scheme, should I do it as part of the patch, or should we create a standalone repository for the scheme? Similar to one like nuancier has.

The separate repository allow us to better manage versioning of the scheme itself.

I believe @abompard recommends for the separate repo for the message schemas.

Do we want to create the new repo in https://github.com/fedora-infra ?

Metadata Update from @zlopez:
- Issue untagged with: dev

3 years ago

Metadata Update from @zlopez:
- Issue tagged with: dev

3 years ago

The fedora messaging schema and patch for the planet are ready. I created a dummy PR on GitHub, so it could be easily reviewed.

Now I need a new fedora-infra repository as home for the schema and then I will generate a patch for venus.

Metadata Update from @pingou:
- Issue assigned to pingou

3 years ago

Metadata Update from @pingou:
- Issue tagged with: low-trouble, medium-gain

3 years ago

The schema is now hosted in fedora-infra organization. I created a first release and uploaded it to PyPi, so potential consumers can use it.

The dummy PR now contains only patch for venus.

Next step should be adding the patch to venus RPM package and adding the schema either directly to the package or create a new package for it.

Metadata Update from @zlopez:
- Assignee reset
- Issue untagged with: low-trouble, medium-gain

3 years ago

Metadata Update from @zlopez:
- Issue assigned to pingou
- Issue tagged with: low-trouble, medium-gain

3 years ago

Metadata Update from @pingou:
- Assignee reset

3 years ago

I want to continue working on this, but I'm not sure where are the sources for the venus package actually hosted.

I want to continue working on this, but I'm not sure where are the sources for the venus package actually hosted.

Pretty sure it's not really hosted anywhere anymore. I'd use the source in the srpm and patch them as needed

Metadata Update from @zlopez:
- Issue assigned to zlopez

3 years ago

@zlopez has built a new version of venus with his patch: https://koji.fedoraproject.org/koji/taskinfo?taskID=49798905

I've installed it on people02, adjusted the people_base_config to enable fedora-messaging. I've also install fedora-messaging on people02 and manually installed the fedora-planet-messages-1.0.0.tar.gz which I retrieved directly from pypi (tarball installed via easy_install ./fedora-planet-messages-1.0.0.tar.gz).

I ran the planet manually before and after the upgrade. It runs fine before and after, but I see no messages in https://apps.fedoraproject.org/datagrepper/raw?rows_per_page=1&delta=127800&category=planet and I was expecting some errors as I did not set up the fedora-messaging certificates, so it should not manage to send notifications.
I'm now wondering If I'm not simply running into caching where there are no new post and as a results, it doesn't try to send any notifications.

@pingou Thanks for doing this.

I checked the datagrepper today and didn't see any message either. So there is either some issue when sending the message or no new post till Friday.

So it looks like we had still one issue in the code: https://pagure.io/fedora-infrastructure/issue/9274

I've found the fix which is a 2 liners:

         if config.fedora_messaging_enabled() and not os.path.exists(cache_file):
           # If the cache file for this entry doesn't exist, then we can
           # somewhat safely assume we have never seen it before and that
           # it is "new"
+          # Convert the updated_parsed back to a unix timestamp
+          entry['updated_parsed'] = time.mktime(entry['updated_parsed'])
           try:
             msg = fm_publish(
               PostNew(
                 topic="planet.post.new",
                 body={
                   "face": config.parser.get(feed_uri, "face", None),
                   "username": config.parser.get(feed_uri, "fasname", None),
                   "name": config.parser.get(feed_uri, "name", None),
                   "post": entry,
                 }
               )
             )
           except PublishReturned as e:
             _log.warning(
               "Fedora Messaging broker rejected message {}: {}".format(
                 msg.id, e
               )
             )
           except ConnectionException as e:
             _log.warning(
               "Error sending the message {}: {}".format(
                 msg.id, e
               )
             )

Let's get it into the RPM and we'll be able to close this ticket :)

Here is the PR with the fix: https://github.com/Zlopez/venus/pull/2 (I changed a little bit the place of the fix and the comment)

Arf, looks like the patch for the PR above isn't applied in the RPM :(

My mistake, I forgot to apply patch in %prep section, here is the updated build https://koji.fedoraproject.org/koji/taskinfo?taskID=50552690

I've updated venus to the -9 release and ran the main planet manually, we can see in https://apps.fedoraproject.org/datagrepper/raw?rows_per_page=10&delta=127800&category=planet that it worked :)

Thanks @zlopez !!

Checking https://apps.fedoraproject.org/datagrepper/raw?rows_per_page=10&delta=127800&category=planet we can see recent messages proof that the planet is working and sending notifications as expected.

This can be considered as fixed! :)

Metadata Update from @pingou:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

3 years ago

Login to comment on this ticket.

Metadata
Boards 1
dev Status: Done