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

Turn anitya cron job to service #668

Closed
Zlopez opened this issue Nov 28, 2018 · 13 comments · Fixed by #754
Closed

Turn anitya cron job to service #668

Zlopez opened this issue Nov 28, 2018 · 13 comments · Fixed by #754
Assignees
Labels
High priority This ticket has a high priority type.dev Development related change
Milestone

Comments

@Zlopez
Copy link
Contributor

Zlopez commented Nov 28, 2018

Current cron job used by Anitya is not very reliable.

So it will be better to turn it into service probably using twisted library. This will make scheduling much easier and we could also add the ability to send e-mail when things are failing.

Here is the list of the features it should have:

  • easy scheduling
  • notification about high fail rate (probably through e-mail)
@Zlopez Zlopez added type.dev Development related change High priority This ticket has a high priority labels Nov 28, 2018
@cheese1
Copy link

cheese1 commented Dec 30, 2018

just curious: why is it not possible to send mails from cron or because of a failing cron?

@Zlopez
Copy link
Contributor Author

Zlopez commented Dec 30, 2018

This is probably possible, I just didn't yet look into this option yet.

@abitrolly
Copy link
Contributor

Does it make sense to change it to systemd job first?

@Zlopez
Copy link
Contributor Author

Zlopez commented Jan 7, 2019

No, because the systemd units aren't working in containers and the release-monitoring.org is managed in OpenShift.

@abitrolly
Copy link
Contributor

In development environment anitya is a systemd service. It becomes a container in OpenShift? Then there is no logs, no auto-restart unless there is something like Kubernetes managing the lifecycle.

@Zlopez
Copy link
Contributor Author

Zlopez commented Jan 7, 2019

@abitrolly
In development the Anitya is only user systemd unit. In OpenShift it is container that is build, deployed and managed by OpenShift. It has auto-restart feature, so if running instance is down, it will try to start it again.
This is the same behavior I want to see with this cron job.

@abitrolly
Copy link
Contributor

Does it provide logs, error counter and error messages?

@Zlopez
Copy link
Contributor Author

Zlopez commented Jan 7, 2019

The logs will be handled the same way as they are now. Saved to the database. Error counter must be implemented, error messages are saved to every project even now as update log.

@Zlopez
Copy link
Contributor Author

Zlopez commented Jan 7, 2019

Otherwise the log of the container is accessible in OpenShift, I can look at it there.

@Zlopez Zlopez added this to the 0.16.0 milestone Feb 21, 2019
@Zlopez Zlopez self-assigned this Mar 1, 2019
@TomasTomecek
Copy link
Contributor

Did you consider celery?

@abitrolly OpenShift is Kubernetes.

@Zlopez
Copy link
Contributor Author

Zlopez commented Mar 4, 2019

@TomasTomecek Didn't heard about it. I will give it a try.

@TomasTomecek
Copy link
Contributor

@Zlopez
Copy link
Contributor Author

Zlopez commented Mar 5, 2019

I looked at it and it's not really usable for Anitya. It needs a broker, which is not necessary in our case, because we have all the information internally available in our current database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
High priority This ticket has a high priority type.dev Development related change
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants