Hi:
I am automating with python-gvm script. i met a problem as title. my steps are as below.
my questions are :
a. what else element could make a target “in_use” besides a Task element?
b. once we met this problem, is there any way to quickly set a target NOT “in_use”? I have tried restart gvmd.service, but it not work.
PS: i didn’t do any force restart action before i met the problem.
problematic steps:
1.historically, i created target with resp = gmp.create_target( name=name, comment=comment, hosts=hosts, port_list_id=port_list_id )
where i set all the variables already, and it is validated with the value by several successful runs.
2.i suddenly find the problem one day.
3.i run single cmd in gvm-pyshell with gmp.get_targets() which i think shows all the targets created by gvm-tools, i find a target “in_use” = 1
4.i run gvm-pythell with gmp.get_tasks() to get all the tasks data but i can not the target that “in_use”=1 associated in the task. by “target id=” value.