Initial block-storage Pike updates
- Changed the default linter to cookstyle - cinder-group-active was missing a Provides header for the SysV init script - Switched the qemu package to SCL for CentOS to get a newer release - Normalized template banner comment Change-Id: Iec59e0c8e3cb0b83db92a0a9f8db34a40953351f
This commit is contained in:
parent
a29984d301
commit
60a38b538d
|
@ -1,5 +1,3 @@
|
||||||
inherit_from: .rubocop_todo.yml
|
|
||||||
|
|
||||||
AllCops:
|
AllCops:
|
||||||
Include:
|
Include:
|
||||||
- metadata.rb
|
- metadata.rb
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
# This configuration was generated by
|
|
||||||
# `rubocop --auto-gen-config`
|
|
||||||
# on 2017-08-17 14:15:59 +0200 using RuboCop version 0.47.1.
|
|
||||||
# The point is for the user to remove these configuration records
|
|
||||||
# one by one as the offenses are removed from the code base.
|
|
||||||
# Note that changes in the inspected code, or installation of new
|
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
|
||||||
|
|
||||||
# Offense count: 18
|
|
||||||
# Configuration parameters: CountComments, ExcludedMethods.
|
|
||||||
Metrics/BlockLength:
|
|
||||||
Max: 178
|
|
||||||
|
|
||||||
# Offense count: 4
|
|
||||||
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
|
||||||
# SupportedStyles: nested, compact
|
|
||||||
Style/ClassAndModuleChildren:
|
|
||||||
Exclude:
|
|
||||||
- 'recipes/api.rb'
|
|
||||||
- 'recipes/cinder-common.rb'
|
|
||||||
- 'recipes/identity_registration.rb'
|
|
||||||
- 'recipes/volume.rb'
|
|
14
Rakefile
14
Rakefile
|
@ -1,20 +1,20 @@
|
||||||
task default: ["test"]
|
task default: ["test"]
|
||||||
|
|
||||||
task :test => [:lint, :style, :unit]
|
task :test => [:syntax, :lint, :unit]
|
||||||
|
|
||||||
desc "Vendor the cookbooks in the Berksfile"
|
desc "Vendor the cookbooks in the Berksfile"
|
||||||
task :berks_prep do
|
task :berks_prep do
|
||||||
sh %{chef exec berks vendor}
|
sh %{chef exec berks vendor}
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run FoodCritic (lint) tests"
|
desc "Run FoodCritic (syntax) tests"
|
||||||
task :lint do
|
task :syntax do
|
||||||
sh %{chef exec foodcritic --epic-fail any --tags ~FC003 --tags ~FC023 .}
|
sh %{chef exec foodcritic --exclude spec -f any .}
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run RuboCop (style) tests"
|
desc "Run RuboCop (lint) tests"
|
||||||
task :style do
|
task :lint do
|
||||||
sh %{chef exec rubocop}
|
sh %{chef exec cookstyle}
|
||||||
end
|
end
|
||||||
|
|
||||||
desc "Run RSpec (unit) tests"
|
desc "Run RSpec (unit) tests"
|
||||||
|
|
|
@ -30,8 +30,8 @@ default['developer_mode'] = false # we want secure passwords by default
|
||||||
# Set to some text value if you want templated config files
|
# Set to some text value if you want templated config files
|
||||||
# to contain a custom banner at the top of the written file
|
# to contain a custom banner at the top of the written file
|
||||||
default['openstack']['block-storage']['custom_template_banner'] = '
|
default['openstack']['block-storage']['custom_template_banner'] = '
|
||||||
# This file autogenerated by Chef
|
# This file is automatically generated by Chef
|
||||||
# Do not edit, changes will be overwritten
|
# Any changes will be overwritten
|
||||||
'
|
'
|
||||||
|
|
||||||
# Specify policy.json remote file to import
|
# Specify policy.json remote file to import
|
||||||
|
@ -79,7 +79,7 @@ when 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||||
'cinder_common_packages' => ['openstack-cinder'],
|
'cinder_common_packages' => ['openstack-cinder'],
|
||||||
'cinder_api_packages' => ['openstack-cinder'],
|
'cinder_api_packages' => ['openstack-cinder'],
|
||||||
'cinder_api_service' => 'openstack-cinder-api',
|
'cinder_api_service' => 'openstack-cinder-api',
|
||||||
'cinder_volume_packages' => ['qemu-img'],
|
'cinder_volume_packages' => ['qemu-img-ev'],
|
||||||
'cinder_volume_service' => 'openstack-cinder-volume',
|
'cinder_volume_service' => 'openstack-cinder-volume',
|
||||||
'cinder_scheduler_packages' => [],
|
'cinder_scheduler_packages' => [],
|
||||||
'cinder_scheduler_service' => 'openstack-cinder-scheduler',
|
'cinder_scheduler_service' => 'openstack-cinder-scheduler',
|
||||||
|
@ -93,7 +93,7 @@ when 'rhel' # :pragma-foodcritic: ~FC024 - won't fix this
|
||||||
'cinder_svc_packages' => ['sysfsutils'],
|
'cinder_svc_packages' => ['sysfsutils'],
|
||||||
'cinder_lvm_packages' => ['lvm2'],
|
'cinder_lvm_packages' => ['lvm2'],
|
||||||
'cinder_flashsystem_packages' => ['sysfsutils'],
|
'cinder_flashsystem_packages' => ['sysfsutils'],
|
||||||
'package_overrides' => ''
|
'package_overrides' => '',
|
||||||
}
|
}
|
||||||
when 'debian'
|
when 'debian'
|
||||||
# operating system user and group names
|
# operating system user and group names
|
||||||
|
@ -115,7 +115,7 @@ when 'debian'
|
||||||
'cinder_svc_packages' => ['sysfsutils'],
|
'cinder_svc_packages' => ['sysfsutils'],
|
||||||
'cinder_lvm_packages' => ['lvm2'],
|
'cinder_lvm_packages' => ['lvm2'],
|
||||||
'cinder_flashsystem_packages' => ['sysfsutils'],
|
'cinder_flashsystem_packages' => ['sysfsutils'],
|
||||||
'package_overrides' => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'"
|
'package_overrides' => "-o Dpkg::Options::='--force-confold' -o Dpkg::Options::='--force-confdef'",
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ auth_url = ::URI.decode identity_admin_endpoint.to_s
|
||||||
interfaces = {
|
interfaces = {
|
||||||
public: { url: public_endpoint('block-storage') },
|
public: { url: public_endpoint('block-storage') },
|
||||||
internal: { url: internal_endpoint('block-storage') },
|
internal: { url: internal_endpoint('block-storage') },
|
||||||
admin: { url: admin_endpoint('block-storage') }
|
admin: { url: admin_endpoint('block-storage') },
|
||||||
}
|
}
|
||||||
service_pass = get_password 'service', 'openstack-block-storage'
|
service_pass = get_password 'service', 'openstack-block-storage'
|
||||||
region = node['openstack']['block-storage']['region']
|
region = node['openstack']['block-storage']['region']
|
||||||
|
@ -52,7 +52,7 @@ connection_params = {
|
||||||
openstack_username: admin_user,
|
openstack_username: admin_user,
|
||||||
openstack_api_key: admin_pass,
|
openstack_api_key: admin_pass,
|
||||||
openstack_project_name: admin_project,
|
openstack_project_name: admin_project,
|
||||||
openstack_domain_name: admin_domain
|
openstack_domain_name: admin_domain,
|
||||||
}
|
}
|
||||||
|
|
||||||
# Register VolumeV2 Service
|
# Register VolumeV2 Service
|
||||||
|
|
|
@ -208,7 +208,7 @@ describe 'openstack-block-storage::cinder-common' do
|
||||||
%r{^exec_dirs = /sbin,/usr/sbin,/bin,/usr/bin$},
|
%r{^exec_dirs = /sbin,/usr/sbin,/bin,/usr/bin$},
|
||||||
/^use_syslog = false$/,
|
/^use_syslog = false$/,
|
||||||
/^syslog_log_facility = syslog$/,
|
/^syslog_log_facility = syslog$/,
|
||||||
/^syslog_log_level = ERROR$/
|
/^syslog_log_level = ERROR$/,
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_file(file.name).with_content(line)
|
expect(chef_run).to render_file(file.name).with_content(line)
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,7 +17,7 @@ describe 'openstack-block-storage::identity_registration' do
|
||||||
openstack_username: 'admin',
|
openstack_username: 'admin',
|
||||||
openstack_api_key: 'emc_test_pass',
|
openstack_api_key: 'emc_test_pass',
|
||||||
openstack_project_name: 'admin',
|
openstack_project_name: 'admin',
|
||||||
openstack_domain_name: 'default'
|
openstack_domain_name: 'default',
|
||||||
}
|
}
|
||||||
service_name = 'cinderv2'
|
service_name = 'cinderv2'
|
||||||
service_type = 'volumev2'
|
service_type = 'volumev2'
|
||||||
|
|
|
@ -13,12 +13,12 @@ LOG_LEVEL = :fatal
|
||||||
REDHAT_OPTS = {
|
REDHAT_OPTS = {
|
||||||
platform: 'redhat',
|
platform: 'redhat',
|
||||||
version: '7.1',
|
version: '7.1',
|
||||||
log_level: LOG_LEVEL
|
log_level: LOG_LEVEL,
|
||||||
}.freeze
|
}.freeze
|
||||||
UBUNTU_OPTS = {
|
UBUNTU_OPTS = {
|
||||||
platform: 'ubuntu',
|
platform: 'ubuntu',
|
||||||
version: '16.04',
|
version: '16.04',
|
||||||
log_level: LOG_LEVEL
|
log_level: LOG_LEVEL,
|
||||||
}.freeze
|
}.freeze
|
||||||
|
|
||||||
shared_context 'block-storage-stubs' do
|
shared_context 'block-storage-stubs' do
|
||||||
|
@ -116,7 +116,7 @@ shared_examples 'creates_cinder_conf' do |service, user, group, action = :restar
|
||||||
/^project_domain_name = Default/,
|
/^project_domain_name = Default/,
|
||||||
%r{^auth_uri = http://127.0.0.1:5000/v3$},
|
%r{^auth_uri = http://127.0.0.1:5000/v3$},
|
||||||
%r{^auth_url = http://127.0.0.1:35357/v3$},
|
%r{^auth_url = http://127.0.0.1:35357/v3$},
|
||||||
/^password = cinder-pass$/
|
/^password = cinder-pass$/,
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_config_file(file.name)
|
expect(chef_run).to render_config_file(file.name)
|
||||||
.with_section_content('keystone_authtoken', line)
|
.with_section_content('keystone_authtoken', line)
|
||||||
|
@ -125,7 +125,7 @@ shared_examples 'creates_cinder_conf' do |service, user, group, action = :restar
|
||||||
|
|
||||||
it 'has oslo_messaging_notifications conf values' do
|
it 'has oslo_messaging_notifications conf values' do
|
||||||
[
|
[
|
||||||
/^driver = cinder.openstack.common.notifier.rpc_notifier$/
|
/^driver = cinder.openstack.common.notifier.rpc_notifier$/,
|
||||||
].each do |line|
|
].each do |line|
|
||||||
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_notifications', line)
|
expect(chef_run).to render_config_file(file.name).with_section_content('oslo_messaging_notifications', line)
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,8 +23,8 @@ describe 'openstack-block-storage::volume' do
|
||||||
expect(chef_run).not_to upgrade_package('MySQL-python')
|
expect(chef_run).not_to upgrade_package('MySQL-python')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'upgrades qemu img package' do
|
it 'upgrades qemu-img-ev package' do
|
||||||
expect(chef_run).to upgrade_package('qemu-img')
|
expect(chef_run).to upgrade_package('qemu-img-ev')
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'upgrades cinder iscsi package' do
|
it 'upgrades cinder iscsi package' do
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
# chkconfig: - 98 02
|
# chkconfig: - 98 02
|
||||||
#
|
#
|
||||||
### BEGIN INIT INFO
|
### BEGIN INIT INFO
|
||||||
|
# Provides: cinder-group-active
|
||||||
# Required-Start: $remote_fs $network $syslog
|
# Required-Start: $remote_fs $network $syslog
|
||||||
# Required-Stop: $remote_fs $syslog
|
# Required-Stop: $remote_fs $syslog
|
||||||
# Default-Start: 2 3 4 5
|
# Default-Start: 2 3 4 5
|
||||||
|
|
Loading…
Reference in New Issue