Drop poise-python in favor of directly installing python packages
The poise-python cookbook is no longer maintained by the upstream maintainer and is causing lots of issues for the testing pipeline. Originally we needed this to install a newer openstack-client via pip, but we no longer do that. The one exception is in the integration cookbook which I'll be pushing a change for that as well. In order to do this, we need to include EPEL on RHEL which doesn't seem to have any current dependency issues so I think it's safe to bring back. Depends-On: https://review.opendev.org/665493 Change-Id: Ic8ddf736193a6a7cea5372f2fd09e2def3634333 Signed-off-by: Lance Albertson <lance@osuosl.org>
This commit is contained in:
parent
bf04e80682
commit
16441178af
@ -292,11 +292,27 @@ case node['platform_family']
|
||||
when 'rhel'
|
||||
default['openstack']['common']['platform'] = {
|
||||
'common_client_packages' => ['python-openstackclient'],
|
||||
'python2_packages' => [
|
||||
'python',
|
||||
'python2-pip',
|
||||
'python2-setuptools',
|
||||
'python-devel',
|
||||
'python-virtualenv',
|
||||
'python-wheel',
|
||||
],
|
||||
'package_overrides' => '',
|
||||
}
|
||||
when 'debian'
|
||||
default['openstack']['common']['platform'] = {
|
||||
'common_client_packages' => ['python-openstackclient'],
|
||||
'python2_packages' => [
|
||||
'python',
|
||||
'python-dev',
|
||||
'python-pip',
|
||||
'python-setuptools',
|
||||
'python-virtualenv',
|
||||
'python-wheel',
|
||||
],
|
||||
'package_overrides' => '',
|
||||
}
|
||||
end
|
||||
|
@ -18,8 +18,8 @@ depends 'etcd', '~> 5.5'
|
||||
depends 'mariadb', '~> 1.5'
|
||||
depends 'memcached', '~> 4.1'
|
||||
depends 'mysql', '~> 8.2'
|
||||
depends 'poise-python', '~> 1.7'
|
||||
depends 'selinux'
|
||||
depends 'yum-epel'
|
||||
|
||||
issues_url 'https://launchpad.net/openstack-chef' if respond_to?(:issues_url)
|
||||
source_url 'https://github.com/openstack/cookbook-openstack-common' if respond_to?(:source_url)
|
||||
|
@ -73,6 +73,8 @@ when 'debian'
|
||||
end
|
||||
|
||||
when 'rhel'
|
||||
include_recipe 'yum-epel'
|
||||
|
||||
repo_action = if node['openstack']['yum']['rdo_enabled']
|
||||
:add
|
||||
elsif FileTest.exist? "/etc/yum.repos.d/RDO-#{node['openstack']['release']}.repo"
|
||||
@ -121,13 +123,9 @@ when 'rhel'
|
||||
end
|
||||
|
||||
# install a python
|
||||
python_runtime '2' do
|
||||
provider :system
|
||||
# Workaround for https://github.com/poise/poise-python/issues/133
|
||||
pip_version '18.0'
|
||||
# Align with eg. OpenStack-Ansible (https://opendev.org/openstack/openstack-ansible/tree/global-requirement-pins.txt)
|
||||
setuptools_version '40.0.0'
|
||||
wheel_version '0.31.1'
|
||||
package node['openstack']['common']['platform']['python2_packages'] do
|
||||
options platform_options['package_overrides']
|
||||
action :upgrade
|
||||
end
|
||||
|
||||
if node['openstack']['databag_type'] == 'vault'
|
||||
|
@ -15,6 +15,12 @@ describe 'openstack-common::default' do
|
||||
expect(chef_run).to upgrade_package('centos-release-qemu-ev')
|
||||
end
|
||||
|
||||
pkgs = %w(python python2-pip python2-setuptools python-devel python-virtualenv python-wheel)
|
||||
|
||||
it 'installs python2 packages' do
|
||||
expect(chef_run).to upgrade_package(pkgs)
|
||||
end
|
||||
|
||||
context 'enabling RDO with gpgcheck enabled' do
|
||||
before do
|
||||
node.override['openstack']['yum']['rdo_enabled'] = true
|
||||
@ -28,12 +34,8 @@ describe 'openstack-common::default' do
|
||||
.with(gpgcheck: true)
|
||||
end
|
||||
|
||||
it 'does not include yum recipe' do
|
||||
expect(chef_run).to_not include_recipe('yum')
|
||||
end
|
||||
|
||||
it 'does not include yum-epel recipe' do
|
||||
expect(chef_run).to_not include_recipe('yum-epel')
|
||||
it 'does include yum-epel recipe' do
|
||||
expect(chef_run).to include_recipe('yum-epel')
|
||||
end
|
||||
end
|
||||
|
||||
@ -48,8 +50,8 @@ describe 'openstack-common::default' do
|
||||
.with(gpgcheck: false)
|
||||
end
|
||||
|
||||
it 'does not include yum-epel recipe' do
|
||||
expect(chef_run).to_not include_recipe('yum-epel')
|
||||
it 'does include yum-epel recipe' do
|
||||
expect(chef_run).to include_recipe('yum-epel')
|
||||
end
|
||||
end
|
||||
|
||||
@ -81,8 +83,8 @@ describe 'openstack-common::default' do
|
||||
expect(repo.performed_actions).to be_empty
|
||||
end
|
||||
|
||||
it 'does not include yum-epel recipe' do
|
||||
expect(chef_run).to_not include_recipe('yum-epel')
|
||||
it 'does include yum-epel recipe' do
|
||||
expect(chef_run).to include_recipe('yum-epel')
|
||||
end
|
||||
|
||||
it 'does not create RDO-Manager yum repositories' do
|
||||
|
@ -62,6 +62,12 @@ describe 'openstack-common::default' do
|
||||
)
|
||||
end
|
||||
|
||||
pkgs = %w(python python-dev python-pip python-setuptools python-virtualenv python-wheel)
|
||||
|
||||
it 'installs python2 packages' do
|
||||
expect(chef_run).to upgrade_package(pkgs)
|
||||
end
|
||||
|
||||
it 'does not install the gem chef-vault by default' do
|
||||
expect(chef_run).to_not install_chef_gem('chef-vault')
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user