Ask Your Question

No such file or directory - .lock

asked 2014-05-12 15:46:09 -0500

michaelk gravatar image

updated 2014-05-12 15:48:24 -0500

I wrote a Puppet class called "deploy" to deploy a file called "untar-latest" to a directory called "prod". I thought this was fairly straightforward - I've created such classes successfully before. However, during a puppet run I got this output:

Error: No such file or directory - /prod/untar-latest20140512-4965-9j6m66.lock 
Error: /Stage[main]/Deploy/File[untar-latest]/content: change from {md5}37bccfc423c769d601d370d4a4c7c011 to {md5}f69bfe9ba80c71f3958ce455a57e7793 failed: No such file or directory - /prod/untar-latest20140512-4965-9j6m66.lock

Where is that coming from? I suspect it might be a permissions thing.

edit retag flag offensive close merge delete


Can you show the untar-latest resource?

spuder gravatar imagespuder ( 2014-05-13 09:51:00 -0500 )edit

Right now, untar-latest looks something like this: This file will be overwritten. (Just a single line of text.)

michaelk gravatar imagemichaelk ( 2014-05-13 11:34:18 -0500 )edit

Could you show the entire puppet code? e.g. < file{ 'untar-latest': ensure => present, content => "foo", } >

spuder gravatar imagespuder ( 2014-05-13 17:10:19 -0500 )edit

Same error here on a simple file resource. Also submitted a question toward Puppet support, but was curious if this got ever resolved?

filipn gravatar imagefilipn ( 2014-09-17 04:44:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-02-08 18:59:06 -0500

JohnsonEarls gravatar image

I know this is an ancient question - but in case anyone else comes across this looking for an answer - on my server that was having this issue, the directory in which the file resource was being created/modified was out of inodes, so puppet was unable to create the .lock directory in the first place. however, it didn't give an error for that operation, or for the fact that it was unable to create the file with the modified content, but instead gave an error when it was unable to remove the .lock directory.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-05-12 15:46:09 -0500

Seen: 1,315 times

Last updated: Feb 08