Bug 1466912 - --upgrade-puppet is broken as installer is trying to ensure puppet-server
--upgrade-puppet is broken as installer is trying to ensure puppet-server
Status: VERIFIED
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Installer (Show other bugs)
6.2.0
Unspecified Unspecified
unspecified Severity medium (vote)
: GA
: --
Assigned To: Eric Helms
Lukas Pramuk
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-06-30 13:44 EDT by Lukas Pramuk
Modified: 2017-09-04 08:07 EDT (History)
2 users (show)

See Also:
Fixed In Version: tfm-rubygem-katello-3.4.5
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Foreman Issue Tracker 18301 None None None 2017-06-30 13:44 EDT

  None (edit)
Description Lukas Pramuk 2017-06-30 13:44:48 EDT
Though I'm upgrading to puppet4 the installer first remove p3 puppet-server and later on tries to ensure that p3 puppet-server package is present.
But that fails as p4 puppet-agent got already installed.
Yet p4 server package is named puppetserver (without dash) 

Steps to reproduce:

<pre>
1. Install katello scenario using puppet3
# foreman-installer -S katello

2. Enable puppet4 repo
# rpm -ivh https://yum.puppetlabs.com/puppetlabs-release-pc1-el-7.noarch.rpm

3. Upgrade puppet using installer
# foreman-installer --upgrade-puppet
...
Upgrade Step: upgrade_puppet_package...

================================================================================
 Package           Arch       Version            Repository                Size
================================================================================
Removing:
 puppet-server     noarch     3.8.7-1.el7        @puppetlabs-products     4.9 k

Transaction Summary
================================================================================
Remove  1 Package

Installed size: 4.9 k
Warning: RPMDB altered outside of yum.

Removed:
  puppet-server.noarch 0:3.8.7-1.el7                                            



================================================================================
 Package                Arch   Version                 Repository          Size
================================================================================
Installing:
 puppet-agent           x86_64 1.8.3-1.el7             puppetlabs-pc1      25 M
     replacing  facter.x86_64 1:2.4.6-1.el7
     replacing  puppet.noarch 3.8.7-1.el7
 puppetserver           noarch 2.7.2-1.el7             puppetlabs-pc1      33 M
Installing for dependencies:
 java-1.8.0-openjdk-headless
                        x86_64 1:1.8.0.121-0.b13.el7_3 rhel-7-server-rpms  31 M

Transaction Summary
================================================================================
Install  2 Packages (+1 Dependent package)
...

Puppet 3 to 4 upgrade initialization complete, continuing with installation
 Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.8.7-1.el7.noarch is obsoleted by puppet-agent-1.8.3-1.el7.x86_64 which is already installed
 Package: puppet-server-3.8.7-1.el7.noarch (puppetlabs-products)
           Requires: puppet = 3.8.7-1.el7
           Installed: puppet-agent-1.8.3-1.el7.x86_64 (@puppetlabs-pc1)
               puppet >= 4.0.0-1.el7
...
 /Stage[main]/Puppet::Server::Install/Package[puppet-server]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.8.7-1.el7.noarch is obsoleted by puppet-agent-1.8.3-1.el7.x86_64 which is already installed

</pre>
Comment 1 Lukas Pramuk 2017-06-30 13:44:53 EDT
Created from redmine issue http://projects.theforeman.org/issues/18301
Comment 3 pm-sat@redhat.com 2017-06-30 14:02:00 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18301 has been resolved.
Comment 4 Lukas Pramuk 2017-06-30 14:04:23 EDT
Downstream traceback is:

# satellite-installer --upgrade-puppet
...
Puppet 3 to 4 upgrade initialization complete, continuing with installation
 Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.8.6-2.el7sat.noarch is obsoleted by puppet-agent-1.8.2-2.el7sat.x86_64 which is already installed
 Package: puppet-server-3.8.6-2.el7sat.noarch (satellite)
           Requires: puppet = 3.8.6-2.el7sat
           Installed: puppet-agent-1.8.2-2.el7sat.x86_64 (@puppet4_internal)
               puppet >= 4.0.0-2.el7sat
           Available: puppet-3.8.6-2.el7sat.noarch (satellite)
               puppet = 3.8.6-2.el7sat
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:232:in `execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider.rb:101:in `execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb:196:in `install'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb:88:in `block (3 levels) in <module:Puppet>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:487:in `set'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:561:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:80:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:230:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:246:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.0.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Puppet::Server::Install/Package[puppet-server]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.8.6-2.el7sat.noarch is obsoleted by puppet-agent-1.8.2-2.el7sat.x86_64 which is already installed
 Package: puppet-server-3.8.6-2.el7sat.noarch (satellite)
           Requires: puppet = 3.8.6-2.el7sat
           Installed: puppet-agent-1.8.2-2.el7sat.x86_64 (@puppet4_internal)
               puppet >= 4.0.0-2.el7sat
           Available: puppet-3.8.6-2.el7sat.noarch (satellite)
               puppet = 3.8.6-2.el7sat
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Installing             Done                                               [100%] [.....................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/satellite.log

# rpm -qa puppet*
puppet-agent-1.8.2-2.el7sat.x86_64
puppetserver-2.7.2-2.el7sat.noarch
puppet-agent-oauth-0.5.1-3.el7.noarch

>>> though all p4 rpms are installed the installer still believes it's a p3 installation
Comment 5 pm-sat@redhat.com 2017-08-03 18:02:32 EDT
Upstream bug assigned to ehelms@redhat.com
Comment 6 pm-sat@redhat.com 2017-08-03 18:02:34 EDT
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/18301 has been resolved.
Comment 7 Lukas Pramuk 2017-08-09 07:52:43 EDT
FailedQA.

@satellite-6.3.0-16.0.beta.el7sat.noarch
puppet-agent-1.8.2-2.el7sat.x86_64
puppetserver-2.7.2-2.el7sat.noarch
katello-installer-base-3.4.4-1.el7sat.noarch


The original reproducer is fixed:
1. # satellite-installer --upgrade-puppet

However, the issue (trying to ensure p3 server is present) persists upon next installer run(s):
1. # satellite-installer --upgrade-puppet

2. # satellite-installer
 satellite-installer
 Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.8.6-4.el7sat.noarch is obsoleted by puppet-agent-1.8.2-2.el7sat.x86_64 which is already installed
 Package: puppet-server-3.8.6-4.el7sat.noarch (satellite)
           Requires: puppet = 3.8.6-4.el7sat
           Installed: puppet-agent-1.8.2-2.el7sat.x86_64 (@puppet4_repo)
               puppet >= 4.0.0-2.el7sat
           Available: puppet-3.8.6-4.el7sat.noarch (satellite)
               puppet = 3.8.6-4.el7sat
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/execution.rb:232:in `execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider.rb:101:in `execute'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/provider/package/yum.rb:196:in `install'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/type/package.rb:88:in `block (3 levels) in <module:Puppet>'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:487:in `set'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/property.rb:561:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:236:in `sync'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:134:in `sync_if_needed'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:80:in `perform_changes'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/resource_harness.rb:21:in `evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:230:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:246:in `eval_resource'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `call'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block (2 levels) in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:386:in `block in thinmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:385:in `thinmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:163:in `block in evaluate'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/graph/relationship_graph.rb:118:in `traverse'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction.rb:154:in `evaluate'
/usr/share/gems/gems/kafo-2.0.0/modules/kafo_configure/lib/puppet/parser/functions/add_progress.rb:30:in `evaluate_with_trigger'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:222:in `block in apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/log.rb:155:in `with_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/transaction/report.rb:142:in `as_logging_destination'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/resource/catalog.rb:221:in `apply'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:171:in `block in apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:223:in `block in benchmark'
/opt/puppetlabs/puppet/lib/ruby/2.1.0/benchmark.rb:294:in `realtime'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:222:in `benchmark'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:170:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:343:in `run_internal'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:221:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/configurer.rb:195:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:350:in `apply_catalog'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:274:in `block in main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/context.rb:65:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet.rb:241:in `override'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:225:in `main'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application/apply.rb:170:in `run_command'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `block in run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util.rb:540:in `exit_on_fail'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/application.rb:344:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:132:in `run'
/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/puppet/util/command_line.rb:72:in `execute'
/opt/puppetlabs/puppet/bin/puppet:5:in `<main>'
 /Stage[main]/Puppet::Server::Install/Package[puppet-server]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install puppet-server' returned 1: Package puppet-3.8.6-4.el7sat.noarch is obsoleted by puppet-agent-1.8.2-2.el7sat.x86_64 which is already installed
 Package: puppet-server-3.8.6-4.el7sat.noarch (satellite)
           Requires: puppet = 3.8.6-4.el7sat
           Installed: puppet-agent-1.8.2-2.el7sat.x86_64 (@puppet4_repo)
               puppet >= 4.0.0-2.el7sat
           Available: puppet-3.8.6-4.el7sat.noarch (satellite)
               puppet = 3.8.6-4.el7sat
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Installing             Done                                               [100%] [.....................................]
  Something went wrong! Check the log for ERROR-level output
  The full log is at /var/log/foreman-installer/satellite.log

>>> so we need either to reset puppet params every installer run or to fix it another way
Comment 8 Eric Helms 2017-08-09 21:08:19 EDT
I cannot seem to reproduce your error. Can you please enumerate your full list of steps from installation, yum actions, installer actions, up until the error?
Comment 9 Lukas Pramuk 2017-08-10 12:43:53 EDT
Reproducer steps:

1. Install p3 Satellite (no need to setup internal capsule)
# satellite-installer -S satellite

2. Enable internal p4 repo
baseurl=http://.../pulp/repos/Sat6-CI/Library/custom/Satellite_Puppet_4_6_3_Composes/Satellite_Puppet_4_6_3_RHEL7_x86_64/

3. Upgrade to p4 using installer
# satellite-installer --upgrade-puppet

> this was fixed

4. Next installer run(s) are failing
# satellite-installer

> this still needs to be fixed
Comment 11 Lukas Pramuk 2017-09-04 08:04:22 EDT
VERIFIED.

1. Enable puppet4 repo

2. Upgrade puppet version
# satellite-installer --upgrade-puppet
Upgrading puppet...
...
Upgrade Step: upgrade_puppet_package...
...
Upgrade Step: stop_services...
...
Upgrade Step: copy_data...
...
Upgrade Step: remove_puppet_port_httpd...
...
Upgrade Step: start_httpd...
...
Puppet 3 to 4 upgrade initialization complete, continuing with installation
Resetting puppet params...
Puppet 3 to 4 upgrade param reset, continuing with installation
Installing             Done                                               [100%] [.....................................]
  Success!
  * Katello is running at https://<SATFQDN>
  * To install an additional Foreman proxy on separate machine continue by running:

      foreman-proxy-certs-generate --foreman-proxy-fqdn "$FOREMAN_PROXY" --certs-tar "/root/$FOREMAN_PROXY-certs.tar"

  The full log is at /var/log/foreman-installer/satellite.log
Upgrade Step: restart_services...
...

# exec bash
# puppet -V
4.8.1

>>> with --upgrade-puppet option the installer successfully upgraded puppet version
Comment 12 Lukas Pramuk 2017-09-04 08:07:53 EDT
@satellite-6.3.0-17.0.beta.el7sat.noarch
katello-installer-base-3.4.5-1.el7sat.noarch
puppet-agent-1.8.2-2.el7sat.x86_64
puppetserver-2.7.2-2.el7sat.noarch

Note You need to log in before you can comment on or make changes to this bug.