https://github.com/osquery/osquery logo
#fleet
Title
# fleet
e

Esteban

08/19/2021, 2:06 PM
Hello, is this a bug? I'm trying to delete an offline host and this happens. This is the response from the server.
Copy code
{
  "message": "Validation Failed",
  "errors": [
    {
      "name": "base",
      "reason": "Error 1451: Cannot delete or update a parent row: a foreign key constraint fails (`fleet`.`host_software`, CONSTRAINT `host_software_ibfk_1` FOREIGN KEY (`host_id`) REFERENCES `hosts` (`id`))"
    }
  ]
}
t

Tomas Touceda

08/19/2021, 2:10 PM
hi Esteban, how are you trying to delete the host?
e

Esteban

08/19/2021, 2:11 PM
On host details, clicking on Delete
I think there's a constraint since that host has software related to him
t

Tomas Touceda

08/19/2021, 2:15 PM
will look into it
ah yes, it doesn't have the delete cascade
you were running mariadb, correct? could you remind me the version?
e

Esteban

08/19/2021, 2:31 PM
10.5.4
t

Tomas Touceda

08/19/2021, 4:39 PM
all right, just pushed a pull request to address this issue. Should be available in the next release. In the meantime, as a work around would be to clear the host_software for that host by hand
e

Esteban

08/19/2021, 4:51 PM
Understood, thank you!