16 Commits

Author SHA1 Message Date
ZhongShengping
6cd7fe95ce Include deps class in unit test for mysql
Change-Id: I1cf33d27c06501c88c9007e777d06dbac636e842
2020-10-09 10:36:11 +08:00
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
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
Iury Gregory Melo Ferreira
8c697c6349 Move nova to use OSDefaults - Part1
Switch @default_facts to OSDefaults

On going Part2 (new commit):
- nova_keystone_auth_spec.rb
- nova_migration_libvirt_spec.rb
- nova_network_spec.rb
- nova_objectstore_spec.rb
- nova_rabbitmq_spec.rb
- nova_scheduler_spec.rb
- nova_serial_proxy_spec.rb
- nova_spicehtml5_proxy_spec.rb
- nova_vnc_proxy_spec.rb
- nova_wsgi_apache_spec.rb

Change-Id: Ie53c2ebfa72710e248d14f5588bc632eeafc2d68
2016-06-11 15:19:55 -03:00
Iury Gregory Melo Ferreira
2a4e110a7e Switch Nova to $::os_service_default - Part1
Switch Nova to use $::os_service_default
Change logging.pp, db.pp and tests.

Change-Id: I928a93534c6d27c020b7afb5b7dda32c379e9d62
Related-bug: #1515273
2015-12-01 12:31:22 +00: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
Sebastien Badia
b8a187f54c 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
order to be prepared for rspec 3.x move.

In details:

 * Upgrade and pin rspec-puppet from 1.0.1 to 2.0.0
 * 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
 * Clean Gemfile (remove over-specificication of runtime deps of puppetlabs_spec_helper)

Change-Id: I172439c6ed185bb38b325b2524cab1475cdc7504
2015-03-19 18:45:08 +01: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
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é
db9a2d3d6d Add missing pre_condition to nova::db::mysql tests
mysql::server was missing from pre_condition causing tests to fail.

Change-Id: I2cb93be62eac9fe8d71c8fd575780a13b0b27fd2
2013-07-06 21:44:44 -04:00
Dan Bode
c9757ec448 require sections are specified in nova_config
This massive code commit actually implements something very simple.

previously, we allowed nova_config to omit a section and assumed that
section was default.

This commit updates the code to require section names for all settings.

This change is being made b/c:
- it better maps to the config on disk
- it is consistent with the other modules

Change-Id: Iae71a4c48ed0f9792566f16f0bf13e61569b46e5
2013-04-12 15:06:58 -07: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
64a88230a6 update tests
makes all tests pass with the folsom changes.
2012-10-14 01:52:16 -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