From 1f7aebf6adad8c8064ecc7f74bbb0c0d363f9872 Mon Sep 17 00:00:00 2001 From: iberezovskiy Date: Wed, 21 Jan 2015 12:13:31 +0300 Subject: [PATCH] Update to 2015.1.0b1 release Change-Id: I9cc8b5e8300f9a03cd4f5452a2f865e155818315 --- rpm/SOURCES/ceilometer-rootwrap-sudoers | 2 + rpm/SOURCES/ceilometer.conf.sample | 1003 ----------------- ...enstack-ceilometer-alarm-evaluator.service | 12 + ...penstack-ceilometer-alarm-notifier.service | 12 + rpm/SOURCES/openstack-ceilometer-api.service | 12 + .../openstack-ceilometer-central.service | 12 + .../openstack-ceilometer-collector.service | 12 + .../openstack-ceilometer-compute.service | 13 + rpm/SOURCES/openstack-ceilometer-ipmi.init | 102 ++ rpm/SOURCES/openstack-ceilometer-ipmi.service | 12 + rpm/SOURCES/openstack-ceilometer-ipmi.upstart | 8 + .../openstack-ceilometer-notification.service | 12 + rpm/SPECS/openstack-ceilometer.spec | 247 +++- tests/runtests.sh | 2 + 14 files changed, 449 insertions(+), 1012 deletions(-) create mode 100644 rpm/SOURCES/ceilometer-rootwrap-sudoers delete mode 100644 rpm/SOURCES/ceilometer.conf.sample create mode 100644 rpm/SOURCES/openstack-ceilometer-alarm-evaluator.service create mode 100644 rpm/SOURCES/openstack-ceilometer-alarm-notifier.service create mode 100644 rpm/SOURCES/openstack-ceilometer-api.service create mode 100644 rpm/SOURCES/openstack-ceilometer-central.service create mode 100644 rpm/SOURCES/openstack-ceilometer-collector.service create mode 100644 rpm/SOURCES/openstack-ceilometer-compute.service create mode 100644 rpm/SOURCES/openstack-ceilometer-ipmi.init create mode 100644 rpm/SOURCES/openstack-ceilometer-ipmi.service create mode 100644 rpm/SOURCES/openstack-ceilometer-ipmi.upstart create mode 100644 rpm/SOURCES/openstack-ceilometer-notification.service diff --git a/rpm/SOURCES/ceilometer-rootwrap-sudoers b/rpm/SOURCES/ceilometer-rootwrap-sudoers new file mode 100644 index 0000000..ba97166 --- /dev/null +++ b/rpm/SOURCES/ceilometer-rootwrap-sudoers @@ -0,0 +1,2 @@ +Defaults:ceilometer !requiretty +ceilometer ALL = (root) NOPASSWD: /usr/bin/ceilometer-rootwrap /etc/ceilometer/rootwrap.conf * diff --git a/rpm/SOURCES/ceilometer.conf.sample b/rpm/SOURCES/ceilometer.conf.sample deleted file mode 100644 index fe23825..0000000 --- a/rpm/SOURCES/ceilometer.conf.sample +++ /dev/null @@ -1,1003 +0,0 @@ -[DEFAULT] - -# -# Options defined in oslo.messaging -# - -# Use durable queues in amqp. (boolean value) -# Deprecated group/name - [DEFAULT]/rabbit_durable_queues -#amqp_durable_queues=false - -# Auto-delete queues in amqp. (boolean value) -#amqp_auto_delete=false - -# Size of RPC connection pool. (integer value) -#rpc_conn_pool_size=30 - -# Modules of exceptions that are permitted to be recreated -# upon receiving exception data from an rpc call. (list value) -#allowed_rpc_exception_modules=oslo.messaging.exceptions,nova.exception,cinder.exception,exceptions - -# Qpid broker hostname. (string value) -#qpid_hostname=localhost - -# Qpid broker port. (integer value) -#qpid_port=5672 - -# Qpid HA cluster host:port pairs. (list value) -#qpid_hosts=$qpid_hostname:$qpid_port - -# Username for Qpid connection. (string value) -#qpid_username= - -# Password for Qpid connection. (string value) -#qpid_password= - -# Space separated list of SASL mechanisms to use for auth. -# (string value) -#qpid_sasl_mechanisms= - -# Seconds between connection keepalive heartbeats. (integer -# value) -#qpid_heartbeat=60 - -# Transport to use, either 'tcp' or 'ssl'. (string value) -#qpid_protocol=tcp - -# Whether to disable the Nagle algorithm. (boolean value) -#qpid_tcp_nodelay=true - -# The qpid topology version to use. Version 1 is what was -# originally used by impl_qpid. Version 2 includes some -# backwards-incompatible changes that allow broker federation -# to work. Users should update to version 2 when they are -# able to take everything down, as it requires a clean break. -# (integer value) -#qpid_topology_version=1 - -# SSL version to use (valid only if SSL enabled). valid values -# are TLSv1, SSLv23 and SSLv3. SSLv2 may be available on some -# distributions. (string value) -#kombu_ssl_version= - -# SSL key file (valid only if SSL enabled). (string value) -#kombu_ssl_keyfile= - -# SSL cert file (valid only if SSL enabled). (string value) -#kombu_ssl_certfile= - -# SSL certification authority file (valid only if SSL -# enabled). (string value) -#kombu_ssl_ca_certs= - -# How long to wait before reconnecting in response to an AMQP -# consumer cancel notification. (floating point value) -#kombu_reconnect_delay=1.0 - -# The RabbitMQ broker address where a single node is used. -# (string value) -#rabbit_host=localhost - -# The RabbitMQ broker port where a single node is used. -# (integer value) -#rabbit_port=5672 - -# RabbitMQ HA cluster host:port pairs. (list value) -#rabbit_hosts=$rabbit_host:$rabbit_port - -# Connect over SSL for RabbitMQ. (boolean value) -#rabbit_use_ssl=false - -# The RabbitMQ userid. (string value) -#rabbit_userid=guest - -# The RabbitMQ password. (string value) -#rabbit_password=guest - -# the RabbitMQ login method (string value) -#rabbit_login_method=AMQPLAIN - -# The RabbitMQ virtual host. (string value) -#rabbit_virtual_host=/ - -# How frequently to retry connecting with RabbitMQ. (integer -# value) -#rabbit_retry_interval=1 - -# How long to backoff for between retries when connecting to -# RabbitMQ. (integer value) -#rabbit_retry_backoff=2 - -# Maximum number of RabbitMQ connection retries. Default is 0 -# (infinite retry count). (integer value) -#rabbit_max_retries=0 - -# Use HA queues in RabbitMQ (x-ha-policy: all). If you change -# this option, you must wipe the RabbitMQ database. (boolean -# value) -#rabbit_ha_queues=false - -# If passed, use a fake RabbitMQ provider. (boolean value) -#fake_rabbit=false - -# ZeroMQ bind address. Should be a wildcard (*), an ethernet -# interface, or IP. The "host" option should point or resolve -# to this address. (string value) -#rpc_zmq_bind_address=* - -# MatchMaker driver. (string value) -#rpc_zmq_matchmaker=oslo.messaging._drivers.matchmaker.MatchMakerLocalhost - -# ZeroMQ receiver listening port. (integer value) -#rpc_zmq_port=9501 - -# Number of ZeroMQ contexts, defaults to 1. (integer value) -#rpc_zmq_contexts=1 - -# Maximum number of ingress messages to locally buffer per -# topic. Default is unlimited. (integer value) -#rpc_zmq_topic_backlog= - -# Directory for holding IPC sockets. (string value) -#rpc_zmq_ipc_dir=/var/run/openstack - -# Name of this node. Must be a valid hostname, FQDN, or IP -# address. Must match "host" option, if running Nova. (string -# value) -#rpc_zmq_host=ceilometer - -# Seconds to wait before a cast expires (TTL). Only supported -# by impl_zmq. (integer value) -#rpc_cast_timeout=30 - -# Heartbeat frequency. (integer value) -#matchmaker_heartbeat_freq=300 - -# Heartbeat time-to-live. (integer value) -#matchmaker_heartbeat_ttl=600 - -# Host to locate redis. (string value) -#host=127.0.0.1 - -# Use this port to connect to redis host. (integer value) -#port=6379 - -# Password for Redis server (optional). (string value) -#password= - -# Size of RPC greenthread pool. (integer value) -#rpc_thread_pool_size=64 - -# Driver or drivers to handle sending notifications. (multi -# valued) -#notification_driver= - -# AMQP topic used for OpenStack notifications. (list value) -# Deprecated group/name - [rpc_notifier2]/topics -#notification_topics=notifications - -# Seconds to wait for a response from a call. (integer value) -#rpc_response_timeout=60 - -# A URL representing the messaging driver to use and its full -# configuration. If not set, we fall back to the rpc_backend -# option and driver specific configuration. (string value) -#transport_url= - -# The messaging driver to use, defaults to rabbit. Other -# drivers include qpid and zmq. (string value) -#rpc_backend=rabbit - -# The default exchange under which topics are scoped. May be -# overridden by an exchange name specified in the -# transport_url option. (string value) -#control_exchange=openstack - - -# -# Options defined in ceilometer.middleware -# - -# Exchanges name to listen for notifications. (multi valued) -#http_control_exchanges=nova -#http_control_exchanges=glance -#http_control_exchanges=neutron -#http_control_exchanges=cinder - - -# -# Options defined in ceilometer.pipeline -# - -# Configuration file for pipeline definition. (string value) -#pipeline_cfg_file=pipeline.yaml - - -# -# Options defined in ceilometer.sample -# - -# Source for samples emitted on this instance. (string value) -# Deprecated group/name - [DEFAULT]/counter_source -#sample_source=openstack - - -# -# Options defined in ceilometer.service -# - -# Name of this node, which must be valid in an AMQP key. Can -# be an opaque identifier. For ZeroMQ only, must be a valid -# host name, FQDN, or IP address. (string value) -#host=ceilometer - -# Number of workers for collector service. A single collector -# is enabled by default. (integer value) -#collector_workers=1 - -# Number of workers for notification service. A single -# notification agent is enabled by default. (integer value) -#notification_workers=1 - - -# -# Options defined in ceilometer.api.app -# - -# Configuration file for WSGI definition of API. (string -# value) -#api_paste_config=api_paste.ini - - -# -# Options defined in ceilometer.compute.notifications -# - -# Exchange name for Nova notifications. (string value) -#nova_control_exchange=nova - - -# -# Options defined in ceilometer.compute.util -# - -# List of metadata prefixes reserved for metering use. (list -# value) -#reserved_metadata_namespace=metering. - -# Limit on length of reserved metadata values. (integer value) -#reserved_metadata_length=256 - - -# -# Options defined in ceilometer.compute.virt.inspector -# - -# Inspector to use for inspecting the hypervisor layer. -# (string value) -#hypervisor_inspector=libvirt - - -# -# Options defined in ceilometer.compute.virt.libvirt.inspector -# - -# Libvirt domain type (valid options are: kvm, lxc, qemu, uml, -# xen). (string value) -#libvirt_type=kvm - -# Override the default libvirt URI (which is dependent on -# libvirt_type). (string value) -#libvirt_uri= - - -# -# Options defined in ceilometer.dispatcher -# - -# Dispatcher to process data. (multi valued) -#dispatcher=database - - -# -# Options defined in ceilometer.image.notifications -# - -# Exchange name for Glance notifications. (string value) -#glance_control_exchange=glance - - -# -# Options defined in ceilometer.network.notifications -# - -# Exchange name for Neutron notifications. (string value) -# Deprecated group/name - [DEFAULT]/quantum_control_exchange -#neutron_control_exchange=neutron - - -# -# Options defined in ceilometer.objectstore.swift -# - -# Swift reseller prefix. Must be on par with reseller_prefix -# in proxy-server.conf. (string value) -#reseller_prefix=AUTH_ - - -# -# Options defined in ceilometer.openstack.common.eventlet_backdoor -# - -# Enable eventlet backdoor. Acceptable values are 0, , -# and :, where 0 results in listening on a random -# tcp port number; results in listening on the -# specified port number (and not enabling backdoor if that -# port is in use); and : results in listening on -# the smallest unused port number within the specified range -# of port numbers. The chosen port is displayed in the -# service's log file. (string value) -#backdoor_port= - - -# -# Options defined in ceilometer.openstack.common.lockutils -# - -# Enables or disables inter-process locks. (boolean value) -#disable_process_locking=false - -# Directory to use for lock files. (string value) -#lock_path= - - -# -# Options defined in ceilometer.openstack.common.log -# - -# Print debugging output (set logging level to DEBUG instead -# of default WARNING level). (boolean value) -#debug=false - -# Print more verbose output (set logging level to INFO instead -# of default WARNING level). (boolean value) -#verbose=false - -# Log output to standard error. (boolean value) -#use_stderr=true - -# Format string to use for log messages with context. (string -# value) -#logging_context_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [%(request_id)s %(user_identity)s] %(instance)s%(message)s - -# Format string to use for log messages without context. -# (string value) -#logging_default_format_string=%(asctime)s.%(msecs)03d %(process)d %(levelname)s %(name)s [-] %(instance)s%(message)s - -# Data to append to log format when level is DEBUG. (string -# value) -#logging_debug_format_suffix=%(funcName)s %(pathname)s:%(lineno)d - -# Prefix each line of exception output with this format. -# (string value) -#logging_exception_prefix=%(asctime)s.%(msecs)03d %(process)d TRACE %(name)s %(instance)s - -# List of logger=LEVEL pairs. (list value) -#default_log_levels=amqp=WARN,amqplib=WARN,boto=WARN,qpid=WARN,sqlalchemy=WARN,suds=INFO,oslo.messaging=INFO,iso8601=WARN,requests.packages.urllib3.connectionpool=WARN - -# Enables or disables publication of error events. (boolean -# value) -#publish_errors=false - -# Enables or disables fatal status of deprecations. (boolean -# value) -#fatal_deprecations=false - -# The format for an instance that is passed with the log -# message. (string value) -#instance_format="[instance: %(uuid)s] " - -# The format for an instance UUID that is passed with the log -# message. (string value) -#instance_uuid_format="[instance: %(uuid)s] " - -# The name of a logging configuration file. This file is -# appended to any existing logging configuration files. For -# details about logging configuration files, see the Python -# logging module documentation. (string value) -# Deprecated group/name - [DEFAULT]/log_config -#log_config_append= - -# DEPRECATED. A logging.Formatter log message format string -# which may use any of the available logging.LogRecord -# attributes. This option is deprecated. Please use -# logging_context_format_string and -# logging_default_format_string instead. (string value) -#log_format= - -# Format string for %%(asctime)s in log records. Default: -# %(default)s . (string value) -#log_date_format=%Y-%m-%d %H:%M:%S - -# (Optional) Name of log file to output to. If no default is -# set, logging will go to stdout. (string value) -# Deprecated group/name - [DEFAULT]/logfile -#log_file= - -# (Optional) The base directory used for relative --log-file -# paths. (string value) -# Deprecated group/name - [DEFAULT]/logdir -#log_dir= - -# Use syslog for logging. Existing syslog format is DEPRECATED -# during I, and will change in J to honor RFC5424. (boolean -# value) -#use_syslog=false - -# (Optional) Enables or disables syslog rfc5424 format for -# logging. If enabled, prefixes the MSG part of the syslog -# message with APP-NAME (RFC5424). The format without the APP- -# NAME is deprecated in I, and will be removed in J. (boolean -# value) -#use_syslog_rfc_format=false - -# Syslog facility to receive log lines. (string value) -#syslog_log_facility=LOG_USER - - -# -# Options defined in ceilometer.openstack.common.middleware.sizelimit -# - -# The maximum body size for each request, in bytes. (integer -# value) -# Deprecated group/name - [DEFAULT]/osapi_max_request_body_size -#max_request_body_size=114688 - - -# -# Options defined in ceilometer.openstack.common.policy -# - -# The JSON file that defines policies. (string value) -#policy_file=policy.json - -# Default rule. Enforced when a requested rule is not found. -# (string value) -#policy_default_rule=default - - -# -# Options defined in ceilometer.orchestration.notifications -# - -# Exchange name for Heat notifications (string value) -#heat_control_exchange=heat - - -# -# Options defined in ceilometer.storage -# - -# DEPRECATED - Database connection string. (string value) -#database_connection= - - -# -# Options defined in ceilometer.volume.notifications -# - -# Exchange name for Cinder notifications. (string value) -#cinder_control_exchange=cinder - - -[alarm] - -# -# Options defined in ceilometer.cli -# - -# Class to launch as alarm evaluation service. (string value) -#evaluation_service=ceilometer.alarm.service.SingletonAlarmService - - -# -# Options defined in ceilometer.alarm.notifier.rest -# - -# SSL Client certificate for REST notifier. (string value) -#rest_notifier_certificate_file= - -# SSL Client private key for REST notifier. (string value) -#rest_notifier_certificate_key= - -# Whether to verify the SSL Server certificate when calling -# alarm action. (boolean value) -#rest_notifier_ssl_verify=true - - -# -# Options defined in ceilometer.alarm.rpc -# - -# The topic that ceilometer uses for alarm notifier messages. -# (string value) -#notifier_rpc_topic=alarm_notifier - -# The topic that ceilometer uses for alarm partition -# coordination messages. (string value) -#partition_rpc_topic=alarm_partition_coordination - - -# -# Options defined in ceilometer.alarm.service -# - -# Period of evaluation cycle, should be >= than configured -# pipeline interval for collection of underlying metrics. -# (integer value) -# Deprecated group/name - [alarm]/threshold_evaluation_interval -#evaluation_interval=60 - - -# -# Options defined in ceilometer.api.controllers.v2 -# - -# Record alarm change events. (boolean value) -#record_history=true - - -[api] - -# -# Options defined in ceilometer.api -# - -# The port for the ceilometer API server. (integer value) -# Deprecated group/name - [DEFAULT]/metering_api_port -#port=8777 - -# The listen IP for the ceilometer API server. (string value) -#host=0.0.0.0 - -# Set it to False if your environment does not need or have -# dns server, otherwise it will delay the response from api. -# (boolean value) -#enable_reverse_dns_lookup=false - - -[collector] - -# -# Options defined in ceilometer.collector -# - -# Address to which the UDP socket is bound. Set to an empty -# string to disable. (string value) -#udp_address=0.0.0.0 - -# Port to which the UDP socket is bound. (integer value) -#udp_port=4952 - - -[database] - -# -# Options defined in ceilometer.openstack.common.db.options -# - -# The file name to use with SQLite (string value) -#sqlite_db=ceilometer.sqlite - -# If True, SQLite uses synchronous mode (boolean value) -#sqlite_synchronous=true - -# The backend to use for db (string value) -# Deprecated group/name - [DEFAULT]/db_backend -#backend=sqlalchemy - -# The SQLAlchemy connection string used to connect to the -# database (string value) -# Deprecated group/name - [DEFAULT]/sql_connection -# Deprecated group/name - [DATABASE]/sql_connection -# Deprecated group/name - [sql]/connection -#connection= - -# The SQL mode to be used for MySQL sessions. This option, -# including the default, overrides any server-set SQL mode. To -# use whatever SQL mode is set by the server configuration, -# set this to no value. Example: mysql_sql_mode= (string -# value) -#mysql_sql_mode=TRADITIONAL - -# Timeout before idle sql connections are reaped (integer -# value) -# Deprecated group/name - [DEFAULT]/sql_idle_timeout -# Deprecated group/name - [DATABASE]/sql_idle_timeout -# Deprecated group/name - [sql]/idle_timeout -#idle_timeout=3600 - -# Minimum number of SQL connections to keep open in a pool -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_min_pool_size -# Deprecated group/name - [DATABASE]/sql_min_pool_size -#min_pool_size=1 - -# Maximum number of SQL connections to keep open in a pool -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_pool_size -# Deprecated group/name - [DATABASE]/sql_max_pool_size -#max_pool_size= - -# Maximum db connection retries during startup. (setting -1 -# implies an infinite retry count) (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_retries -# Deprecated group/name - [DATABASE]/sql_max_retries -#max_retries=10 - -# Interval between retries of opening a sql connection -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_retry_interval -# Deprecated group/name - [DATABASE]/reconnect_interval -#retry_interval=10 - -# If set, use this value for max_overflow with sqlalchemy -# (integer value) -# Deprecated group/name - [DEFAULT]/sql_max_overflow -# Deprecated group/name - [DATABASE]/sqlalchemy_max_overflow -#max_overflow= - -# Verbosity of SQL debugging information. 0=None, -# 100=Everything (integer value) -# Deprecated group/name - [DEFAULT]/sql_connection_debug -#connection_debug=0 - -# Add python stack traces to SQL as comment strings (boolean -# value) -# Deprecated group/name - [DEFAULT]/sql_connection_trace -#connection_trace=false - -# If set, use this value for pool_timeout with sqlalchemy -# (integer value) -# Deprecated group/name - [DATABASE]/sqlalchemy_pool_timeout -#pool_timeout= - -# Enable the experimental use of database reconnect on -# connection lost (boolean value) -#use_db_reconnect=false - -# seconds between db connection retries (integer value) -#db_retry_interval=1 - -# Whether to increase interval between db connection retries, -# up to db_max_retry_interval (boolean value) -#db_inc_retry_interval=true - -# max seconds between db connection retries, if -# db_inc_retry_interval is enabled (integer value) -#db_max_retry_interval=10 - -# maximum db connection retries before error is raised. -# (setting -1 implies an infinite retry count) (integer value) -#db_max_retries=20 - - -# -# Options defined in ceilometer.storage -# - -# Number of seconds that samples are kept in the database for -# (<= 0 means forever). (integer value) -#time_to_live=-1 - - -[dispatcher_file] - -# -# Options defined in ceilometer.dispatcher.file -# - -# Name and the location of the file to record meters. (string -# value) -#file_path= - -# The max size of the file. (integer value) -#max_bytes=0 - -# The max number of the files to keep. (integer value) -#backup_count=0 - - -[event] - -# -# Options defined in ceilometer.event.converter -# - -# Configuration file for event definitions. (string value) -#definitions_cfg_file=event_definitions.yaml - -# Drop notifications if no event definition matches. -# (Otherwise, we convert them with just the default traits) -# (boolean value) -#drop_unmatched_notifications=false - - -[keystone_authtoken] - -# -# Options defined in keystoneclient.middleware.auth_token -# - -# Prefix to prepend at the beginning of the path. Deprecated, -# use identity_uri. (string value) -#auth_admin_prefix= - -# Host providing the admin Identity API endpoint. Deprecated, -# use identity_uri. (string value) -#auth_host=127.0.0.1 - -# Port of the admin Identity API endpoint. Deprecated, use -# identity_uri. (integer value) -#auth_port=35357 - -# Protocol of the admin Identity API endpoint (http or https). -# Deprecated, use identity_uri. (string value) -#auth_protocol=https - -# Complete public Identity API endpoint (string value) -#auth_uri= - -# Complete admin Identity API endpoint. This should specify -# the unversioned root endpoint e.g. https://localhost:35357/ -# (string value) -#identity_uri= - -# API version of the admin Identity API endpoint (string -# value) -#auth_version= - -# Do not handle authorization requests within the middleware, -# but delegate the authorization decision to downstream WSGI -# components (boolean value) -#delay_auth_decision=false - -# Request timeout value for communicating with Identity API -# server. (boolean value) -#http_connect_timeout= - -# How many times are we trying to reconnect when communicating -# with Identity API Server. (integer value) -#http_request_max_retries=3 - -# This option is deprecated and may be removed in a future -# release. Single shared secret with the Keystone -# configuration used for bootstrapping a Keystone -# installation, or otherwise bypassing the normal -# authentication process. This option should not be used, use -# `admin_user` and `admin_password` instead. (string value) -#admin_token= - -# Keystone account username (string value) -#admin_user= - -# Keystone account password (string value) -#admin_password= - -# Keystone service account tenant name to validate user tokens -# (string value) -#admin_tenant_name=admin - -# Env key for the swift cache (string value) -#cache= - -# Required if Keystone server requires client certificate -# (string value) -#certfile= - -# Required if Keystone server requires client certificate -# (string value) -#keyfile= - -# A PEM encoded Certificate Authority to use when verifying -# HTTPs connections. Defaults to system CAs. (string value) -#cafile= - -# Verify HTTPS connections. (boolean value) -#insecure=false - -# Directory used to cache files related to PKI tokens (string -# value) -#signing_dir= - -# Optionally specify a list of memcached server(s) to use for -# caching. If left undefined, tokens will instead be cached -# in-process. (list value) -# Deprecated group/name - [DEFAULT]/memcache_servers -#memcached_servers= - -# In order to prevent excessive effort spent validating -# tokens, the middleware caches previously-seen tokens for a -# configurable duration (in seconds). Set to -1 to disable -# caching completely. (integer value) -#token_cache_time=300 - -# Determines the frequency at which the list of revoked tokens -# is retrieved from the Identity service (in seconds). A high -# number of revocation events combined with a low cache -# duration may significantly reduce performance. (integer -# value) -#revocation_cache_time=10 - -# (optional) if defined, indicate whether token data should be -# authenticated or authenticated and encrypted. Acceptable -# values are MAC or ENCRYPT. If MAC, token data is -# authenticated (with HMAC) in the cache. If ENCRYPT, token -# data is encrypted and authenticated in the cache. If the -# value is not one of these options or empty, auth_token will -# raise an exception on initialization. (string value) -#memcache_security_strategy= - -# (optional, mandatory if memcache_security_strategy is -# defined) this string is used for key derivation. (string -# value) -#memcache_secret_key= - -# (optional) indicate whether to set the X-Service-Catalog -# header. If False, middleware will not ask for service -# catalog on token validation and will not set the X-Service- -# Catalog header. (boolean value) -#include_service_catalog=true - -# Used to control the use and type of token binding. Can be -# set to: "disabled" to not check token binding. "permissive" -# (default) to validate binding information if the bind type -# is of a form known to the server and ignore it if not. -# "strict" like "permissive" but if the bind type is unknown -# the token will be rejected. "required" any form of token -# binding is needed to be allowed. Finally the name of a -# binding method that must be present in tokens. (string -# value) -#enforce_token_bind=permissive - -# If true, the revocation list will be checked for cached -# tokens. This requires that PKI tokens are configured on the -# Keystone server. (boolean value) -#check_revocations_for_cached=false - -# Hash algorithms to use for hashing PKI tokens. This may be a -# single algorithm or multiple. The algorithms are those -# supported by Python standard hashlib.new(). The hashes will -# be tried in the order given, so put the preferred one first -# for performance. The result of the first hash will be stored -# in the cache. This will typically be set to multiple values -# only while migrating from a less secure algorithm to a more -# secure one. Once all the old tokens are expired this option -# should be set to a single value for better performance. -# (list value) -#hash_algorithms=md5 - - -[matchmaker_ring] - -# -# Options defined in oslo.messaging -# - -# Matchmaker ring file (JSON). (string value) -# Deprecated group/name - [DEFAULT]/matchmaker_ringfile -#ringfile=/etc/oslo/matchmaker_ring.json - - -[notification] - -# -# Options defined in ceilometer.notification -# - -# Acknowledge message when event persistence fails. (boolean -# value) -#ack_on_event_error=true - -# Save event details. (boolean value) -#store_events=false - -# Messaging URLs to listen for notifications. Example: -# transport://user:pass@host1:port[,hostN:portN]/virtual_host -# (DEFAULT/transport_url is used if empty) (multi valued) -#messaging_urls= - - -[publisher] - -# -# Options defined in ceilometer.publisher.utils -# - -# Secret value for signing metering messages. (string value) -# Deprecated group/name - [DEFAULT]/metering_secret -# Deprecated group/name - [publisher_rpc]/metering_secret -#metering_secret=change this or be hacked - - -[publisher_rpc] - -# -# Options defined in ceilometer.publisher.rpc -# - -# The topic that ceilometer uses for metering messages. -# (string value) -#metering_topic=metering - - -[service_credentials] - -# -# Options defined in ceilometer.service -# - -# User name to use for OpenStack service access. (string -# value) -#os_username=ceilometer - -# Password to use for OpenStack service access. (string value) -#os_password=admin - -# Tenant ID to use for OpenStack service access. (string -# value) -#os_tenant_id= - -# Tenant name to use for OpenStack service access. (string -# value) -#os_tenant_name=admin - -# Certificate chain for SSL validation. (string value) -#os_cacert= - -# Auth URL to use for OpenStack service access. (string value) -#os_auth_url=http://localhost:5000/v2.0 - -# Region name to use for OpenStack service endpoints. (string -# value) -#os_region_name= - -# Type of endpoint in Identity service catalog to use for -# communication with OpenStack services. (string value) -#os_endpoint_type=publicURL - -# Disables X.509 certificate validation when an SSL connection -# to Identity Service is established. (boolean value) -#insecure=false - - -[vmware] - -# -# Options defined in ceilometer.compute.virt.vmware.inspector -# - -# IP address of the VMware Vsphere host (string value) -#host_ip= - -# Username of VMware Vsphere (string value) -#host_username= - -# Password of VMware Vsphere (string value) -#host_password= - -# Number of times a VMware Vsphere API must be retried -# (integer value) -#api_retry_count=10 - -# Sleep time in seconds for polling an ongoing async task -# (floating point value) -#task_poll_interval=0.5 - -# Optional vim service WSDL location e.g -# http:///vimService.wsdl. Optional over-ride to -# default location for bug work-arounds (string value) -#wsdl_location= - - diff --git a/rpm/SOURCES/openstack-ceilometer-alarm-evaluator.service b/rpm/SOURCES/openstack-ceilometer-alarm-evaluator.service new file mode 100644 index 0000000..1b0e961 --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-alarm-evaluator.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer alarm evaluation service +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-alarm-evaluator --logfile /var/log/ceilometer/alarm-evaluator.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-alarm-notifier.service b/rpm/SOURCES/openstack-ceilometer-alarm-notifier.service new file mode 100644 index 0000000..7f8aa7b --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-alarm-notifier.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer alarm notification service +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-alarm-notifier --logfile /var/log/ceilometer/alarm-notifier.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-api.service b/rpm/SOURCES/openstack-ceilometer-api.service new file mode 100644 index 0000000..1c55e56 --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-api.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer API service +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-api --logfile /var/log/ceilometer/api.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-central.service b/rpm/SOURCES/openstack-ceilometer-central.service new file mode 100644 index 0000000..5a8a06b --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-central.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer central agent +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-agent-central --logfile /var/log/ceilometer/central.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-collector.service b/rpm/SOURCES/openstack-ceilometer-collector.service new file mode 100644 index 0000000..314146a --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-collector.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer collection service +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-collector --logfile /var/log/ceilometer/collector.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-compute.service b/rpm/SOURCES/openstack-ceilometer-compute.service new file mode 100644 index 0000000..db44e03 --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-compute.service @@ -0,0 +1,13 @@ + +[Unit] +Description=OpenStack ceilometer compute agent +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-agent-compute --logfile /var/log/ceilometer/compute.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-ipmi.init b/rpm/SOURCES/openstack-ceilometer-ipmi.init new file mode 100644 index 0000000..70aead2 --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-ipmi.init @@ -0,0 +1,102 @@ +#!/bin/sh +# +# openstack-ceilometer-ipmi OpenStack ceilometer ipmi agent +# +# chkconfig: - 98 02 +# description: OpenStack measurement and collection agent ipmi service + +### BEGIN INIT INFO +# Provides: +# Required-Start: $remote_fs $network $syslog +# Required-Stop: $remote_fs $syslog +# Default-Stop: 0 1 6 +# Short-Description: OpenStack ceilometer agent ipmi service +# Description: OpenStack measurement collection agent ipmi service +### END INIT INFO + +. /etc/rc.d/init.d/functions + +suffix=agent-ipmi +prog=openstack-ceilometer-$suffix +exec="/usr/bin/ceilometer-$suffix" +config="/etc/ceilometer/ceilometer.conf" +pidfile="/var/run/ceilometer/ceilometer-$suffix.pid" +logfile="/var/log/ceilometer/$suffix.log" + +[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog + +lockfile=/var/lock/subsys/$prog + +start() { + [ -x $exec ] || exit 5 + [ -f $config ] || exit 6 + echo -n $"Starting $prog: " + daemon --user ceilometer --pidfile $pidfile "$exec --logfile $logfile &>/dev/null & echo \$! > $pidfile" + retval=$? + echo + [ $retval -eq 0 ] && touch $lockfile + return $retval +} + +stop() { + echo -n $"Stopping $prog: " + killproc -p $pidfile $prog + retval=$? + echo + [ $retval -eq 0 ] && rm -f $lockfile + return $retval +} + +restart() { + stop + start +} + +reload() { + restart +} + +force_reload() { + restart +} + +rh_status() { + status -p $pidfile $prog +} + +rh_status_q() { + rh_status >/dev/null 2>&1 +} + + +case "$1" in + start) + rh_status_q && exit 0 + $1 + ;; + stop) + rh_status_q || exit 0 + $1 + ;; + restart) + $1 + ;; + reload) + rh_status_q || exit 7 + $1 + ;; + force-reload) + force_reload + ;; + status) + rh_status + ;; + condrestart|try-restart) + rh_status_q || exit 0 + restart + ;; + *) + echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}" + exit 2 +esac +exit $? diff --git a/rpm/SOURCES/openstack-ceilometer-ipmi.service b/rpm/SOURCES/openstack-ceilometer-ipmi.service new file mode 100644 index 0000000..918db67 --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-ipmi.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer ipmi agent +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-agent-ipmi --logfile /var/log/ceilometer/agent-ipmi.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SOURCES/openstack-ceilometer-ipmi.upstart b/rpm/SOURCES/openstack-ceilometer-ipmi.upstart new file mode 100644 index 0000000..ddf491b --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-ipmi.upstart @@ -0,0 +1,8 @@ +description "OpenStack Ceilometer ipmi agent" + +start on stopped rc RUNLEVEL=[2345] +stop on runlevel [S016] + +respawn + +exec su -s /bin/sh -c "exec /usr/bin/ceilometer-agent-ipmi --logfile /var/log/ceilometer/agent-ipmi.log" ceilometer diff --git a/rpm/SOURCES/openstack-ceilometer-notification.service b/rpm/SOURCES/openstack-ceilometer-notification.service new file mode 100644 index 0000000..32ad3fb --- /dev/null +++ b/rpm/SOURCES/openstack-ceilometer-notification.service @@ -0,0 +1,12 @@ +[Unit] +Description=OpenStack ceilometer notification agent +After=syslog.target network.target + +[Service] +Type=simple +User=ceilometer +ExecStart=/usr/bin/ceilometer-agent-notification --logfile /var/log/ceilometer/agent-notification.log + +[Install] +WantedBy=multi-user.target + diff --git a/rpm/SPECS/openstack-ceilometer.spec b/rpm/SPECS/openstack-ceilometer.spec index 733f1de..88bac79 100644 --- a/rpm/SPECS/openstack-ceilometer.spec +++ b/rpm/SPECS/openstack-ceilometer.spec @@ -3,7 +3,7 @@ %global pypi_name ceilometer Name: openstack-ceilometer -Version: 2014.2.b1 +Version: 2015.1.0b1 Release: 2%{?dist} Summary: OpenStack measurement collection service @@ -13,8 +13,9 @@ URL: https://wiki.openstack.org/wiki/Ceilometer Source0: http://tarballs.openstack.org/%{pypi_name}/%{pypi_name}-%{version}.tar.gz Source1: %{pypi_name}-dist.conf Source2: %{pypi_name}.logrotate -Source3: %{pypi_name}.conf.sample +Source3: ceilometer-rootwrap-sudoers +%if 0%{?rhel} && 0%{?rhel} <= 6 Source10: %{name}-api.init Source100: %{name}-api.upstart Source11: %{name}-collector.init @@ -29,6 +30,18 @@ Source15: %{name}-alarm-evaluator.init Source150: %{name}-alarm-evaluator.upstart Source16: %{name}-notification.init Source160: %{name}-notification.upstart +Source17: %{name}-ipmi.init +Source170: %{name}-ipmi.upstart +%else +Source10: %{name}-api.service +Source11: %{name}-collector.service +Source12: %{name}-compute.service +Source13: %{name}-central.service +Source14: %{name}-alarm-notifier.service +Source15: %{name}-alarm-evaluator.service +Source16: %{name}-notification.service +Source17: %{name}-ipmi.service +%endif # # patches_base=2014.1.1 @@ -41,13 +54,21 @@ BuildRequires: python-setuptools BuildRequires: python-pbr BuildRequires: python-d2to1 BuildRequires: python2-devel - BuildRequires: openstack-utils +# These are required to generate ceilometer configuration file +BuildRequires: python-tox +BuildRequires: python-oslo-db +BuildRequires: python-oslo-messaging +BuildRequires: python-keystonemiddleware + # These are required to build due to the requirements check added BuildRequires: python-sqlalchemy -BuildRequires: python-webob1.2 +BuildRequires: python-webob +%if ! (0%{?rhel} && 0%{?rhel} <= 6) +BuildRequires: systemd-units +%endif %description OpenStack ceilometer provides services to measure and @@ -88,6 +109,7 @@ Requires: python-migrate >= 0.9.1, python-migrate < 0.9.2, python-migrat Requires: python-webob >= 1.2.3 +Requires: python-oslo-concurrency >= 0.4.0 Requires: python-oslo-config >= 1:1.4.0 Requires: python-oslo-db >= 1.0.0 Requires: python-oslo-rootwrap >= 1.3.0 @@ -133,12 +155,17 @@ Group: Applications/System Requires: python-ceilometer = %{version}-%{release} Requires: openstack-utils +%if 0%{?rhel} && 0%{?rhel} <= 6 Requires(post): chkconfig Requires(postun): initscripts Requires(preun): chkconfig +%else +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units +%endif Requires(pre): shadow-utils - %description common OpenStack ceilometer provides services to measure and collect metrics from OpenStack components. @@ -224,10 +251,13 @@ Group: Applications/System Requires: %{name}-common = %{version}-%{release} +Requires: python-keystonemiddleware +Requires: python-oslo-db Requires: python-pymongo Requires: python-flask Requires: python-wsme >= 0.6 Requires: python-pecan >= 0.5.0 +Requires: python-paste-deploy %description api OpenStack ceilometer provides services to measure and @@ -251,6 +281,28 @@ This package contains the ceilometer alarm notification and evaluation services. +%package ipmi +Summary: OpenStack ceilometer ipmi agent +Group: Applications/System + +Requires: %{name}-common = %{version}-%{release} + +Requires: python-novaclient +Requires: python-keystoneclient +Requires: python-neutronclient +Requires: python-tooz +Requires: python-oslo-rootwrap +Requires: ipmitool + +%description ipmi +OpenStack ceilometer provides services to measure and +collect metrics from OpenStack components. + +This package contains the ipmi agent to be run on OpenStack +nodes from which IPMI sensor data is to be collected directly, +by-passing Ironic's management of baremetal. + + %if 0%{?with_doc} %package doc Summary: Documentation for OpenStack ceilometer @@ -303,6 +355,13 @@ rm -fr build/html/.doctrees build/html/.buildinfo popd +# Genenrate ceilometer.conf.sample +oslo-config-generator --output-file etc/ceilometer/ceilometer.conf.sample \ + --namespace ceilometer \ + --namespace oslo.db \ + --namespace oslo.messaging \ + --namespace keystonemiddleware.auth_token + # Setup directories install -d -m 755 %{buildroot}%{_sharedstatedir}/ceilometer install -d -m 755 %{buildroot}%{_sharedstatedir}/ceilometer/tmp @@ -310,14 +369,20 @@ install -d -m 755 %{buildroot}%{_localstatedir}/log/ceilometer # Install config files install -d -m 755 %{buildroot}%{_sysconfdir}/ceilometer +install -d -m 755 %{buildroot}%{_sysconfdir}/ceilometer/rootwrap.d +install -d -m 755 %{buildroot}%{_sysconfdir}/sudoers.d install -p -D -m 640 %{SOURCE1} %{buildroot}%{_datadir}/ceilometer/ceilometer-dist.conf -install -p -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/ceilometer/ceilometer.conf +install -p -D -m 640 %{SOURCE3} %{buildroot}%{_sysconfdir}/sudoers.d/ceilometer +install -p -D -m 640 etc/ceilometer/ceilometer.conf.sample %{buildroot}%{_sysconfdir}/ceilometer/ceilometer.conf install -p -D -m 640 etc/ceilometer/policy.json %{buildroot}%{_sysconfdir}/ceilometer/policy.json install -p -D -m 640 etc/ceilometer/pipeline.yaml %{buildroot}%{_sysconfdir}/ceilometer/pipeline.yaml install -p -D -m 640 etc/ceilometer/event_definitions.yaml %{buildroot}%{_sysconfdir}/ceilometer/event_definitions.yaml install -p -D -m 640 etc/ceilometer/api_paste.ini %{buildroot}%{_sysconfdir}/ceilometer/api_paste.ini +install -p -D -m 640 etc/ceilometer/rootwrap.conf %{buildroot}%{_sysconfdir}/ceilometer/rootwrap.conf +install -p -D -m 640 etc/ceilometer/rootwrap.d/ipmi.filters %{buildroot}/%{_sysconfdir}/ceilometer/rootwrap.d/ipmi.filters # Install initscripts for services +%if 0%{?rhel} && 0%{?rhel} <= 6 install -p -D -m 755 %{SOURCE10} %{buildroot}%{_initrddir}/%{name}-api install -p -D -m 755 %{SOURCE11} %{buildroot}%{_initrddir}/%{name}-collector install -p -D -m 755 %{SOURCE12} %{buildroot}%{_initrddir}/%{name}-compute @@ -325,6 +390,7 @@ install -p -D -m 755 %{SOURCE13} %{buildroot}%{_initrddir}/%{name}-central install -p -D -m 755 %{SOURCE14} %{buildroot}%{_initrddir}/%{name}-alarm-notifier install -p -D -m 755 %{SOURCE15} %{buildroot}%{_initrddir}/%{name}-alarm-evaluator install -p -D -m 755 %{SOURCE16} %{buildroot}%{_initrddir}/%{name}-notification +install -p -D -m 755 %{SOURCE17} %{buildroot}%{_initrddir}/%{name}-ipmi # Install upstart jobs examples install -d -m 755 %{buildroot}%{_datadir}/ceilometer @@ -335,12 +401,25 @@ install -p -m 644 %{SOURCE130} %{buildroot}%{_datadir}/ceilometer/ install -p -m 644 %{SOURCE140} %{buildroot}%{_datadir}/ceilometer/ install -p -m 644 %{SOURCE150} %{buildroot}%{_datadir}/ceilometer/ install -p -m 644 %{SOURCE160} %{buildroot}%{_datadir}/ceilometer/ +install -p -m 644 %{SOURCE170} %{buildroot}%{_datadir}/ceilometer/ +%else +install -p -D -m 644 %{SOURCE10} %{buildroot}%{_unitdir}/%{name}-api.service +install -p -D -m 644 %{SOURCE11} %{buildroot}%{_unitdir}/%{name}-collector.service +install -p -D -m 644 %{SOURCE12} %{buildroot}%{_unitdir}/%{name}-compute.service +install -p -D -m 644 %{SOURCE13} %{buildroot}%{_unitdir}/%{name}-central.service +install -p -D -m 644 %{SOURCE14} %{buildroot}%{_unitdir}/%{name}-alarm-notifier.service +install -p -D -m 644 %{SOURCE15} %{buildroot}%{_unitdir}/%{name}-alarm-evaluator.service +install -p -D -m 644 %{SOURCE16} %{buildroot}%{_unitdir}/%{name}-notification.service +install -p -D -m 644 %{SOURCE17} %{buildroot}%{_unitdir}/%{name}-ipmi.service +%endif # Install logrotate install -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/logrotate.d/%{name} +%if 0%{?rhel} && 0%{?rhel} <= 6 # Install pid directory install -d -m 755 %{buildroot}%{_localstatedir}/run/ceilometer +%endif # Remove unneeded in production stuff rm -f %{buildroot}%{_bindir}/ceilometer-debug @@ -358,140 +437,247 @@ fi exit 0 %post compute +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 1 ] ; then # Initial installation /sbin/chkconfig --add %{name}-compute fi +%else +%systemd_post %{name}-compute.service +%endif %post collector +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 1 ] ; then # Initial installation /sbin/chkconfig --add %{name}-collector fi +%else +%systemd_post %{name}-collector.service +%endif %post notification +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 1 ] ; then # Initial installation /sbin/chkconfig --add %{name}-notification fi +%else +%systemd_post %{name}-notification.service +%endif %post api +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 1 ] ; then # Initial installation /sbin/chkconfig --add %{name}-api fi +%else +%systemd_post %{name}-api.service +%endif %post central +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 1 ] ; then # Initial installation /sbin/chkconfig --add %{name}-central fi +%else +%systemd_post %{name}-central.service +%endif + %post alarm +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 1 ] ; then # Initial installation for svc in alarm-notifier alarm-evaluator; do /sbin/chkconfig --add %{name}-${svc} done fi +%else +%systemd_post %{name}-alarm-notifier.service %{name}-alarm-evaluator.service +%endif + +%post ipmi +%if 0%{?rhel} && 0%{?rhel} <= 6 +if [ $1 -eq 1 ] ; then + # Initial installation + /sbin/chkconfig --add %{name}-ipmi +fi +%else +%systemd_post %{name}-alarm-ipmi.service +%endif %preun compute +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 0 ] ; then for svc in compute; do /sbin/service %{name}-${svc} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name}-${svc} done fi +%else +%systemd_preun %{name}-compute.service +%endif %preun collector +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 0 ] ; then for svc in collector; do /sbin/service %{name}-${svc} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name}-${svc} done fi +%else +%systemd_preun %{name}-collector.service +%endif %preun notification +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 0 ] ; then for svc in notification; do /sbin/service %{name}-${svc} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name}-${svc} done fi +%else +%systemd_preun %{name}-notification.service +%endif %preun api +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 0 ] ; then for svc in api; do /sbin/service %{name}-${svc} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name}-${svc} done fi +%else +%systemd_preun %{name}-api.service +%endif %preun central +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 0 ] ; then for svc in central; do /sbin/service %{name}-${svc} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name}-${svc} done fi +%else +%systemd_preun %{name}-central.service +%endif + %preun alarm +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -eq 0 ] ; then for svc in alarm-notifier alarm-evaluator; do /sbin/service %{name}-${svc} stop > /dev/null 2>&1 /sbin/chkconfig --del %{name}-${svc} done fi +%else +%systemd_preun %{name}-alarm-notifier.service %{name}-alarm-evaluator.service +%endif + +%preun ipmi +%if 0%{?rhel} && 0%{?rhel} <= 6 +if [ $1 -eq 0 ] ; then + for svc in ipmi; do + /sbin/service %{name}-${svc} stop > /dev/null 2>&1 + /sbin/chkconfig --del %{name}-${svc} + done +fi +%else +%systemd_preun %{name}-ipmi.service +%endif %postun compute +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall for svc in compute; do /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : done fi +%else +%systemd_postun_with_restart %{name}-compute.service +%endif %postun collector +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall for svc in collector; do /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : done fi +%else +%systemd_postun_with_restart %{name}-collector.service +%endif %postun notification +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall for svc in notification; do /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : done fi +%else +%systemd_postun_with_restart %{name}-notification.service +%endif %postun api +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall for svc in api; do /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : done fi +%else +%systemd_postun_with_restart %{name}-api.service +%endif %postun central +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall for svc in central; do /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : done fi +%else +%systemd_postun_with_restart %{name}-central.service +%endif + %postun alarm -/bin/systemctl daemon-reload >/dev/null 2>&1 || : +%if 0%{?rhel} && 0%{?rhel} <= 6 if [ $1 -ge 1 ] ; then # Package upgrade, not uninstall for svc in alarm-notifier alarm-evaluator; do /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : done fi +%else +%systemd_postun_with_restart %{name}-alarm-notifier.service %{name}-alarm-evaluator.service +%endif +%postun ipmi +%if 0%{?rhel} && 0%{?rhel} <= 6 +if [ $1 -ge 1 ] ; then + # Package upgrade, not uninstall + for svc in ipmi; do + /sbin/service %{name}-${svc} condrestart > /dev/null 2>&1 || : + done +fi +%else +%systemd_postun_with_restart %{name}-ipmi.service +%endif %files common %doc LICENSE @@ -505,13 +691,14 @@ fi %config(noreplace) %{_sysconfdir}/logrotate.d/%{name} %dir %attr(0755, ceilometer, root) %{_localstatedir}/log/ceilometer +%if 0%{?rhel} && 0%{?rhel} <= 6 %dir %attr(0755, ceilometer, root) %{_localstatedir}/run/ceilometer +%endif -%{_bindir}/ceilometer-agent-ipmi %{_bindir}/ceilometer-dbsync %{_bindir}/ceilometer-expirer -%{_bindir}/ceilometer-rootwrap %{_bindir}/ceilometer-send-sample +%{_bindir}/ceilometer-polling %defattr(-, ceilometer, ceilometer, -) @@ -532,44 +719,86 @@ fi %files compute %{_bindir}/ceilometer-agent-compute +%if 0%{?rhel} && 0%{?rhel} <= 6 %{_initrddir}/%{name}-compute %{_datarootdir}/ceilometer/%{name}-compute.upstart +%else +%{_unitdir}/%{name}-compute.service +%endif %files collector %{_bindir}/ceilometer-collector* +%if 0%{?rhel} && 0%{?rhel} <= 6 %{_initrddir}/%{name}-collector %{_datarootdir}/ceilometer/%{name}-collector.upstart +%else +%{_unitdir}/%{name}-collector.service +%endif %files notification %{_bindir}/ceilometer-agent-notification +%if 0%{?rhel} && 0%{?rhel} <= 6 %{_initrddir}/%{name}-notification %{_datarootdir}/ceilometer/%{name}-notification.upstart +%else +%{_unitdir}/%{name}-notification.service +%endif %files api %{_bindir}/ceilometer-api +%if 0%{?rhel} && 0%{?rhel} <= 6 %{_initrddir}/%{name}-api %{_datarootdir}/ceilometer/%{name}-api.upstart +%else +%{_unitdir}/%{name}-api.service +%endif %files central %{_bindir}/ceilometer-agent-central +%if 0%{?rhel} && 0%{?rhel} <= 6 %{_initrddir}/%{name}-central %{_datarootdir}/ceilometer/%{name}-central.upstart +%else +%{_unitdir}/%{name}-central.service +%endif + + +%files ipmi +%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/rootwrap.conf +%config(noreplace) %attr(-, root, ceilometer) %{_sysconfdir}/ceilometer/rootwrap.d/ipmi.filters +%{_bindir}/ceilometer-rootwrap +%{_bindir}/ceilometer-agent-ipmi +%{_sysconfdir}/sudoers.d/ceilometer +%if 0%{?rhel} && 0%{?rhel} <= 6 +%{_initrddir}/%{name}-ipmi +%{_datarootdir}/ceilometer/%{name}-ipmi.upstart +%else +%{_unitdir}/%{name}-ipmi.service +%endif %files alarm %{_bindir}/ceilometer-alarm-notifier %{_bindir}/ceilometer-alarm-evaluator +%if 0%{?rhel} && 0%{?rhel} <= 6 %{_initrddir}/%{name}-alarm-notifier %{_datarootdir}/ceilometer/%{name}-alarm-notifier.upstart %{_initrddir}/%{name}-alarm-evaluator %{_datarootdir}/ceilometer/%{name}-alarm-evaluator.upstart +%else +%{_unitdir}/%{name}-alarm-notifier.service +%{_unitdir}/%{name}-alarm-evaluator.service +%endif %changelog +* Wed Jan 21 2015 Ivan Berezovskiy - 2015.1.0b1 +- Update version to 2015.1.0b1 + * Wed Nov 19 2014 Daniil Trishkin - 2014.2 - Update to upstream 2014.2 - Update requirements diff --git a/tests/runtests.sh b/tests/runtests.sh index 82aadc1..50dd9f6 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -104,6 +104,8 @@ check_running() { case $package in ceilometer-api|openstack-ceilometer-api) + echo "Skip due to resolving oslo.middleware problem: ImportError: No module named middleware" + exit 0 prepare_config prepare_vm -- 2.32.3