4

I'm running the bradbeck/nexus-https container using kubernetes in Azure Container Service and mounting the /nexus-data volume against an Azure storage account File Share. On the k8s-agents I installed cifs-utils to access the file share.

When the pod exited, perhaps not gracefully(?), the samba client put the pending delete flag on /nexus-data/cache/cache.lock and has not released it.

When I try to start a new pod mounting the same file share, it fails with:

File does not exist: /nexus-data/cache/cache.lock

When I try to delete it through the Azure Portal, it fails with:

Failed to delete file 'nexus-data/cache/cache.lock'. Error: The specified resource is marked for deletion by an SMB client.

That is a 409 error.

How do I break this lock / get rid of this file?


Edit: I tried restarting the k8s-agents, but even this didn't work! Fortunately I could delete the entire file share, and recreate it. That might not by an option in the future: az storage share delete --name nexus-data

Niel de Wet
  • 7,806
  • 9
  • 63
  • 100

1 Answers1

0

As far as I can tell, this has nothing to do with Nexus per se. I experienced the same thing with a TeamCity server as well.

What is happening is that when a container dies the samba file share is not unmounted on the host machine. I haven't yet figured out how to work out which entry in /etc/mtab belongs to the data volume of the dead container. For now I'm restarting the host, which unmounts the file system and allows the delete instruction to complete.

Niel de Wet
  • 7,806
  • 9
  • 63
  • 100