Commit Graph

80 Commits

Author SHA1 Message Date
Takashi Kajinami 11599ba429 Remove support for glance-registry service
This patch removes support for glance-registry service, because it has
been removed from glance [1].
 [1] https://review.opendev.org/#/c/738671/

Change-Id: Id05f736dbbddaff2cb90aa6678c777b9a0318e40
2020-07-28 19:41:10 +09:00
Takashi Kajinami 9e82f598ad Add cinder_os_region_name parameters for cinder backend
This patch introduces cinder_os_region_name parameters for cinder
backend, because global os_region_name parameter was replaced by this
cinder specific parameters[1].

[1] 410747822c9433c83fd4aec547d3e4c288502f90

Change-Id: I4a7c9ac97ff2f1c04b651ecbc89b3cb1c583f2f9
2020-04-13 08:07:25 +09:00
Tobias Urdin 4b558f6f00 Use validate_legacy
This changes all the puppet 3 validate_* functions
to use the validate_legacy function.

The validate_legacy function has been available since
about three years but require Puppet >= 4.4.0 and since
there is Puppet 4.10.12 as latest we should assume people
are running a fairly new Puppet 4 version.

This is the first step to then remove all validate function
calls and use proper types for parameter as described in spec [1].

[1] https://review.openstack.org/#/c/568929/

Change-Id: Ib21fef57404d63579743270be4080d248a4ca8cc
2019-02-23 17:19:29 +01:00
Tobias Urdin f09800121b Remove deprecated logging
Change-Id: Id33a11d8eb74bc4685b7c1e88de9f73df1404e03
2019-01-05 22:12:27 +01:00
Alex Schultz 1928f276b8 Update python packaging version for RHEL8
The glanceclient is python3-glanceclient for RHEL8

Change-Id: Id7fffe8e97a252619e5494e3c0baa61006049234
2018-11-27 07:57:39 -07:00
ZhongShengping 1f7a5323fe Remove deprecated sync_db options
The sync_db option has been deprecated in Ocata[1].
we can remove it.

[1]https://review.openstack.org/#/c/408161/

Change-Id: I35898b6c298c864a76e05b41322fc61d75244c0d
2018-02-08 15:45:43 +08:00
ZhongShengping 40aab381fc Fix the glance api version warning
The Images (Glance) v1 API is deprecated and will be removed on or
after the Pike release, following the standard OpenStack deprecation
policy. Currently, the solution is to set enable_v1_api=False in
glance-api.conf file[0]. And when enable_v1_api=False, the
enable_v1_registry should be False[1].

[0]: https://github.com/openstack/glance/blob/master/glance/common/config.py#L504
[1]: https://github.com/openstack/glance/blob/master/glance/common/config.py#L482

Change-Id: I4e69b21e59f5fe206e00859fcaa44547a72e3dfb
2018-01-17 14:02:58 +08:00
Emilien Macchi 465cd11025 Move sync_db parameter to glance::api
Glance Registry will at some point be removed from puppet-glance once
API v1 is totally remove from Glance tree.
Some people using 100% v2 API don't need Glance Registry, so they don't
have to run glance::registry class. Though they need the db_sync, so
this patch aims to move the db_sync parameter from glance::registry to
glance::api.

The parameter in glance::registry is deprecated and will be removed in a
future release. Now people should use glance::api::sync_db.

Change-Id: Ib554edb13386845198140c87b0a9b931500656d2
2016-12-07 16:07:27 +01:00
Emilien Macchi d9fe9380d6 Allow to choose which Glance API to enable
- Allow to configure Glance API v1 with enable_v1_api boolean.
  If set to True, the glance::registry::enable_v1_registry also needs to
  be set to True. Note that if you set these values to True, Glance will
  send some deprecation warnings.
  This option is separated from enable_v2_api, and both API versions can be
  deployed together.

- Allow to configure Glance API v2 with enable_v2_api boolean.
  This option is separated from enable_v1_api, and both API versions can be
  deployed together.

Change-Id: Ibbb8b970971c899ae94097042465f605fe55f748
2016-12-06 16:51:35 +01:00
Iury Gregory Melo Ferreira ddfd2150b9 Remove old authtoken options
Since we are in ocata lets remove all old parameters in api
to configure the keystone_authtoken section

Change-Id: I4dc0bd544f91fd52ad437b4c3ebbd16a43895726
2016-11-15 23:40:36 -03:00
Maksym Yatsenko 74e52d294c Change worker defaults to ::os_workers
This patch changes the default worker count from ::processorcount to the
new ::os_workers fact. ::os_workers is based on the number of processors
(currently cpu/4) but is capped at a maximum of 8 worker processors.
This is a much more reasonable default in general and prevents excessive
resource consumption on systems with a large number of CPUs.

Change-Id: I3808177027a880c88f075cdbef0aba2a56fb26bc
2016-10-07 11:53:48 +03:00
Denis Egorenko 1e09e553ed Move Glance to new authtoken scheme
Use glance::<service>::authtoken to configure keystone_authtoken
section in glance configs, with all parameters required
to configure keystonemiddleware.

Also changed auth_type to auth_strategy, because auth_type is
related to keystone authentication.

Change-Id: I722a1e41b2cee0b3040c37f07adfd13c33edaa5c
Closes-bug: #1604463
2016-08-05 13:46:22 +03:00
Sofer Athlan-Guyot 5a83a8d56d Include openstacklib defaults manifest.
This provides a mechanism for setting default across all modules.

Change-Id: I28c8f651f8c81de6ab2d3cb73ac67d57cad0a264
Related-Bug: 1599113
2016-07-08 08:56:03 +00:00
Clayton O'Neill 18b010975c Add hooks for external install & svc management
This adds defined anchor points for external modules to hook into the
software install, config and service dependency chain.  This allows
external modules to manage software installation (virtualenv,
containers, etc) and service management (pacemaker) without needing rely
on resources that may change or be renamed.

Change-Id: If683fbd098e701a3c4da91941cf818b18b41b209
2016-06-17 13:17:34 +00:00
Iury Gregory Melo Ferreira cf604fc6a6 Deprecate verbose option in logging
Option "verbose" from group "DEFAULT" is deprecated for removal.
The parameter has no effect.
-Deprecated verbose for logging and init
-Remove verbose in README
-Remove verbose from tests.

If this option is not set explicitly, there is no such warning

Change-Id: I7e58412fe26962337845b3cb9d67679bac0709d8
2016-05-18 01:12:46 -03:00
Jenkins 63cbebc02e Merge "Fix the purge_config option for api and registry" 2016-04-13 10:59:58 +00:00
Nathan A. Taylor aa2c4c9213 Fix the purge_config option for api and registry
It appears that the resources decleration, that made purge_config work,
was accidently removed. I am adding it back so that the option will work
again. This resources decleration was setting the purge flag with a
boolean, so that inifile would handle it.
  * Adding in spec tests

Change-Id: Ib80b89932c60aeab0d252109d2e79ac0f209596b
2016-04-12 11:33:56 -06:00
Mykyta Karpin 037545fb3e Switch glance to os_service_default facts
Change-Id: If860858e2bdfe0387b6a3260b81a97625d05b9fe
2016-04-06 18:56:34 +03:00
Drew Fisher 637f986252 Remove POSIX users, groups, and file modes.
This patch removes File resources which should be delivered by packaging
tools.  These resources (files, directories, modes, users, and group
attributes) could be in conflict with different OS packaging systems
which isn't a desired result.

Co-Authored-By: Ivan Berezovskiy <iberezovskiy@mirantis.com>

Closes-Bug: #1458915

Change-Id: I02fe8cc99dcd56e16ac66136a0da244a1eeb630b
2016-03-08 15:48:10 +02:00
Alex Schultz cda71192de Switch glance to rspec-puppet-facts
This change updates the glance tests to use rspec-puppet-facts to test
multiple operating systems.

Change-Id: I75fd8970ba8335cb4ffa09a7d600415056e9f889
2016-02-29 16:33:46 -07:00
Xingchao Yu f444097a71 Add memcached_servers parameter
This patch is aim to add memcached_servers parameter in glance-api
and glance-registry service.

Change-Id: I4f671ebcda63007fa13f86655b9988648592b68b
2016-01-14 02:45:19 +08:00
Jenkins aea8027cbd Merge "Use identity_uri and auth_uri by default" 2016-01-05 17:51:56 +00:00
Emilien Macchi 17101434e1 Set os_region_name to $::os_service_default and drop warning
This commit [1] introduced a weird warning that send a warning by
default.

This patch:
* sets os_region_name to the default value in OpenStack using
  $::os_service_default
* drops the warning

[1] Id7a6894e5bb12fc7697dfe23e5f9d4a44a719086

Change-Id: Id4e94e18bad19c605bb82d3fb16b867493dab4c3
2016-01-03 10:47:47 -05:00
Emilien Macchi 148253cd27 Use identity_uri and auth_uri by default
Change-Id: I8ef94a18fd24f9572830994bcd005691d2314d66
Closes-Bug: #1528963
2016-01-02 08:57:56 -05:00
Mykyta Karpin 938e7679e6 add more settings to glance api, registry, rabbitmq
settings added:

delayed_delete
scrub_time
signing_dir
token_cache_time
image_cache_stall_time
image_cache_max_size
kombu_reconnect_delay

Change-Id: Id7a6894e5bb12fc7697dfe23e5f9d4a44a719086
2015-12-09 11:51:27 +02:00
Jenkins 72749e7a1d Merge "Introduce glance::db class" 2015-12-07 23:45:49 +00:00
Denis Egorenko d6d4ddbe8f Introduce glance::db class
Another modules already implement a <component>::db class that
is not implemented in Glance. This commit aims to apply here the same logic.

Change-Id: Icd65a3303ccd512d5e34598d3e3a78bc924f8128
2015-12-01 19:12:34 +03:00
Gael Chamoulaud da26542fbb Fix unit tests against Puppet 4.3.0
Related-bug: #1517805
Change-Id: I19e891ecce2bceb20e141199e14333f01b0ec9ab
Signed-off-by: Gael Chamoulaud <gchamoul@redhat.com>
2015-11-24 10:05:01 +01:00
Mykyta Karpin acd95e6a3a Add support of os_service_default fact in glance spec
This change adds possibility to use the os_service_default
   fact for configuration options that default to '<SERVICE DEFAULT>'.
   this change is done by analogy with cinder
   commit 667e6c0850672dbbf99381eb92468f95e5591913

Change-Id: Ie5c8909bcc1c9a6a7a9ab1b59eec4637751ffd74
2015-11-20 12:53:35 +00:00
Yanis Guenane 3231e35320 Put all the logging related parameters to the logging class
Currently logging configuration is splitted in two distinct classes, the init.pp
and the logging.pp classes.

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

The impacted parameters are :

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

This change remains backward compatible with what is currently in place

Change-Id: Ic268104fd9bc77bc142fc635285b0459f3d4314f
2015-10-01 10:18:55 +02:00
Jenkins 1a6a0b9162 Merge "Creation of glance::db::sync" 2015-09-11 14:42:00 +00:00
Yanis Guenane 48a7164021 Creation of glance::db::sync
In order to standardize the way dbsync are run across our modules,
we create a new class glance::db::sync.
This class will be included if sync_db is enabled.

By making this transition the glance::db::sync class
can be returned by the ENC.

A use case would be in an highly available environment, with 3 galera
nodes, include glance::registry on every node with sync_db set to false
and have the ENC return glance::db::sync just for one node.

Change-Id: I16c8bc411bd34f720513a5d4c94e82b07105af20
2015-09-08 10:46:21 +02:00
Sergey Kolekonov 1f4a545247 Add an ability to manage use_stderr parameter
When logging is already set up, it can be useful to disable this option
to avoid logs duplication (collected by Upstart, for example)

Change-Id: I1787191d9a512fdd3c3f79d6fadda110c5e41d54
Closes-bug: #1482564
2015-08-14 18:43:52 +00:00
Denis Egorenko 77f5141cf3 Add ability to specify number of workers for glance-registry service
Currently we haven't ability to specify number of workers for glance-registry.
So this patch implements this feature.

[1] http://docs.openstack.org/kilo/config-reference/content/section_glance-registry.conf.html

Change-Id: I71eb22d2ad15cd9c9d50e3370a3867f7298b47ca
2015-08-11 12:38:44 +03:00
Yanis Guenane 92180ae9a1 Add tag to package and service resources
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 'glance-package' and 'glance-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 == 'glance-package' |> -> X

Change-Id: If43e27e80500deebf6b758b11541d3d6f50cb129
2015-07-22 20:05:30 +02:00
Giulio Fidente c76d39605f Decouple sync_db from manage_service and enabled
We want db_sync to run even though manage_service or enabled
can be set to False.

Change-Id: Ic3472ce6a6e704a2fa035df6e1c8866b8ea6bcbc
Closes-Bug: 1452278
2015-05-11 14:57:30 +02:00
Sebastien Badia 60de7b77df Fix spec tests for RSpec 3.x and Puppet 4.x
Rix resource array, according[1].
[1]https://github.com/puppetlabs/puppet/blob/3.7.5/lib/puppet/resource.rb#L446-L453

Change-Id: Ic986a3cded93f6ab32c7bc27d8123c3f5e0befd1
Closes-bug: #1447620
2015-04-28 10:51:56 +02:00
Jenkins c0feafd0e9 Merge "Revert "Separate api and registry packages for Red Hat"" 2015-04-17 18:48:10 +00:00
Emilien Macchi 876e857b29 Revert "Separate api and registry packages for Red Hat"
Due to a patch in RDO packaging, puppet-glance is broken for RHEL platforms.

This reverts commit 5f15e05704.

Change-Id: I7ba146714d1b0e8d461c556eff5a9f8c4ad9627f
2015-04-17 13:37:04 +00:00
Jenkins 9c1b0a90d9 Merge "Separate api and registry packages for Red Hat" 2015-04-16 08:51:01 +00:00
Javier Pena 5f15e05704 Separate api and registry packages for Red Hat
Starting in Kilo, Red Hat-based platforms are using separate
glance-api and glance-registry packages (for an example, see
http://trunk.rdoproject.org/f21/current/).

Change-Id: I3ad476846d7dec3ca612e5b0d20b21b8577f4af0
2015-04-10 18:07:12 +02:00
Yanis Guenane ab054853e1 Create a sync_db boolean for Glance.
Other components offer the option to decide whether or not to run the db sync
command. Glance was missing this feature. This commit add this feature for
Glance.

Change-Id: Iec31d724370a40aee56ead5839ef47ceacf7223d
2015-04-07 11:52:26 +02:00
Jenkins 7aa1e3ecf9 Merge "Command parameter to sync the correct Database" 2015-03-13 16:23:50 +00:00
Sebastien Badia dbe297b056 spec: updates for rspec-puppet 2.x and rspec 3.x
This patch aim to update our specs test in order to work with the rspec-puppet release
2.0.0, in the mean time, we update rspec syntax in order to be prepared
for rspec 3.x move.

In details:

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

Change-Id: Ibd0333dc3c0959e846edfbad51fb48e8dfb8fbe9
Card: https://trello.com/c/eHXc1Ryd/4-investigate-the-necessary-change-to-be-rspec-puppet-2-0-0-compliant
2015-02-25 05:37:44 +01:00
Gaudenz Steinlin c51c22770d Command parameter to sync the correct Database
Without the correct --config-file parameter the glance-manage db_sync
command does not sync the correct database. The default without any
configuration is to use an SQLite Database at /var/lib/glance/glancedb.
This is most probably not what's intended.

Change-Id: I61f4e47ad082b48ee83b17df70e9856f640083b1
2015-02-23 13:06:35 +01:00
Jenkins 4ccd0981a1 Merge "Add openstack tag to glance packages" 2015-02-09 21:17:17 +00:00
Matt Fischer 2dff962a65 Support identity_uri
This patch adds the ability to set a new identity_uri parameter.
It also deprecates the old auth_host, auth_port, auth_protocol,
and auth_admin_prefix parameters. Logic is in place so that
users of the deprecated settings should have a smooth upgrade
process and get deprecation warnings until they adopt the
new settings.

Change-Id: Id72991da18dd1f467a7683f8f450e157da64f969
Closes-Bug: #1391235
2015-02-05 15:20:26 +00:00
Matt Fischer cbf3326184 Add openstack tag to glance packages
Change-Id: Ifbc41027c11f62342397d7e60e71080336c3418e
Partial-Bug: #1391209
2015-02-05 15:20:18 +00:00
Clayton O'Neill 9befc700a1 Allow overriding ensure for glance-registry
The main glance class allows overriding the package_ensure setting
from the default of 'present', but on Debian based systems
glance-registry is a separate package.  This package updates the
glance::registry class to allow overriding the package ensure there
also.

Change-Id: I6182836728102e827f9d5a3beef4964dd6e8d7f9
2015-01-07 13:53:23 +00:00
Mathieu Gagné e16f86e37c Remove deprecated parameters
* glance::api::sql_connection (deprecated since 4.1.0)
* glance::api::sql_idle_timeout (deprecated since 4.1.0)
* glance::registry::sql_connection (deprecated since 4.1.0)
* glance::registry::sql_idle_timeout (deprecated since 4.1.0)

Change-Id: Ibfe4e1a0a9f2f9f79b3fc76ef6a93ce429f72ed4
2014-11-25 13:50:46 -05:00