Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-3093

PMT upgrade fails if installed version has invalid semver

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Won't Fix
    • Affects Version/s: PUP 3.6.2
    • Fix Version/s: None
    • Component/s: PMT
    • Labels:
      None
    • Template:

      Description

      If an installed version of a module contains an invalid semver, upgrading to a version with a valid semver fails with the following error:

      qw9dvmp4zgwz3qf 13:46:39$ env PATH="/usr/bin:/opt/puppet-git-repos/hiera/bin:${PATH}" RUBYLIB="/opt/puppet-git-repos/hiera/lib:/opt/puppet-git-repos/hiera-p
      uppet/lib:${RUBYLIB}" puppet module upgrade pmtacceptance-java                                                                                             Notice: Preparing to upgrade 'pmtacceptance-java' ...
      Warning: java (/etc/puppet/modules/java) has an invalid version number (hello.world). The version has been set to 0.0.0. If you are the maintainer for this 
      module, please update the metadata.json with a valid Semantic Version (http://semver.org).
      Error: Version numbers MUST begin with three dot-separated numbers
      /usr/lib/ruby/site_ruby/1.8/puppet/vendor/semantic/lib/semantic/version.rb:29:in `parse'
      /usr/lib/ruby/site_ruby/1.8/puppet/module_tool/applications/upgrader.rb:69:in `run'
      /usr/lib/ruby/site_ruby/1.8/puppet/face/module/upgrade.rb:68:in `upgrade implementation, required on Ruby 1.8'
      /usr/lib/ruby/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:242:in `__send__'
      /usr/lib/ruby/site_ruby/1.8/puppet/interface/action.rb+eval[wrapper]:242:in `upgrade'
      /usr/lib/ruby/site_ruby/1.8/puppet/application/face_base.rb:229:in `send'
      /usr/lib/ruby/site_ruby/1.8/puppet/application/face_base.rb:229:in `main'
      /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:392:in `run_command'
      /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:384:in `run'
      /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:510:in `plugin_hook'
      /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:384:in `run'
      /usr/lib/ruby/site_ruby/1.8/puppet/util.rb:479:in `exit_on_fail'
      /usr/lib/ruby/site_ruby/1.8/puppet/application.rb:384:in `run'
      /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:146:in `run'
      /usr/lib/ruby/site_ruby/1.8/puppet/util/command_line.rb:92:in `execute'
      /usr/bin/puppet:8
       
      qw9dvmp4zgwz3qf executed in 0.75 seconds
      Exited: 1                                
      

      See: https://tickets.puppetlabs.com/browse/PUP-2752?focusedCommentId=90779&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-90779

      Expected results:
      1. The upgrade command sets the invalid semver to 0.0.0, as it currently does.
      2. The upgrade should be successful.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              john.duarte John Duarte
              QA Contact:
              John Duarte
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Zendesk Support