example42 / tinydata

Tiny Data for Tiny Puppet & C.
7 stars 12 forks source link

tp assumes apt-get cache exists #14

Closed logicminds closed 1 year ago

logicminds commented 7 years ago

Expected Behavior

package would install without error

Actual Behavior

root@73f7186c66f8:/# tp install postgresql
Info: Loading facts
Warning: /etc/puppetlabs/code/modules/tp/hiera.yaml: Use of 'hiera.yaml' version 4 is deprecated. It should be converted to version 5
   (in /etc/puppetlabs/code/modules/tp/hiera.yaml)
Warning: Defining "data_provider": "hiera" in metadata.json is deprecated
   (in /etc/puppetlabs/code/modules/tp/metadata.json)
Warning: The function 'hiera_hash' is deprecated in favor of using 'lookup'. See https://docs.puppet.com/puppet/4.10/reference/deprecated_language.html
   (file & line not available)
Notice: Compiled catalog for 73f7186c66f8 in environment production in 0.19 seconds
Info: Applying configuration version '1491606762'
Error: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql
Error: /Stage[main]/Main/Tp::Install[postgresql]/Package[postgresql]/ensure: change from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install postgresql' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package postgresql
Notice: /Stage[main]/Main/Tp::Install[postgresql]/Service[postgresql]: Dependency Package[postgresql] has failures: true
Warning: /Stage[main]/Main/Tp::Install[postgresql]/Service[postgresql]: Skipping because of failed dependencies
Notice: /Stage[main]/Main/Tp::Install[postgresql]/File[/etc/tp/app/postgresql]/ensure: defined content as '{md5}cd3e071cd84b74f77937d611fa77b5c3'
Info: Tp::Install[postgresql]: Unscheduling all events on Tp::Install[postgresql]
Notice: Applied catalog in 1.67 seconds

Steps to Reproduce the Problem

  1. docker run -ti ruby:2.3.1 bash
  2. gem install puppet
  3. mkdir -p /opt/puppetlabs/bin
  4. ln -nfs /usr/local/bin/ruby /opt/puppetlabs/bin/ruby
  5. install tp
  6. tp install postgresql

Reason this happened

Container comes without the apt cache so we need to run apt-get update first in order for puppet to find the postgres package

alvagante commented 1 year ago

If still present, this ticket should be opened on tp repo. Closing