Issue #19906 has been reported by Michael Hrivnak. ---------------------------------------- Bug #19906: Wrong error from "upgrade" with JSON output when module already installed https://projects.puppetlabs.com/issues/19906
* Author: Michael Hrivnak * Status: Unreviewed * Priority: Normal * Assignee: * Category: module tool * Target version: * Affected Puppet version: 2.7.21 * Keywords: * Branch: ---------------------------------------- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
