From fbcc01e89c49f5adea58035dffa351bf88bef466 Mon Sep 17 00:00:00 2001 From: Christoph Kraemer Date: Mon, 28 Jun 2021 11:12:31 +0200 Subject: [PATCH 1/2] changed stopping scan process --- ospd/ospd.py | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/ospd/ospd.py b/ospd/ospd.py index be1f1857..49e03db2 100644 --- a/ospd/ospd.py +++ b/ospd/ospd.py @@ -357,8 +357,6 @@ def stop_scan(self, scan_id: str) -> None: '%s: Stopping Scan with the PID %s.', scan_id, scan_process.ident ) - self.stop_scan_cleanup(scan_id) - try: scan_process.terminate() except AttributeError: @@ -381,16 +379,6 @@ def stop_scan(self, scan_id: str) -> None: logger.info('%s: Scan stopped.', scan_id) - @staticmethod - def stop_scan_cleanup(scan_id: str): - """Should be implemented by subclass in case of a clean up before - terminating is needed.""" - - @staticmethod - def target_is_finished(scan_id: str): - """Should be implemented by subclass in case of a check before - stopping is needed.""" - def exec_scan(self, scan_id: str): """Asserts to False. Should be implemented by subclass.""" raise NotImplementedError @@ -558,7 +546,7 @@ def start_scan(self, scan_id: str) -> None: self.finish_scan(scan_id) elif not is_stopped: logger.info( - "%s: Host scan finished. Progress: %d, Status: %s", + "%s: Host scan got interrupted. Progress: %d, Status: %s", scan_id, progress, status.name, From f30eab7216bf588a2caa4167cca04958ae2119ce Mon Sep 17 00:00:00 2001 From: Christoph Kraemer Date: Tue, 6 Jul 2021 06:49:41 +0200 Subject: [PATCH 2/2] add changelog entry --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a52a26f..95756ffa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Changed - Set Log Timestamp to UTC. [#394](https://github.com/greenbone/ospd-openvas/pull/394) +- Stopping scan. [#432](https://github.com/greenbone/ospd/pull/432) ### Fixed ### Removed