20 Commits

Author SHA1 Message Date
ZhongShengping
9bb591f189 Add log_file parameter
Change-Id: I0b5ad93fe60c22911d3ec60ad9bf08bb183bb5c2
Closes-Bug: #1819417
2019-03-12 10:38:16 +08:00
ZhongShengping
7fb4c280c7 Fix lint issue
Change-Id: Iaad76eaae413425ae92584594dceb32e139885e2
2019-01-25 12:23:43 +08:00
Tobias Urdin
a7c72997a9 Convert spec testing to use rspec-puppet-facts
Change-Id: Id88ddefec141eddea8f2449b7b16dde52feeb6b8
2018-11-07 13:03:39 +01:00
ZhongShengping
f763d7e94d Add use_journal option for logging configuration
This enables oslo.log to pass logging records to journald.

Change-Id: I8c1e17cc85c5c3491936b07cff566e810f7f860c
2018-01-15 15:30:08 +08:00
Juan Antonio Osorio Robles
c80fc1afc7 Expose use_json logging option
It enables JSON-formatted logging from oslo.log.

Change-Id: I38da9b5c4f8e5f126e1aa25800a22e43b39d2de7
2017-11-27 14:37:41 +02:00
Mykyta Karpin
e08195a646 oslo log: check puppet resource instead of actual config in spec
Change-Id: Ib6313bcc9bd7c8f9850e3a7b289ca61db242ebd7
2017-03-16 10:48:55 +02:00
ZhongShengping
51dcfcab31 Fix typo
Change-Id: Id5fdf8166096770c3d411f0c72367b0e22f467a5
2017-03-13 20:08:59 +08:00
Maksym Yatsenko
4fcd49b592 Change worker defaults to ::os_workers
This patch changes the default worker count from ::processorcount to the
new ::os_workers fact. ::os_workers is based on the number of processors
(currently cpu/4) but is capped at a maximum of 8 worker processors.
This is a much more reasonable default in general and prevents excessive
resource consumption on systems with a large number of CPUs.

Change-Id: I159bb64d024c2207526c73212d68230d8362164c
2016-10-06 20:09:02 +03:00
Iury Gregory Melo Ferreira
04078aad69 Revert "Deprecate use_syslog and enable_v1/v2_api"
This commit partially reverts original commit.

use_syslog option is not deprecated and still actual.

This reverts commit I76fd567f53ef8f0f4d351d52043e3ba2fea6f02f

Change-Id: I422bc5ce8560d805a93e2a23c5a2f0ffa9870b6b
2016-05-31 11:21:03 -03:00
Iury Gregory Melo Ferreira
35f4174cc5 Deprecate use_syslog and enable_v1/v2_api
[DEFAULT/use_syslog] was deprecated in Mitaka [1] init.pp logging.pp -
deprecate use_syslog, add warning, remove reference tests - remove use_syslog
and [DEFAULT/use_syslog] verification.

enable_v1/v2_api was deprecated in Mitaka [2] init.pp
deprecate enable_v1_api, enable_v2_api
add warning
remove tests

[1] http://docs.openstack.org/mitaka/config-reference/tables/conf-changes/cinder.html

Change-Id: I76fd567f53ef8f0f4d351d52043e3ba2fea6f02f
2016-05-25 09:39:22 -03:00
Erickson Santos
d4f5963461 Deprecate verbose option in logging
Option "verbose" from group "DEFAULT" is deprecated for removal.
The parameter has no effect.
-Deprecated verbose for logging and init
-Remove verbose in examples and README
-Remove verbose from tests.
If this option is not set explicitly, there is no such warning.

Change-Id: I573b2480195df2e7b390245d418ec5535c8e2cdd
2016-05-18 14:44:28 -03:00
Denis Egorenko
778d89bb84 Totally drop Qpid support
Qpid was removed in Mitaka from Oslo Messaging, so now we can
drop it in manifests.

Change-Id: Id23736218e97cb19fd009850e35859c1a94801e4
2016-04-18 13:39:56 +03:00
Alex Schultz
7142165485 Update tests to leverage rspec-puppet-facts
This change updates the test that currently do Debian/RedHat sets of
tests to use on_supported_os from rspec-puppet-facts. This improves the
over all coverage with the specific CentOS, Debian, RedHat and Ubuntu
flavors of facts.

Change-Id: Ic7b12cd8972bbde0574806acb2d680f14f1c267f
2016-01-18 10:25:18 -07:00
Alex Schultz
70daad9ea4 Fix cinder default log_dir
With the os_service_default updates, we introduced a regression since
the default log_dir needs to be specified if we want logs. Previously it
was defined as /var/log/cinder so this change adds it back in.

Change-Id: I51c3cb7be8c62cba3b9dbca292a7bb73d9a658b2
2015-11-04 10:59:50 -06:00
Alex Schultz
6c9b4825a7 Fixing default_facts merge
Prior to this change, we were incorrectly using merge! on the
@default_facts. This would eventually lead to weird testing issues if
@default_facts was ever reused within a test run. merge!(...) will
update the @default_facts variable and we want to use merge(...) so that
we are not updating the @default_facts variable.

Change-Id: I55b518ee4af1a76ff5fc0e071410ccee5e4dfb34
2015-10-29 09:26:27 -05:00
Yanis Guenane
7fe7d77bf3 Put all the logging related parameters to the logging class
Currently logging configuration is splitted in two distinct classes, the
init.pp and the logging.pp classes.

This review aims to centralize all logging related parameters in a
single class, the logging.pp one.

The impacted parameters are :

 * use_syslog
 * use_stderr
 * log_facility
 * verbose
 * debug
 * log_dir

This change remains backward compatible with what is currently in place.

Change-Id: Id6ef37e6debbdcad0727359f974cf1575a5509f0
2015-10-14 09:37:00 +02:00
Alex Schultz
667e6c0850 Switch cinder to use os_service_default fact
This change switches the cinder module to use the os_service_default
fact for configuration options that default to '<SERVICE DEFAULT>'.

Change-Id: I8c28f02794fdc7034a85eab80a66a98f664380ea
Depends-On: Ieeb92b4e7fbb556a8d32682fb24284091227c991
2015-10-07 15:48:56 -05:00
Yanis Guenane
3259caa0ef Move default value to '<SERVICE DEFAULT>'
Few weeks ago, a patchset[1] that aims to treat the value '<SERVICE
DEFAULT>' of a parameter as if ensure => absent has been merged.

The final objective of this patch was to make our manifests lighter to
read and write by avoiding the pattern

if $var { value => $var } else { ensure => absent }

This commit brings this feature to the puppet-cinder module and remains
backward compatible with what was in place before.

This commit switches a part of the module, another commit will switch the
other part (init.pp/paste).

The split in reviews aims to offer :

  * easier readability on this one
  * the other review might needs other change as well - not a drop in
    replacement, contrary to this one so it is simpler to split it.

[1]
b554d30aaf
Change-Id: I005096625a9ea7d069893e4a3d64aa31e074378e
2015-09-11 14:41:38 +02:00
Sebastien Badia
4224fdd12e spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the

rspec-puppet release 2.0.0, in the mean time, we update rspec syntax
in order to be prepared for rspec 3.x move.

In details:

  * Use shared_examples "a Puppet::Error" for puppet::error tests
  * Convert 'should' keyword to 'is_expected.to' (prepare rspec 3.x)
  * Fix spec tests for rspec-puppet 2.0.0
  * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
  * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: Id5b428fb518f40cf92cd27078d36f19b6d60226b
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-03-11 17:58:49 +01:00
Johannes Grassler
47765d2080 Add extended logging options.
There is a range of extended logging options in Openstack services that use
openstack.common.logger (Ceilometer, Cinder, Heat, Keystone, Nova). Adding
cinder::logging to support them. This change is identical to
<https://review.openstack.org/#/c/113560/> but it applies to puppet-cinder
instead of puppet-ceilometer.

No blueprint/spec, as discussed in the IRC meeting on 08-11-2014.

Change-Id: Id1d4380157e681da9ada2e2647ab285ce3cc40ad
2014-09-01 12:40:38 +00:00