30 Commits

Author SHA1 Message Date
Takashi Kajinami
c6b53de070 Remove password hash generation in each puppet modules
... and migrate it to openstacklib so that all logics about database
configuration are implemented in one common place.

Depends-on: https://review.opendev.org/#/c/728595/
Change-Id: I0f7d05983a6d8bc6808f8595bc9d94c6aa4f7800
2020-05-18 23:53:54 +09:00
Tobias Urdin
7deecfbdf2 Convert all class usage to relative names
Change-Id: Ibe5a433cb67c38c0c9b05a50bffa2eda7391f241
2019-12-08 23:13:08 +01:00
Tobias Urdin
23dc492a94 Use puppet 4 compatible mysql functions
These was introduced in 6.0.0 and is required to
support later version of puppetlabs-mysql.

Change-Id: Iddba31b559f6d30052b827967de33e0c9003b6b9
2019-02-08 12:21:52 +01:00
ZhongShengping
2cb8554a0f Cleanup documentation
Make sure documentation is the same and follow
the standard which we are trying to enforce on
all modules.

Change-Id: I7ab5214261c7a85051bc6ec58d55bb512d3db9b3
2018-12-18 09:51:44 +00:00
Tobias Urdin
9171b9b8b7 Add cell0 database creation in postgresql
Add cell0 database creation like stx patched in [1].
Also fixes an faulty comment in the same resource for mysql.

[1]
https://git.starlingx.io/cgit/stx-integ/tree/config/puppet-modules/openstack/puppet-nova-11.4.0/centos/patches/0003-Create-nova_cell0-database.patch

Change-Id: I4183ed4417c9beeccf8b7355ac217088302d0160
2018-11-19 13:54:54 +01:00
zhubingbing
18e595f946 Fix annotations
Change-Id: I78385b0ff748b519243009c34f88e29a2b2b2b03
2018-06-15 15:07:37 +08:00
Matthias Bastian
72a90b21a3 Remove fallback on removed setup_cell0 deprecation
Change-Id: Iabad76cfc740af62b5f49c54bda33fd1ea27d550
2018-04-11 15:56:06 +02:00
Oliver Walsh
dc2f3a3586 Implement a proper cell_v2 setup
Rather than use simple_cell_setup which expects that there are already
existing computes, this change uses map_cell0 & create_cell to setup
cell_v2. Once the computes are configured, the cell_v2 discover_hosts
should be used to finalized the installation.

In addition, the db syncs need to be reordered as the api db sync
should run before the the cell_v2 setup. The main db sync should run
after.

map_cell0/simple_cell_setup now uses main nova DB connection instead
of the api DB connection.

Change-Id: I591b451197dc3bd0783978f5e3d2b1c830afe54e
Closes-Bug: #1656276
Related-Bug: #1656673
Co-Authored-By: Alex Schultz <aschultz@redhat.com>
2017-01-24 16:21:07 -07:00
Clayton O'Neill
cb77bc295f 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: I0b524e354b095f2642fd38a2f88536d15bcdf855
2015-12-08 10:14:11 -05:00
Clayton O'Neill
35466d5aaa Remove docs for unused cluster_id parameter
Change-Id: Ib22e44e263a05c6414fb79357959543dbf6bb5a4
2015-11-11 02:40:59 +00:00
Matt Fischer
36baeab82a Remove deprecated mysql_module
It's been deprecated for some time, time to let go.

Change-Id: I55e161643b8e9d4145ac5e82a18c04b0767cd127
2015-10-21 21:06:04 -06:00
Emilien Macchi
2d2e86aebd MySQL: change default MySQL collate to utf8_general_ci
Install & configure MySQL database by using utf8_general_ci collation
which is the way documented in OpenStack [1] and already the default
in puppetlabs-mysql [2].

[1] http://goo.gl/GA5gyZ
[2] https://github.com/puppetlabs/puppetlabs-mysql/blob/master/manifests/db.pp#L7

Change-Id: Ia4a2a1340630689ee838849ab5695f72edbb7b8a
Closes-bug: #1446375
2015-04-21 18:56:44 -04:00
Mathieu Gagné
92d9be12cd Remove deprecated parameters
* nova::api::auth_strategy (deprecated since 4.0.0)
* nova::api::workers (deprecated since 4.0.0)
* nova::compute::libvirt::libvirt_type (deprecated since 4.0.0)
* nova::db::mysql::cluster_id (deprecated since 4.0.0)
* nova::nova_cluster_id (deprecated since 4.0.0)
* nova::nova_group_id (deprecated since 4.2.0)
* nova::nova_user_id (deprecated since 4.2.0)
* nova::nova_shell (deprecated since 4.2.0)
* nova::sql_connection (deprecated since 3.0.0)
* nova::sql_idle_timeout (deprecated since 3.0.0)
* nova::logdir (deprecated since 3.2.0)
* nova::monitoring_notifications (deprecated since 4.0.0)
* nova::keystone::auth::cinder (deprecated since 3.0.0)

Change-Id: I31e8517b2a25febc9f6cd01197be279ee772ebce
2014-11-25 15:02:43 -05:00
Colleen Murphy
09cab4efbd Migrate mysql backend to use openstacklib::db::mysql
Implements: blueprint commmon-openstack-database-resource
Change-Id: I1120a27a7c0bbec8d69d01d232d7de1d387703dd
2014-08-13 08:48:32 -07:00
Chris Ricker
7dfb878bc2 Default to utf8 for MySQL
Change default charset to utf8 and default collation order to
utf8_unicode_ci to align with upstream defaults.

Change-Id: I2aa59fd868476f599019e3029af36aa707139fe1
Closes-Bug: #1302088
2014-05-23 15:05:02 -04:00
Michael Chapman
d08a38be60 Add support for puppetlabs-mysql 2.2
Puppetlabs-mysql has been rewritten to be much
cleaner. This patch adds a new parameter for the
nova mysql and init classes allowing users to use
the new version. Previous behavior will continue
as normal when using the old version (0.9)

Change-Id: I6d12a69180554348143f7f341f7570c52ecad140
2014-03-22 02:14:05 +11:00
Mathieu Gagné
0c15d98afa Deprecate various cluster parameters
Those parameters were already deprecated.

This change adds proper deprecate warnings.

Change-Id: If50b91f25c675c285b899dba78ba9b41bab5c5e3
2014-01-29 19:49:08 -05:00
Michael Chapman
6a358c0e9d Make parameter doc RDoc compatible
This patch fixes all remaining parameter documentation
in the nova module to be compatible with puppet-doc
and documents all parameters in a standard way.

Change-Id: I451078d46cb2498dd8e3c23bd8cbcc81b8845fcd
2013-12-16 16:07:10 +11:00
Xingchao Yu
e8cebd12f3 Update allowed_hosts conditional statement
In the origin nova::db::mysql, if the value of $allowed_hosts
contains or equals to $host, then puppet will complain duplicate
declaration error. This patch is aim to update the allowed_hosts
conditonal statement in nova::db::mysql.

There are two cases to pass $allowed_hosts to $real_allowed_hosts:

   - If $allowed_hosts is array,then remove $host from $allowed_hosts;
   - elsif $allowed_hosts is string and not equivalent to $host;

At last, if $real_allowed_hosts is not undef, then run
nova::db::mysql::host_access

Fix bug 1206444
Change-Id: If018321095e62e1196e0c2e6b623b30acb535020
2013-08-01 14:37:46 +08:00
Mathieu Gagné
65eb7a500c Puppet lint
Change-Id: Ia95da80607a05f228aec9cce6468f75aef0a4711
2013-06-03 19:29:11 -04:00
Dan Prince
e7a6df4264 Remove storeconfigs from nova::db::mysql.
Updates the nova db/mysql.pp module so we no longer rely on storeconfigs
being present. This fixes a warning that would occur when using the
nova::db::mysql.

Change-Id: I332092af152da514a401694d48cb76a5f237ef3e
2013-04-11 16:07:50 -04:00
Mathieu Gagné
c566d711e8 Add charset param to nova::db::mysql
Allow to specify the database charset but still default to 'latin1' if
none is provided.

Remove nova::params::nova_db_charset. Both osfamily were using 'latin1'
since the update for Folsom in 76d4632.
2013-03-20 18:16:14 -04:00
Dan Bode
ad9084b76f Remove nova-db-sync
I never really understood why we had 2 resources to
sync the nova db. This commit attempts to remove
one.
2012-10-09 22:25:00 -07:00
Branan Purvine-Riley
96509710b1 Parameterize the nova db charset
RHEL and Debian flavors have different requirements for the DB
encoding. This patch allows nova::db::mysql to work correctly
for both of them.
2012-07-18 15:00:06 -07:00
John Chilton
bd80998818 Make creation of nova database dependant on mysql::config instead of mysql::server, database isn't fully configured until this has been run. 2012-05-15 13:35:43 -05:00
Branan Purvine-Riley
9504bd166b (14273) Do not set the charset for the nova db 2012-05-03 10:37:34 -07:00
François Charlier
3d5c3f7480 Revert back to latin1 for default mysql db charset
utf8 as a default prevents the database from being created (MyISAM does
not support indexes with more than 1000 bytes).
The 'nova db sync' command later upgrades the database/tables to utf8
and InnoDB.
2012-04-26 18:26:12 +02:00
Dan Bode
593cbe6344 Update nova mysql db charset
It was set to the invalid value utf-8. This commit
updates it to utf8 so that it will work.
2012-04-24 12:20:38 -07:00
François Charlier
4dcac4eb7d The database should have utf-8 charset.
It is created with utf-8 charset in nova.
2012-04-24 17:31:20 +02:00
Dan Bode
0a5ed27e2a Finish db refactor
This commit finishes the openstack refactor.

All database config classes are stored in the location
<project>::db::<db_type>. In the case of nova::db,
it has been moved to nova::db::mysql.

This commit cleans up all of the code to reflect this.
2012-04-23 19:41:56 -07:00