The Puppet Labs Issue Tracker has Moved:

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using See the following page for information on filing tickets with JIRA:

Bug #10986

"Failed to mount" in appdmg/pkgdmg provider

Added by Matthias Pigulla over 4 years ago. Updated over 2 years ago.

Status:Code InsufficientStart date:11/21/2011
Priority:NormalDue date:
Assignee:-% Done:


Target version:-
Affected Puppet version:2.6.8 Branch:

We've Moved!

Ticket tracking is now hosted in JIRA:


Mac OS X’s mount command sometimes complains “failed to mount – not recognized” for the downloaded file, and even if I haven’t fully understood when/why this happens, using a .dmg or .pkg file extension for the temporary file seems to be a working solution.

The pull req is over there:

Related issues

Related to Puppet - Bug #11108: The pkgdmg provider is functionally dependent on the reso... Closed 11/30/2011


#1 Updated by Josh Cooper over 4 years ago

  • Target version set to 3.x
  • Branch set to

Hi Mattias,

Which version of puppet were you seeing this issue? I tried reproducing on 2.7.x, but wasn’t able to get mount to fail. If you find any more info about why this happens, please let us know.

#2 Updated by Matthias Pigulla over 4 years ago

Puppet 2.6.8.

However, I am sure it’s not related to the Puppet version itself. When I digged into this I manually downloaded the .dmg file in question with the same wget command (taken from puppet’s —debug) and tried to mount it.

As I said, I don’t really know why this happens (or if it happens on all recent versions of OS X). But if the mount fails, simply renaming the file and trying the mount again works…

#3 Updated by Josh Cooper over 4 years ago

  • Status changed from Unreviewed to Accepted
  • Target version changed from 3.x to 2.7.x
  • Affected Puppet version set to 2.6.8

#4 Updated by Gary Larizza over 4 years ago

  • Assignee set to Gary Larizza

#5 Updated by Kelsey Hightower almost 4 years ago

  • Status changed from Accepted to Code Insufficient

So the code needs tests, which I’m happy to pair. Also we need to rebase this pull request before it can be merged.

#6 Updated by Gary Larizza almost 4 years ago

  • Assignee deleted (Gary Larizza)

#7 Updated by Anonymous over 3 years ago

  • Target version deleted (2.7.x)

#8 Updated by Matthias Pigulla over 2 years ago

The above PR at GitHub has been closed because it needs a rebase and lacks tests. Honestly, I am not a Ruby developer and afraid I won’t be able to contribute these.

What I can tell is that the following patch solves the problem at least in the appdmg provider and will probably work in a similar fashion for pkgdmg. (The issue still persists on OS X 10.8.5).

--- a/modules/puppet/lib/puppet/provider/package/appdmg.rb
+++ b/modules/puppet/lib/puppet/provider/package/appdmg.rb
@@ -58,7 +58,7 @@
     tmpdir = Dir.mktmpdir
       if %r{\A[A-Za-z][A-Za-z0-9+\-\.]*://} =~ cached_source
-        cached_source = File.join(tmpdir, name)
+        cached_source = File.join(tmpdir, name) + '.dmg'
           curl "-o", cached_source, "-C", "-", "-k", "-L", "-s", "--url", source
           Puppet.debug "Success: curl transfered [#{name}]"

Also available in: Atom PDF