Foreman-installer not working (Debian Buster)

Installer fails

Installer sets up and configures Foreman and doesn’t error

1.24.2-1 (installer v 1.24.2-1)

Debian Buster (10)

Hi

I’m trying to install Foreman to test and see how it aligns with a goal to replace my very out of date puppet dashboard install.

I’ve tried following the quickstart but the install keeps failing.

I’ve tried to install using the puppet 6 puppetlabs repo as well as the default Debian puppet set up.

When using puppet 6 repo there seems to be a clash with the distros puppet agent.

dpkg: error processing archive /var/cache/apt/archives/puppet_5.5.10-4_all.deb (--unpack):
 trying to overwrite '/lib/systemd/system/puppet.service', which is also in package puppet-agent 6.12.0-1buster
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
 /var/cache/apt/archives/puppet_5.5.10-4_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Foreman installer seems to install puppet-agent (from the new repo) as well as the Debian puppet package. I’ve tried purging the distro puppet package but the installer seems to want to install this.

If I use the default distro puppet package, then the installer breaks trying to install puppetserver which isn’t a Debian specific package.

/Stage[main]/Puppet::Server::Install/Package[puppetserver]/ensure: change from 'purged' to 'present' failed: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install puppetserver' returned 100: Reading package lists...
Building dependency tree...
Reading state information...
E: Unable to locate package puppetserver

Just for fun I tried using the puppetlabs puppet 5 repo, however again, this doesn’t work.

Is there a working combination to get this installed on Buster (ie. older version of installer?)

Thanks in advance!

Could it be that you had the native puppet package installed at the first installer run? The installer is saving its variables, so that would explain that this package is getting installed in the next run. To clean this up, you’d need to purge the puppet and foreman-installer package, perhaps also clean out /etc/foreman-installer and then start over.

Hi mcjoppy,

Did you arrive at a solution for this? A year down the line, and I have the same issue with a fresh Buster installation and a default / OOTB foreman config.

I also note this seems to be a ‘known’ issue back on 2018-07-29: https://tickets.puppetlabs.com/browse/PA-2134.

So, a broader question - is Debian Buster actually a supported platform for a foreman installation? Given the status change for CentOS, Debian would seem to be a candidate as a replacement, which makes a working Buster <-> Foreman combination a more desirable outcome.

Ta


/usr/bin/puppet:5:in `’
/Stage[main]/Puppet::Server::Install/Package[puppetserver]/ensure: change from ‘absent’ to ‘present’ failed: Execution of ‘/usr/bin/apt-get -q -y -o DPkg::Options::=–force-confold install puppetserver’ returned 100: Reading package lists…
Building dependency tree…
Reading state information…
puppetserver is already the newest version (6.14.1-1buster).
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
puppetserver : Depends: puppet-agent (>= 5.5.0) but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
Installing Done [100%] […]
Something went wrong! Check the log for ERROR-level output
The full log is at /var/log/foreman-installer/foreman.log
root@puppetserver:/tmp# apt --fix-broken install
Reading package lists… Done
Building dependency tree
Reading state information… Done
Correcting dependencies… Done
The following additional packages will be installed:
puppet-agent
The following NEW packages will be installed:
puppet-agent
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
17 not fully installed or removed.
Need to get 21.6 MB of archives.
After this operation, 132 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://apt.puppetlabs.com buster/puppet6 amd64 puppet-agent amd64 6.19.1-1buster [21.6 MB]
Fetched 21.6 MB in 9s (2,314 kB/s)
(Reading database … 80311 files and directories currently installed.)
Preparing to unpack …/puppet-agent_6.19.1-1buster_amd64.deb …
Unpacking puppet-agent (6.19.1-1buster) …
dpkg: error processing archive /var/cache/apt/archives/puppet-agent_6.19.1-1buster_amd64.deb (–unpack):
trying to overwrite ‘/lib/systemd/system/puppet.service’, which is also in package puppet 5.5.10-4
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/puppet-agent_6.19.1-1buster_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Note to self:

  • Ensure the version of Debian Buster and the version of Foreman to be installed are both the latest, otherwise this error (and other like it) will occur.

Buster 10.7 + foreman 2.1 is not a compatible combination.

Now to figure out what’s going on with this error (Buster 10.7 + Foreman 2.3.1) when running “foreman-installer -i”:

puppetserver # foreman-installer -i
2020-12-24 09:24:59 [NOTICE] [pre_migrations] Executing hooks in group pre_migrations
2020-12-24 09:24:59 [NOTICE] [pre_migrations] All hooks in group pre_migrations finished
:
:
Ready to start? (y/n)
y

Main Config Menu

  1. [✓] Configure foreman
  2. [✓] Configure foreman_cli
    :
    :
    Choose an option from the menu… 1

Module foreman configuration
Traceback (most recent call last):
17: from /usr/sbin/foreman-installer:8:in <main>' 16: from /usr/lib/ruby/vendor_ruby/kafo/kafo_configure.rb:50:in run’
15: from /usr/lib/ruby/vendor_ruby/clamp/command.rb:132:in run' 14: from /usr/lib/ruby/vendor_ruby/kafo/kafo_configure.rb:169:in run’
13: from /usr/lib/ruby/vendor_ruby/clamp/command.rb:63:in run' 12: from /usr/lib/ruby/vendor_ruby/kafo/kafo_configure.rb:191:in execute’
11: from /usr/lib/ruby/vendor_ruby/kafo/wizard.rb:33:in run' 10: from /usr/lib/ruby/vendor_ruby/kafo/wizard.rb:45:in main_menu’
9: from /usr/lib/ruby/vendor_ruby/highline.rb:366:in choose' 8: from /usr/lib/ruby/vendor_ruby/highline/menu.rb:312:in select’
7: from /usr/lib/ruby/vendor_ruby/kafo/wizard.rb:51:in block (3 levels) in main_menu' 6: from /usr/lib/ruby/vendor_ruby/kafo/wizard.rb:78:in configure_module’
5: from /usr/lib/ruby/vendor_ruby/highline.rb:333:in choose' 4: from /usr/lib/ruby/vendor_ruby/highline.rb:333:in new’
3: from /usr/lib/ruby/vendor_ruby/highline/menu.rb:51:in initialize' 2: from /usr/lib/ruby/vendor_ruby/kafo/wizard.rb:82:in block in configure_module’
1: from /usr/lib/ruby/vendor_ruby/highline.rb:383:in color' /usr/lib/ruby/vendor_ruby/highline/style.rb:33:in Style’: :notice is not a defined Style (NameError)
puppetserver #

I’ve got the same issue here. New Buster 10.7.

Might be related to: Bug #31466: satellite-installer --list-scenarios failed with NamedError - Kafo - Foreman