use a log_file if syslog is disabled
Change-Id: Ie4625c6a396267f9bb91f52f7431ff8b8727a045
This commit is contained in:
@@ -2,8 +2,8 @@
|
|||||||
"sha": "ba71763fac936d414bd4a63f004357f86f6e1bfb",
|
"sha": "ba71763fac936d414bd4a63f004357f86f6e1bfb",
|
||||||
"sources": {
|
"sources": {
|
||||||
"openstack-block-storage": {
|
"openstack-block-storage": {
|
||||||
"locked_version": "7.0.3",
|
"locked_version": "7.0.4",
|
||||||
"constraint": "= 7.0.3",
|
"constraint": "= 7.0.4",
|
||||||
"path": "."
|
"path": "."
|
||||||
},
|
},
|
||||||
"openstack-image": {
|
"openstack-image": {
|
||||||
|
@@ -2,6 +2,11 @@ openstack-block-storage Cookbook CHANGELOG
|
|||||||
==============================
|
==============================
|
||||||
This file is used to list changes made in each version of the openstack-block-storage cookbook.
|
This file is used to list changes made in each version of the openstack-block-storage cookbook.
|
||||||
|
|
||||||
|
v7.0.4
|
||||||
|
------
|
||||||
|
### Improvement
|
||||||
|
- Use a default log-file (/var/log/cinder/cinder.log) if syslog is disabled
|
||||||
|
|
||||||
v7.0.3
|
v7.0.3
|
||||||
------
|
------
|
||||||
### Bug
|
### Bug
|
||||||
|
@@ -4,7 +4,7 @@ maintainer_email "cookbooks@lists.tfoundry.com"
|
|||||||
license "Apache 2.0"
|
license "Apache 2.0"
|
||||||
description "The OpenStack Advanced Volume Management service Cinder."
|
description "The OpenStack Advanced Volume Management service Cinder."
|
||||||
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
|
||||||
version "7.0.3"
|
version "7.0.4"
|
||||||
|
|
||||||
recipe "openstack-block-storage::common", "Defines the common pieces of repeated code from the other recipes"
|
recipe "openstack-block-storage::common", "Defines the common pieces of repeated code from the other recipes"
|
||||||
recipe "openstack-block-storage::api", "Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone"
|
recipe "openstack-block-storage::api", "Installs the cinder-api, sets up the cinder database, and cinder service/user/endpoints in keystone"
|
||||||
|
@@ -7,7 +7,7 @@ describe "openstack-block-storage::cinder-common" do
|
|||||||
n.set["openstack"]["mq"] = {
|
n.set["openstack"]["mq"] = {
|
||||||
"host" => "127.0.0.1"
|
"host" => "127.0.0.1"
|
||||||
}
|
}
|
||||||
n.set["openstack"]["block-storage"]["syslog"]["use"] = true
|
|
||||||
end
|
end
|
||||||
@chef_run.converge "openstack-block-storage::cinder-common"
|
@chef_run.converge "openstack-block-storage::cinder-common"
|
||||||
end
|
end
|
||||||
@@ -58,6 +58,21 @@ describe "openstack-block-storage::cinder-common" do
|
|||||||
"rabbit_ha_queues="
|
"rabbit_ha_queues="
|
||||||
end
|
end
|
||||||
|
|
||||||
|
it "has log_file" do
|
||||||
|
expect(@chef_run).to create_file_with_content @file.name,
|
||||||
|
"log_file = /var/log/cinder/cinder.log"
|
||||||
|
end
|
||||||
|
|
||||||
|
it "has log_config when syslog is true" do
|
||||||
|
chef_run = ::ChefSpec::ChefRunner.new ::UBUNTU_OPTS do |n|
|
||||||
|
n.set["openstack"]["block-storage"]["syslog"]["use"] = true
|
||||||
|
end
|
||||||
|
chef_run.converge "openstack-block-storage::cinder-common"
|
||||||
|
|
||||||
|
expect(chef_run).to create_file_with_content @file.name,
|
||||||
|
"log_config = /etc/openstack/logging.conf"
|
||||||
|
end
|
||||||
|
|
||||||
it "has rabbit_port" do
|
it "has rabbit_port" do
|
||||||
expect(@chef_run).to create_file_with_content @file.name,
|
expect(@chef_run).to create_file_with_content @file.name,
|
||||||
"rabbit_port=5672"
|
"rabbit_port=5672"
|
||||||
|
@@ -41,6 +41,8 @@ notification_driver=cinder.openstack.common.notifier.rpc_notifier
|
|||||||
|
|
||||||
<% if node["openstack"]["block-storage"]["syslog"]["use"] %>
|
<% if node["openstack"]["block-storage"]["syslog"]["use"] %>
|
||||||
log_config = /etc/openstack/logging.conf
|
log_config = /etc/openstack/logging.conf
|
||||||
|
<% else %>
|
||||||
|
log_file = /var/log/cinder/cinder.log
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
######## defined in cinder.flags ########
|
######## defined in cinder.flags ########
|
||||||
|
Reference in New Issue
Block a user