example42 / puppet-tp

Tiny Puppet - The Universal Installer
http://tiny-puppet.com
Apache License 2.0
68 stars 21 forks source link

tp::install is failing for packages which are not in tiny data #68

Closed findmyname666 closed 5 years ago

findmyname666 commented 5 years ago

I noticed a strange behaviour for tp::install after our puppetserver redeploy -> tp::install started to fail with following error:

Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Error while evaluating a Function Call, pick(): must receive at least one non empty value (file: /etc/puppetlabs/code/modules/tp/manifests/install.pp, line: 201, column: 24)

Digging deeper it's failing on a line 201 in install.pp.

  # Automatic repo management
  $use_upstream_repo = pick($upstream_repo,$settings[upstream_repo])

Reported errors are on TP module version 2.4.0 (latest as of now). Therefore I checked a commit history and this feature/bug was introduced in the latest commit - see here. As work around one needs to store e.g. false into parameter "$upstream_repo".

Expected Behavior

Use tp::install without overriding $upstream_repo.

Actual Behavior

The code is failing as mentioned above.

Steps to Reproduce the Problem

  1. Install package which don't have data in tiny data.
    tp::install { 'dnsutils':
    ensure => latest
    }
  2. Run puppet :)

Puppet version 6.4.2. TP module version 2.4.0.

If you need further info / assistance pls let me know.

alvagante commented 5 years ago

@findmyname666 please try the PR referenced

findmyname666 commented 5 years ago

Hi @alvagante, It works!

Thanks for a quick fix