Commit Graph

47 Commits

Author SHA1 Message Date
Takashi Kajinami bca2639e5b ceilometer: Require default_transport_url
The default_transport_url parameter should be configured appropriately
so that the ceilometer middleware can send notifications.

Change-Id: I4fb26670668073619ad3629ea47194ddc33981f0
2024-04-26 09:59:08 +09:00
Zuul bba25b4a95 Merge "ceilometer: Fix wrong rendering of ignore_projects" 2024-04-25 17:06:58 +00:00
Takashi Kajinami e751dda37b ceilometer: Fix wrong rendering of ignore_projects
The ignore_projects option is not a multi-valued option but accepts
only comma-separated strings.

Change-Id: I7977ea4c84417078457afb0d0834934ba5481e5d
2024-04-23 09:55:07 +09:00
Takashi Kajinami 119d8fc819 ceilometer: Use dedicated config file for oslo.messaging options
The mechanism to load additional config files for oslo.messaging option
was introduced to ceilometermiddleware. Use this mechanism to inject
oslo.messaging options so that we can customize behavior of the library
like use_ssl.

Depends-on: https://review.opendev.org/904328
Change-Id: I5a82a52ddea610b4dda6658378d78a6cf13e3bb2
2024-04-23 01:18:01 +09:00
Takashi Kajinami a312a03bb8 ceilometer: Remove redundant default of nonblocking_notify
Change-Id: Id83695510c574fc8e9b16fe6b9bd4568461705a0
2023-12-24 23:07:32 +09:00
Takashi Kajinami 3244a67f56 ceilometer: Purge topic and control_exchange by default
... instead of leaving these options unmanaged.

Change-Id: I89350c9daafeedc1b1736e4dc67f6918a2e8a666
2023-12-24 16:00:36 +09:00
Takashi Kajinami e46f3b4af3 Drop default password
The default password was deprecated some time ago[1].

[1] 2df992faf3

Change-Id: I517fc45081015156e71cd0c77fd2992876e1a22e
2023-10-17 13:49:19 +09:00
Takashi Kajinami 109cd356de Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: I4c0a9357fcc4184df852024e1f6f36c0ed2e1440
2023-03-02 14:47:43 +09:00
Takashi Kajinami 67454cf7ff Support more [oslo_messaging_rabbit] parameters
The ceilometer middleware uses these options when creating notification
client instances.

Change-Id: I2a1d8e2d559bda4fda229f40aec7d97d14b10b11
2022-08-09 20:35:56 +09:00
Takashi Kajinami 152587fd2a Remove unnecessary group assignment
ceilometermiddleware does not require access to local resources owned
by the ceilometer group but communicate with ceilometer over rpc.
Thus we don't need to add the swift user to the ceilometer group.

Change-Id: I3666c5b3d45ba99a5716cfbe5174202b53ad4950
2022-07-04 01:55:22 +09:00
Takashi Kajinami 2f2183e9d6 Accept system scope credentials for Keystone API request
This change is the first step to support secure RBAC and allows usage
of system scope credentials for Keystone API request.

This change covers the following three items.
 - assignment of system scope roles to system user
 - credential parameters for authtoken middleware
 - credential parameters for s3token middleware
 - credential parameters for ceilometer middleware

Depends-on: https://review.opendev.org/804325
Change-Id: I1923a5aed12a503f450c7d2e4a7784e4746fb46c
2022-01-25 15:20:39 +09:00
Thomas Goirand 5b0745101a Get rid of the $pyvers variable
Since everyone has switched to Python3, it's time for the removal of the
$pyvers variable.

Change-Id: Iddf30d802758324334cb3d941e2ed8b6a2979695
2021-05-27 14:23:35 +02:00
Thomas Goirand ede897b112 Fix name of ceilometer middleware package
This change fixes the package name of ceilometermiddleware and ensures
that proper name (python- or python3-) is used according to the default
python version.

Change-Id: I7c99aaf5f02b29a5901aee3e1d9f581079375f17
2021-03-19 08:06:50 +09:00
Thomas Goirand 35c905e430 Do not write /var/log/ceilometer
This patch reverts If7b88bf51046317171f6fa85bb8c01390fa26a37.

ceilometermiddlware is supposed to use the same logger as proxy-server
and doesn't directly touch log files but rely on rsyslog.

Change-Id: I3e2a8ec96cb7b3befa6d840b0944b6f50203dd9e
2021-03-16 11:48:23 +01:00
Takashi Kajinami 2df992faf3 Deprecate the default values for password parameters
Currently puppet-swift provides default values for some password
parameters, but this is not ideal from security perspective and we
should expect operators to set their own password explicitly.

This patch deprecates the usage of these default values and adds
warning message which appears for missing password defined, so that
we can remove current default values in next cycle.

Change-Id: I6e7721d04ae2bf2e2a2ea3f02ebfcbded58692e2
2020-05-13 08:53:14 +09:00
Takashi Kajinami de443f28fc Passwords should be secret
Change-Id: I7db850a55905eb5113c5ac3ed131e42c52f6df5d
2020-05-12 17:44:39 +09:00
Takashi Kajinami 1e57622f25 Deprecate swift::proxy::ceilometer::auth_uri
auth_uri parameter is not used in ceilometermiddleware, so deprecate
puppet parameter according to it.

Change-Id: Id8738a52d0ad0c6aaa4cbab70a0b3461870017dd
2020-02-18 08:06:04 +09:00
Takashi Kajinami 9344031daf Add region parameters for keystone authentication
Add region_name parameters for keystone authentication in authtoken
middlleware and ceilometer middleware, so that we can specify the
keystone region where we expect keystone resources like swift user
are created.

Change-Id: I977ebb769eb79c715e0b19e97b9087bcbf578809
2020-02-18 08:04:54 +09:00
Tobias Urdin ef46b58da2 Remove deprecated rabbit opts in swift::proxy::ceilometer
Removes the deprecated rabbit options in the
swift::proxy::ceilometer class.

Change-Id: I44a2709ed111340dfbb1d751198649c7dd229d7b
2018-10-21 20:03:02 +02:00
zhulingjie ecf9394d98 Replace port 35357 with 5000
Now that the v2.0 API has been removed, we don't have a reason to
include deployment instructions for two separate applications on
different ports.

Change-Id: I518cc1e80f870122ecff450f792f6a16ca56a9a3
2018-05-29 11:48:08 -04:00
Tobias Urdin e7d670b13a Fix rspec-puppet-facts testing
Moves all spec tests over to using rspec-puppet-facts
and runs the tests for all our supported operating systems.

Change-Id: Ie2d60acac835affaf46a5276c9755640a723bca4
2018-05-19 14:17:20 +02:00
melissaml 93638f3696 fix typos in documentation
Change-Id: I3cfbd29b5fc9a5c6f53d2656b282f98a8d4df46c
2018-03-23 06:03:25 +08:00
Pradeep Kilambi 28cbb68958 Add support for ignore_projects for ceilometer events
Set the default to services tenant. Without this, ceilometer
db gets hammered with gnocchi swift events. Keystone creds
are required so middleware can qwuery for id.

This support is added in https://review.openstack.org/#/c/464559/

Change-Id: I5c0f4f1a2c7fe7eb39ea6441970e9ac0946a4ec1
2017-05-18 12:24:18 +00:00
Juan Antonio Osorio Robles 1d0ba466e6 rabbitmq SSL: check puppet resource instead of actual config
The configuration is done via the oslo::messaging::rabbit resource
from puppet-oslo. We should be checking for the resource that we're
using instead of the underlying configuration file.

Change-Id: I60cc9bbe655d8dc7d08dd7a0d6466c7774b8f5a8
2017-03-10 15:59:09 +02:00
Juan Antonio Osorio Robles be6122e936 Enable SSL options for swift-proxy's ceilometermiddleware notifications
This enables the basic SSL options (enabling SSL and setting the
certificates) for the notifications emitted by the ceilometermiddleware
that's in front of swift-proxy. This was enabled for the rabbitmq and
the amqp drivers.

Change-Id: If23d1f0d20264faaddc2e5ad54863483fa43ed41
2017-02-23 15:47:30 +02:00
Xingchao Yu 83f105f539 Secure amqp_url option
As amqp_url option contains password info,
it should not keep plaintext in logs.

Change-Id: I5061235d2ede23e5c80e06624298f8e39196b65b
Closes-Bug: #1640809
2016-11-30 16:33:32 +08:00
Alex Schultz 9d22a27038 Deprecate rabbitmq connection parameters
The rabbitmq connection parameters have been deprecated in favor of a
transport url setting.

Change-Id: I6aa29f7a70c4c1bfce8a09d8da5f88bb148d7d49
Related-Bug: #1625198
2016-11-08 17:16:21 -07:00
Adam Vinsh 3fb02701f3 Add reseller_admin_role config to proxy::keystone
The reseller admin role has the ability to create and delete accounts.
Set the default as undef, so that new config is not added until
a user wants to add it.

Also clean up leftover concat items from proxy spec tests.

Change-Id: I5936fe30b1cb7197bf37748f204a054b1e49e430
2016-11-03 09:34:14 -06:00
Christian Schwede 49a4be7277 Add nonblocking_notify to Swift proxy ceilometer config
This allows to send Ceilometer notifications in a background thread, no
longer blocking Swift proxy if the RabbitMQ is not available.

This patch does not change the default behavior.

Change-Id: Iad1f69f273fe80176c6010f8f3cc24313d7c5ab4
2016-11-01 12:07:27 +01:00
Adam Vinsh 60ed2ee79c Replace proxy concat/template with ini provider
Maintains full backward compatibility.
Use swift_proxy_config ini provider to mange proxy-server.conf.
Remove all erb templates. Move all template logic into proxy
middleware classes. To purge proxy.conf of settings that are
not specified set the new paramater "purge_config" to "true".

Change-Id: I0a143cf812043ea0f9a008a6e5c60ec87f9a4e9a
2016-10-06 10:29:04 -04:00
Pradeep Kilambi b062013099 Remove explicit requires on ceilometer class
In cases where ceilometer and proxy server are not running on
the same node this breaks things. Let the installers handle
the dependency based on where these services run.

Change-Id: Ided6c1229178059a5e3ecc54442170b54ac7c421
2016-09-16 18:13:33 -04:00
Sofer Athlan-Guyot a5e15bbf4a Include openstacklib defaults manifest.
This provides a mechanism for setting default across all modules.

Change-Id: Ie7e3ab180b8f55db698f14f269d5f50b4512b187
Related-Bug: 1599113
2016-07-11 11:24:57 +02:00
Iury Gregory Melo Ferreira 2d84cf4e16 Remove deprecated swift_hash_suffix
swift_hash_suffix was deprecated in Mitaka and
should be removed in Newton.

See http://docs.openstack.org/icehouse/config-reference/content/swift-general-service-configuration.html

Change-Id: I3b5c55607bcd8a2aa5288cdfefa96a152d1682cb
2016-06-03 12:55:02 +00:00
Sergii Golovatiuk a94df7b02a Fix tests for concat 2.1.0
Depends-On: I8e3cd60fa50e04221aedf5c153c1ecb8a5bd97b5

Change-Id: I920479f9d5f0d94151c63a5fdc1445edf984a01a
Signed-off-by: Sergii Golovatiuk <sgolovatiuk@mirantis.com>
2016-05-23 11:57:56 +02:00
Kyrylo Galanov 379d9fc5f5 Add rmq credentials to each host in proxy
Otherwise it will try to connect with default guest/guest credentials

Change-Id: I097e768afd8783c78caee7aba4ac6600c7e55e47
Closes-bug: #1560055
2016-03-28 17:02:10 +02:00
Emilien Macchi b73516aff6 Stop calling ::concat::setup
::concat::setup is a private class deprecated as a public class [1].
This patch makes sure we use concat module the right way and avoid
a warning.

[1] https://github.com/puppetlabs/puppetlabs-concat/blob/master/manifests/setup.pp#L14

Change-Id: Ib7f72f696e8704f3f4d5cff6b06dbcd981d6b395
2016-01-03 13:23:28 -05:00
Denis Egorenko e8ad981eff Update ceilometer proxy template
Now for using Ceilometer notifications from Swift we should
use Ceilometer middleware. Hence we need update template for Swift
to account for incoming and outgoing traffic notifications.

[1] I686e5d94fb72fd2a00973c91673edc417142ee2f
[2] http://docs.openstack.org/developer/oslo.messaging/transport.html#oslo_messaging.TransportURL

Change-Id: Ib6efd4a1ab4b76c74cffc546383f5382c24a8c43
Related-bug: #1510064
2015-12-02 18:20:59 +03:00
Emilien Macchi 68eb6373f0 Try to use zuul-cloner to prepare fixtures
In OpenStack Infra, we would like to run Puppet unit tests that
sometimes depends on other Puppet OpenStack modules.
Example: a patch in puppet-openstacklib that needs to be tested in puppet-nova.

This patch modifies the Rakefile to:
* clean spec_prep and spec_clean Rake tasks
* use openstack/puppet-openstack-integration/install_modules_unit.sh script
  to clone modules.
* do not use .fixtures.yaml file to clone modules and rely on
  zuul-cloner or git.
* Add openstack/ in gitignore so we never commit the
  puppet-openstack-integration repository (can happen when spec_clean
  did not run but you want to submit the patch anyway)
* Allow to run a custom Puppetfile if PUPPETFILE env is exported. It
  will allow people to test the module with the dependencies they like,
  feature we had with .fixtures.yaml.

Also add 'r10k' to Gemfile.

That way, we will be able to use zuul dependencies and run tests accross
modules like we do with functional testing.

It also fix proxy/ceilometer rspec syntax for Puppet 3.x. This change
could not be in a separated patchset since it's related to this patch.

Change-Id: I8d20b5297dde8a2ecfcaf3d21d221735bc9df8d6
2015-10-09 09:16:58 -07:00
Emilien Macchi 981fcaeb53 proxy: ceilometer httpd support
When running Ceilometer in WSGI, 'httpd' service will need to be allowed
to write in /var/log/ceilometer.

Instead of hardcoding 'swift' user for being part of 'ceilometer' group,
create a new parameter 'group' so we can override which user we want
part of 'ceilometer' group.

Change-Id: Ib4c63ea386e93161cddb44c0a588f8e658c214e4
2015-09-29 13:48:00 -04:00
Sebastien Badia 4a6e4cbb33 Fix spec tests for RSpec 3.x and Puppet 4.x
Remove value testing (we only check the key here), the value is nil or undef
and fix resource array, according[1].

[1]https://github.com/puppetlabs/puppet/blob/3.7.5/lib/puppet/resource.rb#L446-L453

Change-Id: Ic7a9b9d1e6d6b6b1c40fbce40d0bf9ff913f191e
Closes-bug: #1447620
2015-06-09 19:40:49 +02:00
Richard Raseley 00d10f1c3e Removal of SSH Components
This change removes all SSH-related components, their configuration
options, and tests.

SSH is such a low-level service (from the perspective of any operator
deploying a cloud), that it is reasonable to assume that (or provide
direction that) SSH must be installed and configured prior to usage of
the puppet-swift module.

Without this change, there is a significant liklihood of confusion
occurring in the likely case of SSH being managed elsewhere.

Change-Id: I0f695788b2784669a3fb285e4bedf0159c4cb89a
Closes-Bug: 1447259
2015-04-24 17:23:53 +02:00
Sebastien Badia f4cfe8e8e4 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)
  * Remove un-used puppet-lint (name_containing_dash config)

Change-Id: I5488507176d4665895eef65ddb4b6f0fb4eda3e7
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-03-24 15:22:16 +01:00
Dan Prince 499386a89d Swift proxy won't start if using proxy:ceilometer
The Swift ceilometer middleware needs to be able to
write its log file in the /var/log/ceilometer
directory. Not all distributions set permissions
on this directory such that the swift user/group
can write into the ceilometer log directory. This
can cause the swift-proxy to fail to startup due
to permissions issues.

This patch updates the swift::proxy::ceilometer so
that we create an empty /var/log/ceilometer/swift-proxy-server.log
file with proper permissions before starting the swift-proxy
service.

Change-Id: If7b88bf51046317171f6fa85bb8c01390fa26a37
2015-01-26 22:11:02 -05:00
Michal Skalski e6a225d79b Enlarging the scope of ssh module
Including only ssh::server::install class in init.pp give too small scope
and cause warnings about inability to look up ssh::server::ensure.

Closes-Bug: 1355873

Change-Id: I443c9f006b47c609e4a05da38b4a2124acbf886e
2014-12-03 11:11:18 +01:00
Mathieu Gagné e2e39f0ede Revert "Fix compatibility with latest puppetlabs-concat"
This fix broke everything. Lets revert it.

This reverts commit 23cc3616ce.

Change-Id: I9ce82c2e8f65606fbcedb4e2a4b37bc81edc5656
2013-10-29 23:13:47 -04:00
Mathieu Gagné 23cc3616ce Fix compatibility with latest puppetlabs-concat
concat::setup has been made a private class and can no longer be
included from modules outside concat itself.

concat::setup is already included by the concat define. Removing
its inclusion from puppet-swift classes shouldn't result in breakage
or loss of functionality.

Change-Id: I7566e09bd4e93aec719a495279cf92d8a898057e
Closes-bug: #1245936
2013-10-29 11:48:48 -04:00
François Charlier 015be53c81 Add the ceilometer middleware
Change-Id: Ibcdaa1218c8d027dc3e4b6d2cd394e9d0af8c6da
2013-04-29 10:30:33 +02:00