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

Fix resume task. #464

Merged
merged 1 commit into from
Oct 12, 2021
Merged

Conversation

jjnicola
Copy link
Member

@jjnicola jjnicola commented Oct 8, 2021

What:
Fix resume task

Why:
In some cases, the task is stopped and quickly resumed. In this cases there was race condition
in which the scan id is present in the scan table but there is no target information.
Although the quick resume can lead first into a stopped and scan followed by an interrupted scan,
finally the scan can be resumed.

How:
Start, stop and resume task, until you get the interrupted scan. With the patch, resuming the task should finally work and the scan should end successfully.

Checklist:

In some cases, the task is stopped and quickly resumed. In this cases there was race condition
in which the scan id is present in the scan table but there is no target information.
Although the quick resume can lead first into a stopped and scan followed by an interrupted scan,
finally the scan can be resumed.
@jjnicola jjnicola requested a review from a team as a code owner October 8, 2021 09:24
@codecov
Copy link

codecov bot commented Oct 8, 2021

Codecov Report

Merging #464 (d4bf472) into ospd-21.04 (f5c6222) will decrease coverage by 0.02%.
The diff coverage is 66.66%.

Impacted file tree graph

@@              Coverage Diff               @@
##           ospd-21.04     #464      +/-   ##
==============================================
- Coverage       74.67%   74.65%   -0.03%     
==============================================
  Files              23       23              
  Lines            2638     2643       +5     
==============================================
+ Hits             1970     1973       +3     
- Misses            668      670       +2     
Impacted Files Coverage Δ
ospd/scan.py 92.45% <66.66%> (-0.63%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f5c6222...d4bf472. Read the comment docs.

@ArnoStiefvater ArnoStiefvater merged commit 57be2f8 into greenbone:ospd-21.04 Oct 12, 2021
@jjnicola jjnicola added the backport-to-main This pull request will be backported to the master branch label Oct 12, 2021
y0urself added a commit that referenced this pull request Oct 13, 2021
@jjnicola jjnicola deleted the delete-scan branch October 15, 2021 09:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport-to-main This pull request will be backported to the master branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants