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

gvmd --delete-scanner does not remove tasks. #2067

Open
bwittmeyer opened this issue Aug 24, 2023 · 0 comments
Open

gvmd --delete-scanner does not remove tasks. #2067

bwittmeyer opened this issue Aug 24, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@bwittmeyer
Copy link

Expected behavior

gvmd deletes any stopped/completed tasks and reports when the scanner is deleted.

Actual behavior

gvmd deletes the scanner as requested but any tasks associated with scanner are not deleted
this includes from the trash can resulting in display corruptions for GSAD when displaying the list of
reports or the trash can if any tasks were moved to the trash can.

This is because while the scanner is deleted the references to it are not removed. Before the scanner
was deleted it should have removed any stopped/completed tasks for that scanner as well as removing
any tasks associated with the scanner that are currently in the trash can.

Steps to reproduce

  1. create an OSP-Scanner and connect it gvmd with gvmd --create-scanner with scanner-type OSP-Sensor
  2. create a task for the specific scanner created above and start it with GSAD let the task complete
  3. use gvmd --delete-scanner to remove the scanner.
  4. The GSAD task view will show An internal error occurred while getting resources list. The current list of resources is not available. Diagnostics: Failure to receive response from manager daemon.

Note the same error will occur if you move a task to the trash can and delete the scanner without first
removing it from the trash.

GVM versions

gsa: (gsad --version)
container: gsa:22.5.3
docker compose exec gsa gsad --version
Greenbone Security Assistant 22.05.1

gvm: (gvmd --version)
container: ospd-openvas:22.6.0
docker compose $COMPOSE_OPTIONS exec -u gvmd gvmd gvmd --version
Greenbone Vulnerability Manager 22.6.0
Manager DB revision 255
Copyright (C) 2009-2021 Greenbone AG
License: AGPL-3.0-or-later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

openvas-scanner: (openvas --version)
container: ospd-openvas:22.5.3
docker compose exec ospd-openvas openvas --version
OpenVAS 22.7.3
gvm-libs 22.4.1~dev1
Most new code since 2005: (C) 2022 Greenbone Networks GmbH
Nessus origin: (C) 2004 Renaud Deraison deraison@nessus.org
License GPLv2: GNU GPL version 2
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gvm-libs:
see above

Environment

NAME="Rocky Linux"
VERSION="8.8 (Green Obsidian)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="8.8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Rocky Linux 8.8 (Green Obsidian)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:8:GA"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2029-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-8"
ROCKY_SUPPORT_PRODUCT_VERSION="8.8"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.8"

Installation method / source: (packages, source installation)
source install or docker install

Logfiles

greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h42.52 UTC:11704: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h43.11 UTC:11772: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h43.26 UTC:11777: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h43.42 UTC:11780: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h43.57 UTC:11783: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h44.12 UTC:11786: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h44.27 UTC:11789: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h44.42 UTC:11792: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h44.57 UTC:11795: handle_get_tasks: GET_TASKS: error finding task scanner, aborting
greenbone-scanner-gvmd-1 | md gmp:UNKNOWN:2023-08-24 15h45.12 UTC:11798: handle_get_tasks: GET_TASKS: error finding task scanner, aborting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant