From 77a62d51ef0b66684ed419895c76a9b19422bbe9 Mon Sep 17 00:00:00 2001 From: Stephan Renatus Date: Fri, 21 Mar 2014 12:09:31 +0100 Subject: [PATCH] Add ceph-common to cinder_ceph_packages The ceph-common packages provides the `ceph` command line client that is needed by cinder for getting the list of currently active MON hosts: https://github.com/openstack/cinder/blob/stable/havana/cinder/volume/drivers/rbd.py#L310 Implements: blueprint rbd-for-block-storage Change-Id: I00c08c26109763923c284e1759527dae911482df --- attributes/default.rb | 6 +++--- spec/volume_spec.rb | 14 +++++++++----- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/attributes/default.rb b/attributes/default.rb index 7e5e0ab..0d2ee98 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -220,7 +220,7 @@ when 'fedora', 'redhat', 'centos' # :pragma-foodcritic: ~FC024 - won't fix this 'cinder_scheduler_service' => 'openstack-cinder-scheduler', 'cinder_iscsitarget_packages' => ['scsi-target-utils'], 'cinder_iscsitarget_service' => 'tgtd', - 'cinder_ceph_packages' => ['python-ceph'], + 'cinder_ceph_packages' => ['python-ceph', 'ceph-common'], 'cinder_nfs_packages' => ['nfs-utils', 'nfs-utils-lib'], 'cinder_emc_packages' => ['pywbem'], 'package_overrides' => '' @@ -240,7 +240,7 @@ when 'suse' 'cinder_scheduler_service' => 'openstack-cinder-scheduler', 'cinder_volume_packages' => ['openstack-cinder-volume'], 'cinder_volume_service' => 'openstack-cinder-volume', - 'cinder_ceph_packages' => ['python-ceph'], + 'cinder_ceph_packages' => ['python-ceph', 'ceph-common'], 'cinder_iscsitarget_packages' => ['tgt'], 'cinder_iscsitarget_service' => 'tgtd', 'cinder_nfs_packages' => ['nfs-utils'], @@ -261,7 +261,7 @@ when 'ubuntu' 'cinder_volume_service' => 'cinder-volume', 'cinder_scheduler_packages' => ['cinder-scheduler'], 'cinder_scheduler_service' => 'cinder-scheduler', - 'cinder_ceph_packages' => ['python-ceph'], + 'cinder_ceph_packages' => ['python-ceph', 'ceph-common'], 'cinder_iscsitarget_packages' => ['tgt'], 'cinder_iscsitarget_service' => 'tgt', 'cinder_nfs_packages' => ['nfs-common'], diff --git a/spec/volume_spec.rb b/spec/volume_spec.rb index c1e7456..9c4b7d4 100644 --- a/spec/volume_spec.rb +++ b/spec/volume_spec.rb @@ -106,11 +106,13 @@ describe 'openstack-block-storage::volume' do expect(@chef_run).to include_recipe('openstack-common::ceph_client') end - it 'installs the python-ceph package by default' do - expect(@chef_run).to install_package('python-ceph') + it 'installs the needed ceph packages by default' do + %w{ python-ceph ceph-common }.each do |pkg| + expect(@chef_run).to install_package(pkg) + end end - it 'honors package option platform overrides for python-ceph' do + it 'honors package option platform overrides for cinder_ceph_packages' do @chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS do |n| n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.rbd.RBDDriver' n.set['openstack']['block-storage']['rbd_secret_name'] = 'rbd_secret_uuid' @@ -118,10 +120,12 @@ describe 'openstack-block-storage::volume' do end @chef_run.converge 'openstack-block-storage::volume' - expect(@chef_run).to install_package('python-ceph').with(options: '--override1 --override2') + %w{ python-ceph ceph-common }.each do |pkg| + expect(@chef_run).to install_package(pkg).with(options: '--override1 --override2') + end end - it 'honors package name platform overrides for python-ceph' do + it 'honors package name platform overrides for cinder_ceph_packages' do @chef_run = ::ChefSpec::Runner.new ::UBUNTU_OPTS do |n| n.set['openstack']['block-storage']['volume']['driver'] = 'cinder.volume.drivers.rbd.RBDDriver' n.set['openstack']['block-storage']['rbd_secret_name'] = 'rbd_secret_uuid'