Sebastien Badia [Tue, 20 Oct 2015 13:37:09 +0000 (15:37 +0200)]
db: Use postgresql lib class for psycopg package
This patch introduce the same design than mysql for postgresql
by requiring dedicated lib::python class instead of declaring
a new resource package within ceilometer module.
compile and compile.with_all_deps rpsec matchers make
a call to all facts, and especially the ec2 one (this fact, try
to make a connection on the IPv4 link-local for ec2 metadata which
is incompatible with webmock restrictions), this seems to produce
random errors with puppet 3.{3,4}.x and facter 1.7.6.
Emilien Macchi [Thu, 8 Oct 2015 21:37:08 +0000 (14:37 -0700)]
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.
Emilien Macchi [Fri, 2 Oct 2015 20:17:25 +0000 (16:17 -0400)]
auth: drop service dependency for Keystone_user_role
Drop service dependency for Keystone_user_role.
Without that patch, Ceilometer & Keystone running in WSGI will fail to compile
the catalog because a dependency cycle:
Anchor[keystone_started] => Keystone_user_role[ceilometer@services] =>
Service[ceilometer-api] => Service[httpd] => Anchor[keystone_started]
The dependency is not really useful because it does not prevent the
service to start.
wsgi: make sure eventlet process is stopped before httpd
When stopping Ceilometer API running eventlet (ceilometer-api service),
we need to make sure it's done *before* starting Apache.
Otherwise, there is a race condition where Apache could be started before
stopping the service, and what would lead to:
AH00072: make_sock: could not bind to address [::]:8777
AH00072: make_sock: could not bind to address 0.0.0.0:8777
no listening sockets available, shutting down
Apache fails to start.
This patch make sure we have the right orchestration in place.
This already exists in the db::sync class for all services tagged
with ceilometer-service. Removing it from here will allow the api
service on a HA controller where the dbsync isn't run.
Back in history, we tried to configure something in nova.conf which is
now managed by puppet-nova. It causes the module conflicting with
puppet-nova and makes Puppet runs not idempotent and nova.conf with
wrong parameters.
Update ceilometer::db class to match other module pattern
This review aims to update the ceilometer::db class to standardize it with the
other modules db classes[1][2]. It now offers the same parameters to customize database
connection behavior.
RDO:
This patch changes the repositories used to install OpenStack Liberty on
RDO by using CBS repositories and RDO trunk.
Here is the RDO roadmap that is suggested if we want to run Liberty:
From now until GA:
http://trunk.rdoproject.org/centos7-liberty/current/
http://cbs.centos.org/repos/cloud7-openstack-liberty-testing/x86_64/os/
http://cbs.centos.org/repos/cloud7-openstack-common-testing/x86_64/os/
After GA:
http://mirror.centos.org/centos/7/cloud/x86_64/openstack-liberty
Note about EPEL: deps from EPEL are rebuilt in CBS, so EPEL could be
disabled in the future.
UCA:
Since our recent discussion about Ubuntu packaging, we decided to bump
Ubuntu packaging to trusty-proposed/liberty so we can install Liberty in
a better shape than current situation (Staging repo). This patch
installs UCA liberty repository.
This variable is cast to a string to avoid validate_re() breaking, but
puppet-lint gives a warning for a string containing only a variable.
This disables the warning for this line only.
Emilien Macchi [Sun, 23 Aug 2015 14:36:58 +0000 (10:36 -0400)]
acceptance/eventlet: make sure apache is stopped
When testing upgrades, we have some cases where we apply the wsgi
manifest first and then eventlet. The problem is apache which is
started so ceilo-api cannot be started because ports are already in use.
So this patch installs Apache on eventlet manifest and makes sure
the service is stopped before trying to start ceilo-api with eventlet.
Yanis Guenane [Thu, 6 Aug 2015 11:05:21 +0000 (13:05 +0200)]
Reflect provider change in puppet-openstacklib
With the creation of the new openstack_config provider, some processing
that was done in ceilometer_config has been centralized in
openstack_config.
Impacted methods are :
* section
* setting
* separator
Also, this commit adds the fact that, when passing a specific string
(ensure_absent_val) the provider will behave as if ensure => absent was
specified. '<SERVICE DEFAULT>' is the default value for
ensure_absent_val.
The use case is the following :
ceilometer_config { 'DEFAULT/foo' : value => 'bar' } # will work as usual
ceilometer_config { 'DEFAULT/foo' : value => '<SERVICE DEFAULT>' } # will mean absent
Emilien Macchi [Sun, 16 Aug 2015 13:50:01 +0000 (09:50 -0400)]
acceptance: enable debug & verbosity for OpenStack logs
Enable debug & verbose when possible for OpenStack services logs, so we can read a maximum
of informations in Jenkins jobs logs and easily debug our eventual failures.
In order to standardize the way dbsync are run across our modules,
we create a new class ceilometer::db::sync.
This class will be included if sync_db is enabled.
By making this transition the ceilometer::db::sync can be returned
by the ENC.
A use case would be in an highly available environment, with 3 galera
nodes, include ceilometer::db on every node with sync_db set to false
and have the ENC return ceilometer::db::sync just for one node.
Emilien Macchi [Wed, 5 Aug 2015 02:36:47 +0000 (22:36 -0400)]
WSGI: make it work, and test it with acceptance
* Finalize httpd service name support in API class following
puppet-keystone model.
* Implement unit tests.
* Implement separated acceptance tests that deploy Ceilometer API in
WSGI.
This patch aims to finalize and validate we can deploy Ceilometer API in
WSGI with puppet-ceilometer.
Also that we can update from eventlet to WSGI (it's tested in our beaker jobs).
Yanis Guenane [Wed, 12 Aug 2015 07:45:38 +0000 (09:45 +0200)]
Rely on autorequire for config resource ordering
Currently we specify the ordering of config resources wherever it is
necessary based on the presence of the file it will write to, or the
presence of the package in charge of providing the file it will write
to.
Those kind of ordering can be specified directly at the resource level
using the autorequire mechanism. With this patch, any config resource
will make sure the package in charge of providing the file will be
installed first.
Sebastien Badia [Tue, 4 Aug 2015 13:37:05 +0000 (15:37 +0200)]
Initial msync run for all Puppet OpenStack modules
This patch is the initial modulesync run, it impact:
* gitignore: just a sync between projects
* gemfile:
- update and allow to setup facter version and gem source
- split beaker gems with a dedicated group
- switch to rspec-puppet 2.2.0
* rakefile:
- use the new syntax for lint configuration
- add a acceptance target
* acceptance:
- sync nodesets
* spec: added rspec coverage report
In order to be able to take an action after all the packages of the
module have been installed/updated or all the services have been
started/restarted, we set a 'ceilometer-package' and 'ceilometer-service'
tag for each package and service of this module.
At the moment, there is a generic openstack tag that is not specific
enough if one wants to take action upon a single module change.
Use case :
If an action needs to be taken after all the packages have been
installed or updated : Package <| tag == 'ceilometer-package' |> -> X
Javier Pena [Fri, 26 Jun 2015 12:40:33 +0000 (14:40 +0200)]
Simplify parameters for rpc_backend
It is not needed anymore to specify the whole python namespace
for the backends, and in Liberty this option is completely removed
(see https://review.openstack.org/189201).
This patch keeps backwards compatibility with the previous default
parameters.
Zuul-cloner's behavior is to clone the repository into a subdirectory
under a directory named for the repo namespace. Git's default behavior
is to just clone it directly into the present working directory. This
patch adds an argument to the git clone command to clone it into the
<namespace>/<repo name> directory, so that whether zuul-cloner or git
is used the repo ends up in the same directory relative to the PWD.
The final check during the prep stage, where `puppet module list` is
run so that its output can be used for debugging, should run on the
current host in the loop, not the first host in the array.
This patch updates the spec_helper_acceptance.rb file to use the common
module install script and Puppetfile from the new
openstack/puppet-openstack-integration repo. This will allow us to take
advantage of Zuul's Depends-On feature so that we can test changes
across multiple related modules. This is based on idea 1 from this
brainstorming session[1].
This will probably be abstracted out into a separate function or
eventually a separate gem so that it can be more easily shared across
the OpenStack modules and the Infra modules.
Mike Dorman [Mon, 22 Jun 2015 20:03:24 +0000 (14:03 -0600)]
Add support for RabbitMQ connection heartbeat
Kilo oslo.messaging added heartbeating support for RabbitMQ
connections. This patch adds support for this in Puppet modules
by managing the oslo_messaging_rabbit/heartbeat_timeout_threshold
and oslo_messaging_rabbit/heartbeat_rate settings.
Emilien Macchi [Tue, 30 Jun 2015 20:48:22 +0000 (16:48 -0400)]
Use beaker-puppet_install_helper to install puppet
When running with BEAKER_provision=no, the following happens:
In Trusty: beaker is running dpkg with '--force' option so even
if Puppet is already installed, the return code will be 0.
In CentOS: beaker is running 'rpm -ivh' the second time and since
the package is already here, the return code will be 1.
Using the new puppet install helper will abort installing puppet
if BEAKER_provision is no, so tests will continue as normal.
Xav Paice [Thu, 25 Jun 2015 03:28:12 +0000 (15:28 +1200)]
make crontab for expirer optional
This adds an 'enable_cron' switch to ceilometer::expirer, defaults to
true, so that if we want to configure the TTL but don't want to run the
expiry job via cron we don't have to.
Colleen Murphy [Fri, 26 Jun 2015 18:43:41 +0000 (11:43 -0700)]
Remove Contact info from README
As this is a community supported module, the contact info listed in the
README was inaccurate. To improve consistency with other modules and
reduce cruft, this patch removes the contact section of the README.
Contact information can be found on the wiki linked in the developer
documentation section.
Colleen Murphy [Fri, 26 Jun 2015 18:38:59 +0000 (11:38 -0700)]
Remove license from README
In fae87c07a6bc0b8b66651147405c4310ab528a74 the License file was
updated, and now the copy embedded in the README is inconsistent. This
patch removes the copy from the README since having it in its own file
is sufficient, and reducing duplication will prevent inconsistencies.
Colleen Murphy [Fri, 26 Jun 2015 18:29:22 +0000 (11:29 -0700)]
Split release notes into a CHANGELOG.md file
This patch splits out release notes into a separate dedicated file for
consistency with the puppetlabs puppet modules. Additionally, this
patch improves the release notes by:
- Fixing the tense to be consistent with commit message standards ("Add
new feature" instead of "Added new feature" or "Adds new feature")
- Breaking up changes into categories to make it easier for operators
to know what happened in the change: backwards-incompatible changes,
features, bugfixes, and maintenance commits
- Linewrapping to 80 chars
- Adding release dates, formatted according to ISO-8601
Sebastien Badia [Wed, 24 Jun 2015 17:11:00 +0000 (19:11 +0200)]
Fix Beaker CI according recent puppetlabs-rabbitmq change.
The puppetlabs-rabbitmq module introduce a new feature related to the
erlang_cookie parameter change (the database must be wiped if the cookie is
changed), the parameter wipe_db_on_cookie_change is configured to false by
default.
But we're not setting up a rabbitmq cluster and we're not using pacemaker in
beaker CI tests, so we just remove the erlang cookie parameter change.
Sebastien Badia [Wed, 24 Jun 2015 15:51:15 +0000 (17:51 +0200)]
keystone/auth: make service description configurable
This commit adds the service description as a class parameter in order to allow
users to update from a previous version if the service description is changed
(incorrectly spelled or wrong description)