greenbone / ospd

OSPd is a framework for vulnerability scanners which share the same communication protocol: OSP (Open Scanner Protocol)
GNU Affero General Public License v3.0
30 stars 36 forks source link

[20.08] Mention PID in the scan stopping / stopped log messages. #308

Closed cfi-gb closed 4 years ago

cfi-gb commented 4 years ago

Noticed the following entry while checking some logs:

OSPD[235] 2020-08-01 17:02:03,615: INFO: (ospd.ospd) a15f45b4-034e-48af-9f68-be58e9e83f09: Scan stopping 1675.

Without checking the code it is completely unclear what the last "1675" means. Adding the "PID" text gives some more context.

I'm not absolutely sure if scan_process.ident is indeed the PID but a few lines below the following comparison is done so this might be right:

if scan_process.ident != os.getpid():
bjoernricks commented 4 years ago

@cfi-gb could you run black on the changed file to fix the linting?

cfi-gb commented 4 years ago

@bjoernricks Sure, done and force-pushed the changes.

codecov[bot] commented 4 years ago

Codecov Report

Merging #308 into ospd-20.08 will not change coverage. The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           ospd-20.08     #308   +/-   ##
===========================================
  Coverage       73.35%   73.35%           
===========================================
  Files              23       23           
  Lines            2560     2560           
===========================================
  Hits             1878     1878           
  Misses            682      682           
Impacted Files Coverage Δ
ospd/ospd.py 71.14% <100.00%> (ø)

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 bfe22fc...2a12cb4. Read the comment docs.

cfi-gb commented 4 years ago

Backport to the ospd-2.0 branch in #309