[compute] db packages are getting installed on compute worker nodes

Bug #1448255 reported by Mark Vanderwiel
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack + Chef
Won't Fix
Medium
Unassigned

Bug Description

There a many places in the various common recipes with code like this:

db_type = node['openstack']['db']['compute']['service_type']
node['openstack']['db']['python_packages'][db_type].each do |pkg|
  package pkg do
    options platform_options['package_overrides']
    action :upgrade
  end
end

The packages are defined here: https://github.com/stackforge/cookbook-openstack-common/blob/master/attributes/database.rb#L108

Since database access is not needed on the compute worker node, these database access packages should not be installed there. These common recipes are pulled in by many other recipes such that in most cases, these database access packages are installed.

These are all the place where these database package are getting installed, need to look at each one to understand if this recipe is only for the compute worker node:

cookbook-openstack-bare-metal/recipes/ironic-common.rb
cookbook-openstack-block-storage/recipes/api.rb
cookbook-openstack-block-storage/recipes/scheduler.rb
cookbook-openstack-block-storage/recipes/volume.rb
cookbook-openstack-compute/recipes/nova-common.rb
cookbook-openstack-compute/recipes/nova-setup.rb
cookbook-openstack-dashboard/recipes/horizon.rb
cookbook-openstack-identity/recipes/server.rb
cookbook-openstack-image/recipes/registry.rb
cookbook-openstack-network/recipes/default.rb
cookbook-openstack-orchestration/recipes/common.rb
cookbook-openstack-telemetry/recipes/common.rb

From the role os-compute-worker, these recipes don't need database access:
  openstack-compute::compute
  openstack-bare-metal::conductor

And when ceilometer is used:
  openstack-telemetry::agent-compute

Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

Added Mars and zhiwei to help look at ironic and telemetry, I'll start with compute

Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

Since it appears that the common recipe does many setup items, maybe just placing a role gate on this would do the trick here:

role_match = role_included? 'os-compute-worker'

platform_options['memcache_python_packages'].each do |pkg|
  package pkg do
    options platform_options['package_overrides']
    action :upgrade
    only_if { role_match }
  end
end

Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

I see that the role_included? method in stuck in network libraries, we need to move that to Common to allow access from all cookbooks.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to cookbook-openstack-common (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/177382

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-compute (master)

Fix proposed to branch: master
Review: https://review.openstack.org/177387

Changed in openstack-chef:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-telemetry (master)

Fix proposed to branch: master
Review: https://review.openstack.org/177399

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cookbook-openstack-bare-metal (master)

Fix proposed to branch: master
Review: https://review.openstack.org/177420

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to cookbook-openstack-common (master)

Reviewed: https://review.openstack.org/177382
Committed: https://git.openstack.org/cgit/stackforge/cookbook-openstack-common/commit/?id=348aaf4033f26712ed1d3a08719eb47e8cafb1be
Submitter: Jenkins
Branch: master

commit 348aaf4033f26712ed1d3a08719eb47e8cafb1be
Author: Mark Vanderwiel <email address hidden>
Date: Fri Apr 24 13:52:01 2015 -0500

    Move role and recipe include methods to Common

    These small wrappers are now needed by other cookbooks. They
    provide a easy way to create a clean spec test.
    Will put these into the Common openstack library module namespace
    for easy use across the cookbooks.

    Added common role defintion for compute worker. Eventually all
    the role definitions should be moved here.
    Added new spec for these wrappers.

    Change-Id: If548a9d63a42799e1401b18540878eca5ba2a0e1
    Related-Bug: #1448255

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cookbook-openstack-bare-metal (master)

Change abandoned by Mark Vanderwiel (<email address hidden>) on branch: master
Review: https://review.openstack.org/177420
Reason: Until we settle down the use of ibm-db-alembic package

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cookbook-openstack-compute (master)

Change abandoned by Mark Vanderwiel (<email address hidden>) on branch: master
Review: https://review.openstack.org/177387
Reason: Until we settle down the use of ibm-db-alembic package

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on cookbook-openstack-telemetry (master)

Change abandoned by Mark Vanderwiel (<email address hidden>) on branch: master
Review: https://review.openstack.org/177399
Reason: Until we settle down the use of ibm-db-alembic package

Changed in openstack-chef:
assignee: Mark Vanderwiel (vanderwl) → nobody
Changed in openstack-chef:
milestone: none → liberity-rc1
assignee: nobody → Mark Vanderwiel (vanderwl)
Revision history for this message
Mark Vanderwiel (vanderwl) wrote :

See above abandoned patches for examples on how to take this forward, I'm not going to work on this one anymore.

Changed in openstack-chef:
assignee: Mark Vanderwiel (vanderwl) → nobody
Changed in openstack-chef:
status: In Progress → Confirmed
Revision history for this message
Dr. Jens Harbott (j-harbott) wrote :

Closed as there has been no activity in years. Please create a new bug if this issue still affects you.

Changed in openstack-chef:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.