Project

General

Profile

Actions

Bug #18548

closed

Puppet upgrade from 3 to 4: foreman-installer --upgrade-puppet fails on cp of ssl files

Added by Lachlan Simpson about 7 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

Description

On CentOS 7.3, Katello 3.2.2, Foreman 1.13.4, when following the official instructions there are two fail points in the upgrade code.

1. On self hosted system, the process goes looking for puppet-agent, puppetserver and java 1.8.0 via http to a service which the process has turned off.

Note that enabling the official puppet repos isn't sufficient for this process to work - one must also pass the --disablerepo= with all local repos

2. Once these three packages are installed, there is an issue with the copying of:

/var/lib/puppet/ssl to /etc/puppetlabs/puppet

and

/var/lib/puppet/foreman_cache_data to /opt/puppetlabs/puppet/cache/

the errors are:

[ERROR 2017-02-17 13:44:48 main] mv: cannot move ‘/var/lib/puppet/ssl’ to ‘/etc/puppetlabs/puppet/ssl’: File exists
[ERROR 2017-02-17 13:44:48 main] mv: cannot move ‘/var/lib/puppet/foreman_cache_data’ to ‘/opt/puppetlabs/puppet/cache/foreman_cache_data’: File exists
[ERROR 2017-02-17 13:44:48 main] Upgrade step copy_data failed. Check logs for more information.

deleting the directories /etc/puppetlabs/puppet/ssl and /opt/puppetlabs/puppet/cache/foreman_cache_data is insufficient - it would seem that they are recreated at some other point in the process because repeated attempts will fail.

Performing these two steps manually, and commenting out lines 21 and 22 in

/usr/share/katello-installer-base/hooks/pre/31-upgrade-puppet.rb

success << Kafo::Helpers.execute('mv /var/lib/puppet/ssl /etc/puppetlabs/puppet') if File.directory?('/var/lib/puppet/ssl')
success << Kafo::Helpers.execute('mv /var/lib/puppet/foreman_cache_data /opt/puppetlabs/puppet/cache/') if File.directory?('/var/lib/puppet/foreman_cache_data')

makes the process complete successfully.


Related issues 2 (0 open2 closed)

Has duplicate Katello - Bug #18653: Puppet 4 upgrade errors if /etc/puppet/environments is emptyDuplicateEric Helms02/23/2017Actions
Has duplicate Katello - Bug #17370: Use copy instead of move in puppet upgrade hookDuplicate11/16/2016Actions
Actions #1

Updated by Justin Sherrill about 7 years ago

  • translation missing: en.field_release set to 219
Actions #2

Updated by Justin Sherrill about 7 years ago

  • Assignee set to Eric Helms
Actions #3

Updated by Eric Helms about 7 years ago

  • Has duplicate Bug #18653: Puppet 4 upgrade errors if /etc/puppet/environments is empty added
Actions #4

Updated by Eric Helms about 7 years ago

  • Has duplicate Bug #17370: Use copy instead of move in puppet upgrade hook added
Actions #5

Updated by The Foreman Bot about 7 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/Katello/katello-installer/pull/484 added
Actions #6

Updated by Eric Helms about 7 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF