Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to install older version if EPEL present #258

Closed
tapsboy opened this issue Nov 8, 2016 · 3 comments
Closed

Unable to install older version if EPEL present #258

tapsboy opened this issue Nov 8, 2016 · 3 comments

Comments

@tapsboy
Copy link
Contributor

tapsboy commented Nov 8, 2016

EPEL recently updated the current node version available there. More info here (https://fedoramagazine.org/node-js-6-x-lts-coming-epel-7/)

As a result, when puppet runs /bin/yum -d 0 -e 0 -y install nodejs, it installs the one available in EPEL and not the one requested by the module. This wasn't a problem earlier as EPEL was on 0.10.

Affected Puppet, Ruby, OS and module versions/distributions

  • Puppet: 3.7
  • Ruby: All
  • Distribution: EL Family
  • Module version: Current

How to reproduce (e.g Puppet code you use)

  class { 'nodejs':
    repo_url_suffix => '0.10'
  } 

Or

  class { 'nodejs':
    repo_url_suffix => '4.x'
  } 

What are you seeing

It always installs latest version from v6 branch

What behaviour did you expect instead

The version specified, while requiring the nodejs class

Any additional information you'd like to impart

I believe this is happening because the module doesn't specify the source or exact version to be picked up in the install.pp

  # nodejs
  package { $nodejs::nodejs_package_name:
    ensure => $nodejs::nodejs_package_ensure,
    tag    => 'nodesource_repo',
  }
@tapsboy
Copy link
Contributor Author

tapsboy commented Nov 8, 2016

For now, I have been able to do the following:

  class { 'nodejs':
    repo_url_suffix => '0.10',
    nodejs_package_ensure => "0.10.*",
  } 

and

  class { 'nodejs':
    repo_url_suffix => '4,x',
    nodejs_package_ensure => "4.*",
  } 

@gigi-at-zymergen
Copy link

I had nodes that were running a really old version (0.10 ), which I was trying to upgrade to 6.x and had only specified the repo_url_suffix based on the module README.md . This worked great on test nodes that had no previous install, however it skipped the install on the nodes that had an old version. @tapsboy solution worked great for me, but took a little digging to find it. The nodejs_package_ensure parameter is listed in the README.md, but might be good to emphasize that it defaults to present and specifying a repo_url_suffix is not sufficient to ensure a specific major version.

@juniorsysadmin juniorsysadmin added the bug Something isn't working label Dec 25, 2016
@juniorsysadmin juniorsysadmin removed the bug Something isn't working label Sep 24, 2017
@juniorsysadmin
Copy link
Member

#322

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants