Title
#fleet
Esteban

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.
{
  "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`))"
    }
  ]
}
Tomas Touceda

Tomas Touceda

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

Esteban

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

Tomas Touceda

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

Esteban

08/19/2021, 2:31 PM
10.5.4
Tomas Touceda

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
Esteban

Esteban

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