Hi guys,
when I try to delete an artifact from the the web UI of a Mender 3.0 server, it says there was an error because the artifact is in use by an active deployment. The problem is that there is not a deploy with that artifact.
However, I called the server APIs with Postman, and, while I can correctly see the artifact in the response of
GET /api/management/v1/deployments/deployments/releases
{
"Name": "ch-labels-dev-12-30",
"Artifacts": [
{
"id": "9e070a57-a610-4cdc-9234-540b626578e9",
"name": "ch-labels-dev-12-30",
"device_types_compatible": [
"raspberrypi4-64"
],
"info": {
"format": "mender",
"version": 3
},
"signed": false,
"updates": [
{
"type_info": {
"type": "rootfs-image"
},
"files": [
{
"name": "custom-image-update-raspberrypi4-64.ext4",
"checksum": "aa05a5ef5c1aa1f52cb40fc201d981cbcba71afac83609941790ce25ea97e410",
"size": 2541748224,
"date": "2021-09-09T10:57:17Z"
}
]
}
],
"artifact_provides": {
"artifact_name": "ch-labels-dev-12-30",
"rootfs-image.version": "ch-labels-dev-12-30"
},
"artifact_depends": {
"device_type": [
"raspberrypi4-64"
]
},
"clears_artifact_provides": [
"artifact_group",
"rootfs_image_checksum",
"rootfs-image.*"
],
"size": 300002304,
"modified": "2021-09-09T11:59:37.995Z"
}
]
},
I cannot find any deployment involving this artifact with id 9e070a57-a610-4cdc-9234-540b626578e9
in the response of
GET /api/management/v1/deployments/deployments
I also tried to delete the artifact by calling
DELETE /api/management/v1/deployments/artifacts/9e070a57-a610-4cdc-9234-540b626578e9
but fails with a status 409 saying
{
"error": "Artifact is used in active deployment",
"request_id": "690d14ac-24be-476c-a2bf-896dffad1c01"
}
Maybe something in the DB got corrupted in some way? How can I remove this artifact?