Commit Graph

115 Commits

Author SHA1 Message Date
d09a1db5a4 Merge "add shebang lines to all lib files" 2014-12-10 20:32:15 +00:00
e263c82e48 add shebang lines to all lib files
With gerrit 2.8, and the new change screen, this will trigger syntax
highlighting in gerrit. Thus making reviewing code a lot nicer.

Change-Id: Id238748417ffab53e02d59413dba66f61e724383
2014-12-10 11:28:05 -05:00
a9c2594442 Document local.conf settings for ceilometer
Describe the various settings that can be made to control the
behavior of Ceilometer. Doing in lib/ceilometer for now. When there
is more something under doc may be warranted.

Change-Id: I9cd47085a5e91bae0a88f6e26f6c8bdc86c02978
2014-12-08 19:35:57 +00:00
48bbfe93f5 switch to use ceilometer specific connections
in Juno/Kilo, we added ceilometer purpose specific connections for:
metering, alarms, event. Rather than piggyback off oslo.db's
connection option (which gives misleading sql help message), we
should use Ceilometer specific connections.

Change-Id: I7703b73708a5807fb8de89fbb828f06b488acf69
2014-11-19 15:57:45 -05:00
e08ab104e6 fix python-* lib from git installation
We're using all the magic variables based on python-fooclient, however
all the inline code was using fooclient for variables. So we had a
mismatch, which was kindly pointed out by some of the 3rd party ci
testers.

Change-Id: I27a56222c7e8e610fba8bf97672d2a42f5cf14ca
2014-11-13 17:17:38 -05:00
8f8e2d1fbf Merge "support installing clients at released versions" 2014-11-12 19:50:44 +00:00
5cb190697c support installing clients at released versions
expand the devstack support for libraries from released versions to
support python-* clients and tempest_lib.

Depends-On: I81b0d228e7769758c61e5b0323ecfce8c8886d39

Change-Id: I26fac0ccf8fd4818e24618d56bf04b32306f88f6
2014-11-04 10:18:58 +01:00
2112743b10 Allow ceilometer to use redis for coordination
If redis is desired by local.conf via CEILOMETER_COORDINATION_URL
then make sure redis is installed and restarted.

Change-Id: Idfb7b902478049fbc240bf416db6c7d6acd67a51
2014-10-28 12:31:51 +00:00
8abd8598b3 Allow use of ceilometer agent coordination
Juno brings tooz-based coordination of ceilometer central, compute
and alarm agents. If CEILOMETER_COORDINATION_URL is set it will be
used as the value for a tooz coordination backend. If memcached is
chosen, its package will be installed. Other backends, such as
zookeeper can be configured, but installation is left as an exercise
for the devstacker.

In the default devstack setup having coordination will do little as
there are only one of each agent, but this makes it a bit easier for
multi-node or multi-agent setups.

Change-Id: Ib85ccd435de3bc0ae56b5fe8c2fce6c2af9ff8d0
2014-10-20 09:36:29 +01:00
18cf4f1004 Merge "Use $() instead of ``" 2014-10-17 11:03:58 +00:00
efdaafc0f9 Use $() instead of ``
There are other instances of this in other files, just tidying
ceilometer at the moment.

Change-Id: I136a20d7ac50fdf02cbd1102613e324e313b7b0a
2014-10-14 21:08:32 +01:00
67bc8e8ab9 Cleanup create_accounts functions
lib/nova and lib/ceilometer had function calls not in the desired
form.

Change-Id: I6b848e51654a48fe2df6084efdb0f67fd5e180f0
2014-10-08 12:07:46 +01:00
ae6fb18ff2 Allow ceilometer-api to run under mod_wsgi
If CEILOMETER_USE_MOD_WSGI is True then the API app will
run under mod wsgi. The default is false (for now).

The changes are modeled on keystone's use of apache.

Note that these changes are dependent on
https://review.openstack.org/#/c/121823/ in ceilometer.

Using mod_wsgi allows the ceilometer api to handle "concurrent"
requests. This is extremely useful when trying to benchmark
various aspects of the service.

Change-Id: I4c220c3b52804cd8d9123b47780a98e0346ca81e
2014-09-28 17:55:59 +01:00
0595237e8a Function for auth_token middleware config
Each project was configuring the auth_token middleware using several
lines of inisets. Since all the projects should configure the
auth_token middleware in the same way create a function and call it.

Change-Id: I3b6727d5a3bdc0ca600d8faa23bc6db32bb32260
2014-09-21 11:18:01 -05:00
106b379741 Merge "Set default API_WORKERS" 2014-09-20 03:46:26 +00:00
05bd7b803d Set default API_WORKERS
Set the API_WORKERS default to control memory usage. Maximum is nproc / 2 and
minimum is 2.

* Also updates https://review.openstack.org/#/c/117517/ to remove the
  conditional test as API_WORKERS should always be set.
* Update https://review.openstack.org/#/c/109058/ for ceilometer to use API_WORKERS

The following reviews can move forward either as-is or with minor tweaks:
* Keystone: https://review.openstack.org/#/c/121384/ - remove the if check
* Swift: https://review.openstack.org/#/c/121456/ - unabandon, the default
  to 1 is fine, or remove it to match the others.
* Trove: https://review.openstack.org/#/c/121438/ - remove the if check

https://etherpad.openstack.org/p/devstack-workers has the details

Change-Id: Id28d72ebf01c88b7df301edf7d1dd7ec23fcd0d6
2014-09-19 09:06:21 -05:00
bdeea69d72 ceilometer compute agent not started correctly
command isn't properly parsed after switch to run_process. this
patch corrects the regression

Change-Id: Ib28d4bbf6f150854fc5aa04e3fa4eed92005ce19
Closes-Bug: #1370673
2014-09-17 14:54:21 -04:00
2f27a0ed3c Replace screen_it() with run_process() throughout
run_process will use screen if USE_SCREEN=True (the default),
otherwise it will simply start the requested service. Therefore
wherever screen_it used, run_process can be instead.

Where stop_screen was found it has been replaced with stop_process.

A tail_log function has been added which will tail a logfile in a
screen if USE_SCREEN is True.

lib/template has been updated to reflect the use of the new
functions.

When using sg the quoting in run_process gets very complicated.
To get around this run_process and the functions it calls accepts
an optional third argument. If set it is a group to be used with sg.

Change-Id: Ia3843818014f7c6c7526ef3aa9676bbddb8a85ca
2014-09-11 18:59:39 +01:00
dc85b3a772 Merge "Clean up local variable usage - Account setup" 2014-08-23 08:25:35 +00:00
16ef976007 Clean up local variable usage - Account setup
This does the local var cleanup for the account creation in the following projects:
* Ceilometer
* Glance
* Sahara
* Trove

Change-Id: I67631578f79eeaaf2814db84f0f5c19d93aee4f3
2014-08-19 19:31:38 -05:00
80786e0d23 enable multiple collector workers
currently, a single worker thread writes received samples into
database. this is fine for most occasions but during message
spikes, it is not enough. this patch increase amount of workers to
half the number of processors (so we can ensure ceilometer maintains
lightweight design)

this will also help validate mulitple worker setup works.

Partial-Bug: #1336755
Change-Id: I33037f2f9ebfda43238e5cd0cff75adbed65d055
2014-08-18 09:08:13 -04:00
4922bfa846 Change ordering of ceilometer service startup
If the compute-agent starts before the collector directly
after a start or restart of the AMQP service, samples published from
the compute-agent can be lost before the collector has had a chance
to establish connections. These lost samples impact the reliability
of tests which run immediately after the service [re]start.

Note: if there is a restart of the ceilo service, but not the AMQP
service, the problem does not present itself becaue the messaging
service maintains some state on the exchanges it keeps.

Change-Id: I1c06d0511fbf93050cda56d9d2de0ff00813dfb6
Closes-bug: 1355809
2014-08-12 21:57:25 +01:00
1ecd43da54 Merge "Users in service group should not have email addresses" 2014-07-23 14:06:50 +00:00
13344bd975 Fix install_ceilometer and install_ceilometerclient
Other projects do a setup_develop in install_*. This standard is used by
grenade to do installations. Currently grenade uses install ceilometer
as part of the upgrade script, but this doesn't actually install the new
ceilometer.

Change-Id: I4e44bec6574e6a4fcfc252418bc267191aef28fb
Closes-Bug: #1347178
2014-07-22 14:26:05 -07:00
6dd8a8bee4 Users in service group should not have email addresses
Change-Id: Ieed9dffce5cf1e735e482dd3494ac1e103b50955
Closes-Bug: 1185201
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2014-07-22 17:29:04 +02:00
cfcd8cf2f8 Merge "Adds support for multi-region" 2014-07-04 16:53:01 +00:00
4ede37aa86 Revert "Add missing config option os_auth_url"
This reverts commit 524bbed05c.

Change-Id: I0dc3ec7a55cb65bd2a5ff76f32b3d99f8962597b
2014-07-04 07:40:37 +00:00
46e1abafa5 Add ability to enable OSprofiler
To enable OSprofiler we should be able to add "profiler" notification
topic to ceilometer notification topics.

More about OSprofiler:
https://github.com/stackforge/osprofiler

More about ceilometer plugin:
https://review.openstack.org/#/c/100239/

Sample of trace (via Cinder and Nova Services):
http://pavlovic.me/rally/profiler/

Change-Id: I6137174a3ecddd58f62e0f98b235b71b1c070f13
2014-07-02 15:55:27 +00:00
0abde393c5 Adds support for multi-region
Change-Id: Ib85fe7cb375692b04aca4c46f61ba7e1fbfa501b
Implements: blueprint multi-region
2014-07-01 14:58:35 +00:00
524bbed05c Add missing config option os_auth_url
Without this option will appear as an error:
Skip interval_task because Keystone error:
Authorization Failed: Unable to establish connection to
http://localhost:5000/v2.0/tokens

Closes-Bug: #1325383

Change-Id: I42fe92596d9d475f2c5b2a6aa6b49d2b7b821c54
2014-06-26 14:27:24 +00:00
3561d7f9ed Use identity_uri instead of auth fragments
auth_token middleware now accepts a standard URL string as the parameter
identity_uri instead of specifying protocol etc individually. Change the
services over to use this.

Also changes over some other places in which the auth fragments are used
individually to the new variables and fixes up some misconfigurations of
auth_token.

identity_uri option was release in keystoneclient 0.8.0

Change-Id: Iac13bc3d08c524a6a0f39cdfbc1009e2f5c45c2a
2014-06-16 15:16:48 +10:00
d24afa190c Revert "ceilometer.conf configuration option missing os_auth_url"
patch breaks gate (see any logs/screen-ceilometer-acentral.txt.gz
after this patch)

This reverts commit 4c11089739.

Change-Id: I684d50be1b4d580d385a8bb74b3539b1305ec330
2014-05-21 16:05:38 -04:00
4c11089739 ceilometer.conf configuration option missing os_auth_url
ceilometer-agent-centrol error connection keystone: \
Skip interval_task because Keystone error: \
Authorization Failed: Unable to establish connection to
http://localhost:5000/v2.0/tokens

Fixed bug #1320951

Change-Id: Iae722595cb51e11e604d373779d74a8968ea3324
2014-05-20 15:02:25 +00:00
95053cf4d0 Add new configuration files for ceilometer
According to patch: https://review.openstack.org/#/c/77957/, and patch:
https://review.openstack.org/#/c/42713/15, new configuration files named
api_paste.ini and event_definitions.yaml are introduced, this patch
adds them to ceilometer configuration directory.

Change-Id: I57165d588da35f13b2d22629b48dc087502598a7
2014-05-16 16:52:49 +08:00
33e6a94827 Merge "Fix ceilometer-acompute rejoin problems" 2014-05-01 17:22:17 +00:00
0f6d4537e1 Fix ceilometer-acompute rejoin problems
The problem was in the screenrc file generated, where the
following command appeared:

sg libvirtd "ceilometer-agent-compute
                 --config-file /etc/ceilometer/ceilometer.conf"^M"

The final "^M" was not then parsed.

Change-Id: Ie6c5b1c9e3d196a3a9c343c2afb46435711c10f5
Closes-bug: #1311666
2014-04-23 17:51:50 +04:00
1af4afb004 Replace DEFAULT section with service_credentials
Some options defined in ceilometer.service should be in service_credentials
section instead of DEFAULT, which is deprecated since Havana.

Change-Id: I69077394a77f379db2be593a9fa15d414015610a
2014-04-16 14:55:26 +08:00
5d4406c56d Merge "Complete moving Keystone setup out of keystone_data.sh" 2014-03-18 05:46:48 +00:00
9f59782a36 Merge "Devstack changes to ceilometer to support vsphere" 2014-03-17 22:01:22 +00:00
846609b627 Devstack changes to ceilometer to support vsphere
Ceilometer currently supports only libvirt when installed
using devstack. Have extended this support to Vmware Vsphere in this changelist.

Change-Id: I98c64204973bca5e6a7f859a5431adb2b661277f
2014-03-14 19:59:00 +05:30
936284b02a Make mongo install for ceilometer NOPRIME
mongodb packages are missing on some platforms, so we switch to a
manual install.  Also gate the mongo call in cleanup

Change-Id: I1755e461c66be30da3db2a0994f908503c4c38ea
2014-03-11 10:32:01 +11:00
42a59c2bfa Complete moving Keystone setup out of keystone_data.sh
* Move remaining role creation to create_keystone_accounts()
* Move glance creation to create_glance_accounts()
* Move nova/ec2/s3 creation to create_nova_accounts()
* Move ceilometer creation to create_ceilometer_accounts()
* Move tempest creation to create_tempest_accounts()
* Convert moved code to use OpenStackClient for setup
* files/keystone_data.sh is removed

Note that the SERVICE_TENANT and ADMIN_ROLE lookups in the other service
implementations are not necessary with OSC, all operations can be done
using names rather than requiring IDs.

Change-Id: I4283ca0036ae39fd44ed2eed834b69d78e4f8257
2014-03-10 15:17:30 -05:00
423d7901a4 Add an ability to configure debug-level for ceilometer
Change-Id: Ibe9dd2391202a5af291d2eed1559bae60370f9a8
2014-03-06 15:16:42 +04:00
b9a7035081 fix typo in lib/ceilometer
this should be is_service_enabled and not service_enabled. Not
sure why it passes in the gate, but it fails in stackforge jobs.

Change-Id: I876f72cd98ff9c8e4ea28832bc9ac6bbdc3b865d
2014-03-04 15:02:04 -05:00
c921a95f63 only do a dbsync if on the database node
ceilometer should only try to reset the database if it's actually
on a node where there is a database.

Change-Id: Ibcfec0556829bff0938e3769c19d34ae6c02b738
2014-02-28 21:09:33 -05:00
7083b8224d make ceilometer work if you don't enable ceilometer-api
when doing ceilometer in a multihost devstack, you don't want
ceilometer-api running on the computes. Under -o errexit this
became fatal.

Change-Id: Ie43c8724ba467b810f5a3b075dea45d66dde8648
2014-02-28 20:17:19 -05:00
aee18c749b Enforce function declaration format in bash8
Check that function calls look like ^function foo {$ in bash8, and fix
all existing failures of that check.  Add a note to HACKING.rst

Change-Id: Ic19eecb39e0b20273d1bcd551a42fe400d54e938
2014-02-28 07:59:03 +11:00
19685428e3 Change most keystoneclient commands to openstacklient in libs
migrated most keystoneclient commands from the following libs:
 ceilometer
 cinder
 ironic
 keystone
 marconi
 neutron
 nova
 savanna
 swift
 trove

Also need to set and unset openstackclient specific environment
variables from stack.sh

Change-Id: I725f30bc08e1df5a4c5770576c19ad1ddaeb843a
2014-02-14 21:30:57 -06:00
e4fa721322 Begin is_service_enabled() cleanup
This converts the special cases in the is_service_enabled() function to call
individual functions declared by the projects.  This allows projects that
are not in the DevStack repo and called via the extras.d plugin to handle
an equivalent service alias.

* Ceilometer
* Cinder
* Glance
* Neutron
* Nova
* Swift

TODO: remove the tests from is_service_enabled() after a transition period

Patch Set 2: Rebased

Change-Id: Ic78be433f93a9dd5f46be548bdbd4c984e0da6e7
2014-02-07 10:06:21 -06:00
f5cfa1eccd Merge "Have ceilometer to respect the keystone settings" 2014-02-03 18:51:22 +00:00