Issue #19906 has been updated by Sebastiaan van S. Status changed from Investigating to In Topic Branch Pending Review Branch set to https://github.com/puppetlabs/puppet/pull/1764
Created PR for this, I believe this is just a wrong description in the error. The real reason is already there in the multiline, the oneline is just wrong. I'll let the devs decide. ---------------------------------------- Bug #19906: Wrong error from "upgrade" with JSON output when module already installed https://projects.puppetlabs.com/issues/19906#change-94599 * Author: Michael Hrivnak * Status: In Topic Branch Pending Review * Priority: Normal * Assignee: Sebastiaan van S * Category: module tool * Target version: * Affected Puppet version: 2.7.21 * Keywords: * Branch: https://github.com/puppetlabs/puppet/pull/1764 ---------------------------------------- When a module is already installed and "puppet module upgrade" is called on it with JSON rendering, there are conflicting error messages. The "multiline" error correctly reports the error, but the "oneline" message incorrectly states that the module is not installed. Example: <pre> $ puppet module upgrade puppetlabs-stdlib --render-as json notice: Preparing to upgrade 'puppetlabs-stdlib' ... notice: Found 'puppetlabs-stdlib' (v3.2.0) in /home/mhrivnak/.puppet/modules ... notice: Downloading from http://forge.puppetlabs.com ... {"module_name":"puppetlabs-stdlib","installed_version":"v3.2.0","requested_version":"latest","result":"noop","error":{"oneline":"Could not upgrade 'puppetlabs-stdlib'; module is not installed","multiline":"Could not upgrade module 'puppetlabs-stdlib' (v3.2.0 -> latest: v3.2.0)\n The installed version is already the latest version\n Use `puppet module install --force` to re-install this module"}} </pre> Pretty-printed JSON for your convenience: <pre> { "error": { "multiline": "Could not upgrade module puppetlabs-stdlib (v3.2.0 -> latest: v3.2.0)\n The installed version is already the latest version\n Use `puppet module install --force` to re-install this module", "oneline": "Could not upgrade puppetlabs-stdlib; module is not installed" }, "installed_version": "v3.2.0", "module_name": "puppetlabs-stdlib", "requested_version": "latest", "result": "noop" } </pre> -- You have received this notification because you have either subscribed to it, or are involved in it. To change your notification preferences, please click here: http://projects.puppetlabs.com/my/account -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
