Closed Bug 1344720 Opened 7 years ago Closed 7 years ago

Puppet failed to install on Ubuntu 16.04

Categories

(Infrastructure & Operations :: RelOps: Puppet, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dragrom, Assigned: dividehex)

References

Details

Attachments

(2 files)

I opened this bug to investigate if really we need to mirror puppetlab repository for xenial distribution...
Assignee: relops → dcrisan
Tested on local Ubuntu16 local machine. I run the command `sudo apt-get install -y --allow-unauthenticated puppet-common=3.8.5-2 puppet=3.8.5-2` without error and without add puppetlab repository into sources.list file
Status: NEW → ASSIGNED
I don't think we need to mirror the puppet labs repo.  As it is, the puppetlabs repo has moved to a layout they call puppetcollections (PC1).  I've tested the puppetlabs xenial mirrors and they only start with puppet 4.x. This doesn't help us since we use version 3.7. The version of puppet within the ubuntu universe mirror is 3.8.5-2 and I've tested it, it works.  And as far as I can tell, it is being installed properly during the kickstart process.  What is not working is the machine being puppetized.
Here are a list of things that is preventing puppetize.sh from executing successfully.

systemd starts up the puppet agent as a daemon.  We have dealt with this before since the installer likes to start services after they have been installed.  In this case, we will need to stop and disable the service after the package is installed.

/etc/rc.local may not be executing.  I noticed an error about it and systemd flash on the screen if you switch over to tty5 during the %post script exec.  It happened too fast to get a good look but all indications is that once kickstart had rebooted and the system comes up for the first time, it doesn't even bother to exec puppetize.sh which is evident from the lack of a /root/puppetize.log file

Ubuntu 16.04 @minimal is just that (more so than 12.04 and 14.04).  It looks like the host is missing some dependencies used by the puppetize.sh script.  Such as ntpdate and python.  These will need to be installed during the kickstart process.

Once those packages were in place, I was able to manually run puppetize.sh and get some certificates in place like usual but executing puppet by hand threw a new error. "Notice: Skipping run of puppet configuration client; administratively disabled"

I had to enable it with 'puppet agent --enable'
This fixes up most of the issues preventing puppetization
Assignee: dcrisan → jwatkins
(In reply to Jake Watkins [:dividehex] from comment #3)
> Here are a list of things that is preventing puppetize.sh from executing
> successfully.
> 
> systemd starts up the puppet agent as a daemon.  We have dealt with this
> before since the installer likes to start services after they have been
> installed.  In this case, we will need to stop and disable the service after
> the package is installed.

Previously, kickstart would call service stop on puppet.  Now that we are dealing with systemd, this should be 'systemctl stop puppet; systemctl disable puppet'

> /etc/rc.local may not be executing.  I noticed an error about it and systemd
> flash on the screen if you switch over to tty5 during the %post script exec.
> It happened too fast to get a good look but all indications is that once
> kickstart had rebooted and the system comes up for the first time, it
> doesn't even bother to exec puppetize.sh which is evident from the lack of a
> /root/puppetize.log file

Systemd does have a rc-local.service set and enabled to run rc.local but it does require the file to be shebanged (#!/bin/bash)

> Ubuntu 16.04 @minimal is just that (more so than 12.04 and 14.04).  It looks
> like the host is missing some dependencies used by the puppetize.sh script. 
> Such as ntpdate and python.  These will need to be installed during the
> kickstart process.

Just needed to add ntpdate and python2.7 to be installed the same time as puppet
As noted in the comments, Ubuntu 16.04 ships with the file locks in place to prevent a puppet run without configuration.  It must be explicitly cleared before running our first puppet agent command from the puppetize.sh script.
'--enable' also causes puppet to exit immediately so we run it once before our actually puppet run.
Attachment #8851056 - Flags: review?(dhouse)
Attachment #8851056 - Flags: review?(dhouse) → review+
Kickstarting for Ubuntu 16.04 is now working!
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Blocks: 1366828
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: