Skip to content
This repository has been archived by the owner on Jul 21, 2021. It is now read-only.

use Jobs when scheduling work #12

Closed
goern opened this issue Apr 28, 2018 · 5 comments
Closed

use Jobs when scheduling work #12

goern opened this issue Apr 28, 2018 · 5 comments
Labels
component/analyser enhancement New feature or request

Comments

@goern
Copy link
Member

goern commented Apr 28, 2018

If we turn all workload some components schedule into Job rather than simple Pod, OpenShift will take care of cleaning them up.

The cleanup-job could be removed...

@goern goern added the enhancement New feature or request label Apr 28, 2018
@fridex
Copy link
Contributor

fridex commented Apr 28, 2018

The cleanup-job could be removed...

Is there a mechanism to stop a job after few tries? As we do not have a full control over parameters supplied, can we mark a job that cannot succeed as failed - e.g. the given image cannot be pulled?

@goern
Copy link
Member Author

goern commented Apr 28, 2018 via email

@goern
Copy link
Member Author

goern commented Apr 29, 2018

@fridex can you list the conditions that must be met to delete an old job? In general the job strives to succeed, if the job can pull and image, that might be an application level error, but not a job level error.

@fridex
Copy link
Contributor

fridex commented Apr 29, 2018

@fridex can you list the conditions that must be met to delete an old job?

The current implementation waits 7 days. After that the given pod object is deleted from OpenShift.

In general the job strives to succeed, if the job can pull and image, that might be an application level error, but not a job level error.

Ack, we can definitely do that. We will need to slightly redesign how we report status on API endpoint. Something like:

1.) check if the given analysis has an entry in the graph database
2.) check if the given pod has openshift status, if yes, what is the current status?

In this case we could report more detailed information about analysis status:

  1. does not exist
  2. it was scheduled, queued
  3. it is running
  4. it failed (e.g. image pull)
  5. it succeeded, waiting for sync to the graph database
  6. synced to the graph database

This way we can move to use purely jobs.

As of now, we just report OpenShift pod status.

Just a detail - checks 1. and 2. can be done in parallel.

@fridex
Copy link
Contributor

fridex commented Jun 19, 2019

This is already done, let's close this issue.

@fridex fridex closed this as completed Jun 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
component/analyser enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants