Problems while upgrading to Pupppet 4

Hello,

I'm trying to upgrade my foreman installation from using Puppet 3 to
Puppet 4.

System: Ubuntu 14.04 LTS with Foreman 1.12 and Puppet 3.

I have upgraded to 1.12 without any noticeable problems.

I'm using the instructions here:
http://projects.theforeman.org/projects/foreman/wiki/Upgrading_from_Puppet_3_to_4

Step 1 seems to work without a problem but step 2 does not work.

After I have ran step 2 without --noop I get a non-working install.
I'm using the install repository from puppet.com but after running
foreman-install it looks like Puppet 4 gets uninstalled and then
reinstalled using Ubuntu-puppet. At least it looks like that when
listing with dpkg --list. It looks like parts of the foreman
installation is also removed, like foreman-installer.

(Luckily I'm able to roll back to a working configuration)

Anyone seen anything like this? Anything I could try to help debug this
problem?

Yours,
Roger

> Hello,
>
> I'm trying to upgrade my foreman installation from using Puppet 3 to
> Puppet 4.
>
> System: Ubuntu 14.04 LTS with Foreman 1.12 and Puppet 3.
>
> I have upgraded to 1.12 without any noticeable problems.
>
> I'm using the instructions here:
> Upgrading from Puppet 3 to 4 - Foreman
>
> Step 1 seems to work without a problem but step 2 does not work.
>
> After I have ran step 2 without --noop I get a non-working install.
> I'm using the install repository from puppet.com but after running
> foreman-install it looks like Puppet 4 gets uninstalled and then
> reinstalled using Ubuntu-puppet. At least it looks like that when
> listing with dpkg --list.

The installer command was missing --reset-puppet-client-package which
should prevent Puppet 3 being reinstalled.

> Anyone seen anything like this? Anything I could try to help debug this
> problem?

I've updated the instructions and run through them again - it seems to
work now. Thanks for the feedback.

··· On 13/07/16 21:42, Roger Mårtensson wrote:


Dominic Cleal
dominic@cleal.org

Thank you. I

I do still get some errors regarding puppetmaster-common. Why it

This is what I get when running:
foreman-installer --puppet-server-implementation=puppetserver
–reset-foreman-client-ssl-ca --reset-foreman-client-ssl-cert
–reset-foreman-client-ssl-key --reset-foreman-puppet-home
–reset-foreman-puppet-ssldir --reset-foreman-server-ssl-ca
–reset-foreman-server-ssl-cert --reset-foreman-server-ssl-chain
–reset-foreman-server-ssl-crl --reset-foreman-server-ssl-key
–reset-foreman-websockets-ssl-cert --reset-foreman-websockets-ssl-key
–reset-foreman-proxy-puppet-ssl-ca
–reset-foreman-proxy-puppet-ssl-cert
–reset-foreman-proxy-puppet-ssl-key --reset-foreman-proxy-puppetdir
–reset-foreman-proxy-ssl-ca --reset-foreman-proxy-ssl-cert
–reset-foreman-proxy-ssl-key --reset-foreman-proxy-ssldir
–reset-foreman-puppet-home --reset-puppet-autosign
–reset-puppet-client-package --reset-puppet-codedir
–reset-puppet-configtimeout --reset-puppet-dir --reset-puppet-logdir
–reset-puppet-rundir --reset-puppet-ssldir --reset-puppet-vardir
–reset-puppet-server-common-modules-path
–reset-puppet-server-default-manifest-path --reset-puppet-server-dir
–reset-puppet-server-envs-dir --reset-puppet-server-external-nodes
–reset-puppet-server-jruby-gem-home
–reset-puppet-server-puppetserver-dir
–reset-puppet-server-ruby-load-paths --reset-puppet-server-ssl-dir -v

[ERROR 2016-07-14 10:59:30 verbose] Execution of '/usr/bin/apt-get -q -y
-o DPkg::Options::=–force-confold install puppetmaster-common' returned
100: Reading package lists…
[ INFO 2016-07-14 10:59:30 verbose] Building dependency tree…
[ INFO 2016-07-14 10:59:30 verbose] Reading state information…
[ INFO 2016-07-14 10:59:30 verbose] Some packages could not be installed.
This may mean that you have
[ INFO 2016-07-14 10:59:30 verbose] requested an impossible situation or if
you are using the unstable
[ INFO 2016-07-14 10:59:30 verbose] distribution that some required
packages have not yet been created
[ INFO 2016-07-14 10:59:30 verbose] or been moved out of Incoming.
[ INFO 2016-07-14 10:59:30 verbose] The following information may help to
resolve the situation:
[ INFO 2016-07-14 10:59:30 verbose]
[ INFO 2016-07-14 10:59:30 verbose] The following packages have unmet
dependencies:
[ INFO 2016-07-14 10:59:30 verbose] puppetmaster-common : Depends:
puppet-common (= 3.4.3-1ubuntu1.1)
[ INFO 2016-07-14 10:59:30 verbose] E: Unable to correct problems, you have
held broken packages.

[ERROR 2016-07-14 10:59:30 verbose]
/Stage[main]/Puppet::Server::Install/Package[puppetmaster-common]/ensure:
change from purged to present failed: Execution of '/usr/bin/apt-get -q -y
-o DPkg::Options::=–force-confold install puppetmaster-common' returned
100: Reading package lists…
[ INFO 2016-07-14 10:59:30 verbose] Building dependency tree…
[ INFO 2016-07-14 10:59:30 verbose] Reading state information…
[ INFO 2016-07-14 10:59:30 verbose] Some packages could not be installed.
This may mean that you have
[ INFO 2016-07-14 10:59:30 verbose] requested an impossible situation or if
you are using the unstable
[ INFO 2016-07-14 10:59:30 verbose] distribution that some required
packages have not yet been created
[ INFO 2016-07-14 10:59:30 verbose] or been moved out of Incoming.
[ INFO 2016-07-14 10:59:30 verbose] The following information may help to
resolve the situation:
[ INFO 2016-07-14 10:59:30 verbose]
[ INFO 2016-07-14 10:59:30 verbose] The following packages have unmet
dependencies:
[ INFO 2016-07-14 10:59:30 verbose] puppetmaster-common : Depends:
puppet-common (= 3.4.3-1ubuntu1.1)
[ INFO 2016-07-14 10:59:30 verbose] E: Unable to correct problems, you have
held broken packages.
[ERROR 2016-07-14 10:59:30 verbose] Execution of '/usr/bin/apt-get -q -y
-o DPkg::Options::=–force-confold install puppetmaster' returned 100:
Reading package lists…
[ INFO 2016-07-14 10:59:30 verbose] Building dependency tree…
[ INFO 2016-07-14 10:59:30 verbose] Reading state information…
[ INFO 2016-07-14 10:59:30 verbose] Some packages could not be installed.
This may mean that you have
[ INFO 2016-07-14 10:59:30 verbose] requested an impossible situation or if
you are using the unstable
[ INFO 2016-07-14 10:59:30 verbose] distribution that some required
packages have not yet been created
[ INFO 2016-07-14 10:59:30 verbose] or been moved out of Incoming.
[ INFO 2016-07-14 10:59:30 verbose] The following information may help to
resolve the situation:
[ INFO 2016-07-14 10:59:30 verbose]
[ INFO 2016-07-14 10:59:30 verbose] The following packages have unmet
dependencies:
[ INFO 2016-07-14 10:59:30 verbose] puppetmaster : Depends:
puppetmaster-common (= 3.4.3-1ubuntu1.1) but it is not going to be installed
[ INFO 2016-07-14 10:59:30 verbose] E: Unable to correct problems, you have
held broken packages.

··· 2016-07-14 9:43 GMT+02:00 Dominic Cleal :

On 13/07/16 21:42, Roger Mårtensson wrote:

Hello,

I’m trying to upgrade my foreman installation from using Puppet 3 to
Puppet 4.

System: Ubuntu 14.04 LTS with Foreman 1.12 and Puppet 3.

I have upgraded to 1.12 without any noticeable problems.

I’m using the instructions here:

Upgrading from Puppet 3 to 4 - Foreman

Step 1 seems to work without a problem but step 2 does not work.

After I have ran step 2 without --noop I get a non-working install.
I’m using the install repository from puppet.com but after running
foreman-install it looks like Puppet 4 gets uninstalled and then
reinstalled using Ubuntu-puppet. At least it looks like that when
listing with dpkg --list.

The installer command was missing --reset-puppet-client-package which
should prevent Puppet 3 being reinstalled.

Anyone seen anything like this? Anything I could try to help debug this
problem?

I’ve updated the instructions and run through them again - it seems to
work now. Thanks for the feedback.


Dominic Cleal
dominic@cleal.org


You received this message because you are subscribed to the Google Groups
"Foreman users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at https://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.

> Thank you. I
>
> I do still get some errors regarding puppetmaster-common. Why it
>
> This is what I get when running:
[…]
>
> [ERROR 2016-07-14 10:59:30 verbose]
> /Stage[main]/Puppet::Server::Install/Package[puppetmaster-common]/ensure: change
> from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o
> DPkg::Options::=–force-confold install puppetmaster-common' returned
> 100: Reading package lists…

I can only think of a couple of reasons it might try to install this
Puppet 3 era package:

  1. The agent is still version 3 - ensure you upgraded (step 1) and are
    using Puppet 4 from puppet-agent.
  2. A parameter's overridden, try adding --reset-puppet-server-package
··· On 14/07/16 10:34, Roger Martensson wrote:


Dominic Cleal
dominic@cleal.org

Thank you again. Suggestion number 2 was the one that worked for me.

When looking at the installed packages (using dpkg --list) I see no
ubuntu-related packages only older Puppet 3 puppetmasterpackages (not
installed, but RC and not purged). I did try to purge the old puppetmaster
packages but the error was still there.

··· 2016-07-14 11:42 GMT+02:00 Dominic Cleal :

On 14/07/16 10:34, Roger Martensson wrote:

Thank you. I

I do still get some errors regarding puppetmaster-common. Why it

This is what I get when running:
[…]

[ERROR 2016-07-14 10:59:30 verbose]

/Stage[main]/Puppet::Server::Install/Package[puppetmaster-common]/ensure:
change

from purged to present failed: Execution of ‘/usr/bin/apt-get -q -y -o
DPkg::Options::=–force-confold install puppetmaster-common’ returned
100: Reading package lists…

I can only think of a couple of reasons it might try to install this
Puppet 3 era package:

  1. The agent is still version 3 - ensure you upgraded (step 1) and are
    using Puppet 4 from puppet-agent.
  2. A parameter’s overridden, try adding --reset-puppet-server-package

Did notice one more thing. The foreman-reports ruby-file didn't seem to be
installed when running foreman-installer. should it?
It was easy to fix but I believe that the foreman-installer used to do this?

https://theforeman.org/manuals/1.12/index.html#3.5.4PuppetReports

··· 2016-07-14 12:53 GMT+02:00 Roger Martensson :

2016-07-14 11:42 GMT+02:00 Dominic Cleal dominic@cleal.org:

On 14/07/16 10:34, Roger Martensson wrote:

Thank you. I

I do still get some errors regarding puppetmaster-common. Why it

This is what I get when running:
[…]

[ERROR 2016-07-14 10:59:30 verbose]

/Stage[main]/Puppet::Server::Install/Package[puppetmaster-common]/ensure:
change

from purged to present failed: Execution of ‘/usr/bin/apt-get -q -y -o
DPkg::Options::=–force-confold install puppetmaster-common’ returned
100: Reading package lists…

I can only think of a couple of reasons it might try to install this
Puppet 3 era package:

  1. The agent is still version 3 - ensure you upgraded (step 1) and are
    using Puppet 4 from puppet-agent.
  2. A parameter’s overridden, try adding --reset-puppet-server-package

Thank you again. Suggestion number 2 was the one that worked for me.

When looking at the installed packages (using dpkg --list) I see no
ubuntu-related packages only older Puppet 3 puppetmasterpackages (not
installed, but RC and not purged). I did try to purge the old puppetmaster
packages but the error was still there.

It still does, it should be installed to
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports/foreman.rb
when using Puppet Server.

··· On 14/07/16 13:05, Roger Martensson wrote: > > > 2016-07-14 12:53 GMT+02:00 Roger Martensson >: > > > 2016-07-14 11:42 GMT+02:00 Dominic Cleal >: > > On 14/07/16 10:34, Roger Martensson wrote: > > Thank you. I > > > > I do still get some errors regarding puppetmaster-common. Why it > > > > This is what I get when running: > [..] > > > > [ERROR 2016-07-14 10:59:30 verbose] > > /Stage[main]/Puppet::Server::Install/Package[puppetmaster-common]/ensure: change > > from purged to present failed: Execution of '/usr/bin/apt-get -q -y -o > > DPkg::Options::=--force-confold install puppetmaster-common' returned > > 100: Reading package lists... > > I can only think of a couple of reasons it might try to install this > Puppet 3 era package: > > 1. The agent is still version 3 - ensure you upgraded (step 1) > and are > using Puppet 4 from puppet-agent. > 2. A parameter's overridden, try adding > --reset-puppet-server-package > > > Thank you again. Suggestion number 2 was the one that worked for me. > > When looking at the installed packages (using dpkg --list) I see no > ubuntu-related packages only older Puppet 3 puppetmasterpackages > (not installed, but RC and not purged). I did try to purge the old > puppetmaster packages but the error was still there. > > > Did notice one more thing. The foreman-reports ruby-file didn't seem to > be installed when running foreman-installer. should it? > It was easy to fix but I believe that the foreman-installer used to do this?


Dominic Cleal
dominic@cleal.org

In my case it didn't get installed at all. I had to manually install it in
the reports directory… Then it started to work again.
(This was after running the "puppet 4-upgrade-foreman-installer)

··· 2016-07-14 14:16 GMT+02:00 Dominic Cleal :

On 14/07/16 13:05, Roger Martensson wrote:

Did notice one more thing. The foreman-reports ruby-file didn’t seem to
be installed when running foreman-installer. should it?
It was easy to fix but I believe that the foreman-installer used to do
this?

It still does, it should be installed to
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports/foreman.rb
when using Puppet Server.

When I upgraded my production environment I noticed that foreman.rb-reports
was inserted. So I guess something wasn't right with my test environment.
What I did notice with both my environments was that I needed to change the
paths found in /etc/sudoers.d/foreman-proxy.

··· 2016-07-14 14:23 GMT+02:00 Roger Martensson :

2016-07-14 14:16 GMT+02:00 Dominic Cleal dominic@cleal.org:

On 14/07/16 13:05, Roger Martensson wrote:

Did notice one more thing. The foreman-reports ruby-file didn’t seem
to
be installed when running foreman-installer. should it?
It was easy to fix but I believe that the foreman-installer used to do
this?

It still does, it should be installed to
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/reports/foreman.rb
when using Puppet Server.

In my case it didn’t get installed at all. I had to manually install it
in the reports directory… Then it started to work again.
(This was after running the "puppet 4-upgrade-foreman-installer)