{"record":{"id":"140c94f207df7950","repo":"puppetlabs/puppet","slug":"no-disk-entities-returned-by-mount-at-path","errorCode":null,"errorMessage":"No disk entities returned by mount at %{path}","messagePattern":"No disk entities returned by mount at %(.+?)","errorType":"exception","errorClass":"Puppet::Error","httpStatus":null,"severity":"error","filePath":"lib/puppet/provider/package/pkgdmg.rb","lineNumber":110,"sourceCode":"          args << \"--proxy\" << \"#{http_proxy_host}:#{http_proxy_port}\"\n        elsif http_proxy_host and !http_proxy_port\n          args << \"--proxy\" << http_proxy_host\n        end\n        begin\n          curl(*args)\n          Puppet.debug \"Success: curl transferred [#{name}] (via: curl #{args.join(' ')})\"\n        rescue Puppet::ExecutionFailure\n          Puppet.debug \"curl #{args.join(' ')} did not transfer [#{name}].  Falling back to local file.\" # This used to fall back to open-uri. -NF\n          cached_source = source\n        end\n      end\n\n      if source =~ /\\.dmg$/i\n        # If you fix this to use open-uri again, you must update the docs above. -NF\n        File.open(cached_source) do |dmg|\n          xml_str = hdiutil \"mount\", \"-plist\", \"-nobrowse\", \"-readonly\", \"-mountrandom\", \"/tmp\", dmg.path\n          hdiutil_info = Puppet::Util::Plist.parse_plist(xml_str)\n          raise Puppet::Error, _(\"No disk entities returned by mount at %{path}\") % { path: dmg.path } unless hdiutil_info.has_key?(\"system-entities\")\n\n          mounts = hdiutil_info[\"system-entities\"].filter_map { |entity|\n            entity[\"mount-point\"]\n          }\n          begin\n            mounts.each do |mountpoint|\n              Dir.entries(mountpoint).select { |f|\n                f =~ /\\.m{0,1}pkg$/i\n              }.each do |pkg|\n                installpkg(\"#{mountpoint}/#{pkg}\", name, source)\n              end\n            end\n          ensure\n            mounts.each do |mountpoint|\n              hdiutil \"eject\", mountpoint\n            end\n          end\n        end","sourceCodeStart":92,"sourceCodeEnd":128,"githubUrl":"https://github.com/puppetlabs/puppet/blob/e227c27540975c25aa22d533a52424a9d2fc886a/lib/puppet/provider/package/pkgdmg.rb#L92-L128","documentation":"Raised in `installpkgdmg` (lib/puppet/provider/package/pkgdmg.rb:110) after `hdiutil mount -plist` on a downloaded .dmg. Puppet parses the returned plist and requires a `system-entities` key enumerating mounted volumes; its absence means the mount effectively failed (hdiutil still exited 0 with a minimal plist), so Puppet raises instead of installing from nothing.","triggerScenarios":"Corrupt or truncated .dmg (partial download, or the curl-fallback path writing an HTML error page to disk), an unsupported/encrypted image format, DiskArbitration being unusable in the run context (some CI/SSH sessions).","commonSituations":"A proxy or captive portal mangling the download; artifact cut off mid-transfer; DMGs created with options this hdiutil cannot attach; headless runners lacking a mount context.","solutions":["Download the same URL with curl on the node and run `hdiutil verify <file>.dmg` to confirm integrity.","Run `hdiutil mount -plist -nobrowse -readonly -mountrandom /tmp <file>.dmg` by hand and inspect the plist for system-entities.","Fix the serving side: correct checksum/length, no intercepting proxy, resumable URL.","Rebuild the DMG with standard options (UDZO) if it was produced by unusual tooling."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"# Verify the dmg mounts cleanly before Puppet touches it\ncurl -fsSLo /tmp/check.dmg \"$SOURCE_URL\" && hdiutil verify /tmp/check.dmg >/dev/null && hdiutil mount -plist -nobrowse -readonly -mountrandom /tmp /tmp/check.dmg | grep -q system-entities && echo OK || echo \"dmg unusable\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Serve dmgs with correct Content-Length and checksums; verify with `hdiutil verify` in CI.","Ensure the node's curl honors the proxy (the provider falls back to the raw file on curl failure).","Build DMGs with standard UDZO options."],"tags":["macos","hdiutil","dmg","mount","plist","disk-image"],"backgroundTag":"disk-mount-failed","analyzedSha":"e227c27540975c25aa22d533a52424a9d2fc886a","analyzedAt":"2026-08-21T20:49:46.650Z","schemaVersion":2},"datasetVersion":"2026-08-21T23:17:16.201Z"}