Bug 927466

Summary: Error message when trying to upgrade with puppet update when the latest is installed is misleading
Product: [Retired] Pulp Reporter: Preethi Thomas <pthomas>
Component: puppet-supportAssignee: pulp-bugs
Status: CLOSED UPSTREAM QA Contact: Preethi Thomas <pthomas>
Severity: unspecified Docs Contact:
Priority: low    
Version: 2.1 BetaCC: jason.dobies, ohadlevy
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-28 21:54:37 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1014001    
Bug Blocks:    

Description Preethi Thomas 2013-03-26 01:49:01 UTC
Description of problem:

Error message indicates that the module is not installed, when trying to update puppet module and you have the latest installed



[root@cloud-qe-8 ~]# pulp-admin  puppet consumer install run --consumer-id el5-consumer -u puppetlabs/stdlib/
This command may be exited via ctrl+c without affecting the request.

[\]
1 change was made

Install Succeeded

[root@cloud-qe-8 ~]# pulp-admin  puppet consumer update run --consumer-id el5-consumer -u puppetlabs/stdlib/
Update task created with id [ a17fef59-1c1b-4e24-95f2-d24ff927a4c3 ]

This command may be exited via ctrl+c without affecting the request.

[\]
Could not upgrade 'puppetlabs-stdlib'; module is not installed

Operation executed, but no changes were made.


[root@mgmt3 ~]# puppet module list
/etc/puppet/modules
└── puppetlabs-stdlib (v3.2.0)
/usr/share/puppet/modules (no modules installed)
[root@mgmt3 ~]# 


Version-Release number of selected component (if applicable):
[root@cloud-qe-8 ~]# rpm -q pulp-server
pulp-server-2.1.0-0.26.beta.noarch
[root@cloud-qe-8 ~]# 


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Michael Hrivnak 2013-03-26 12:52:22 UTC
Looks like this is an error in the puppet tool from upstream. I have filed a bug with them:

http://projects.puppetlabs.com/issues/19906


$ puppet module upgrade puppetlabs-stdlib --render-as json
/usr/share/rubygems/rubygems/custom_require.rb:36:in `require': iconv will be deprecated in the future, use String#encode instead.
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"}}

Didn't enjoy reading that? Let me pretty-print the json for you...

{
    "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"
}

Note the difference between the "multiline" vs. "oneline" error messages.

Comment 2 Jay Dobies 2013-04-01 13:16:58 UTC
Not entirely sure how to handle this. I'll align it to 2.2 so we check on it again next month, otherwise I'll just keep sliding it out so we keep an eye on their bug.

Comment 3 Michael Hrivnak 2013-11-04 13:58:39 UTC
Looks like this should be fixed in puppet 3.3, and as such is blocked by #1014001

Comment 4 Brian Bouterse 2015-02-28 21:54:37 UTC
Moved to https://pulp.plan.io/issues/346