If the contents of /var/lib/replicated/snapshots/sha256 are removed replicatedctl snapshot rm fails


#1

If the contents of /var/lib/repilcated/snapshots/sha256 are removed replicatedctl snapshot rm fails with this error

sudo replicatedctl snapshot rm 0cca90caa19244a1559be9752d27da4f 
Error: request returned Unauthorized for API route and version https://%2Fvar%2Frun%2Freplicated%2Freplicated-cli.sock/v0.1/app/snapshot?appid=&snapshotid=0cca90caa19244a1559be9752d27da4f, check if the server supports the requested API version or if it is unhealthy

Is there another way to remove the snapshot via cli? I was eventually able to remove the snapshot via the dashboard.
Thanks,
Casey


#2

Casey:

Good afternoon!

Upon digging around and according to the documentation Here, this is the only CLI command to remove snapshots via the CLI.

Please let me know if you need further information or you have questions.

Thanks!
Tamara Henson
Lead Support Engineer - Replicated


#3

Casey:

Can you attach logs from the replicated container or a support bundle for review?

Thanks!
Tamara Henson
Lead Support Engineer - Replicated


#4

Hi Tamara,
Here is a relevant log entry from the replicated container.

ERRO 2020-12-03T18:17:08+00:00 premkit/log/gin.go:97 [GIN] 401 |      42.24µs |  | DELETE  /v0.1/app/snapshot

Thanks!
Casey


#5

Casey,

Why was the sha256 directory removed in the first place? Is this just a bug report, or a “things are broken for this install” support request? We really don’t have any context.

Would you be willing to provide a support bundle here?


#6

I’m not able to share that information here and I cannot share the support bundle. I was wondering if there is a force flag. What is the recommended method to remove a snapshot when the replicatedctl snapshot rm command fails?
Thanks,
Casey