Commit Graph

13 Commits

Author SHA1 Message Date
Takashi Kajinami 8547f78556 Simplify anchor definitions
We have been using redundant definitions so that users can override
order but this is no longer required in recent upgrades.

Change-Id: Id60a655fcdbd05abd34165a5430ab1683bf7cfd5
2023-10-13 08:54:51 +09:00
Takashi Kajinami 51829b985f Replace legacy facts and use fact hash
... because the latest lint no longer allows usage of legacy facts and
top scope fact.

Change-Id: Ibe75e48eeb387c213c42511797c59b9df39a7762
2023-03-02 12:25:22 +09:00
ZhongShengping 45b3c8cfa1 Add 'openstack-db' tag to db-sync Exec resource
In order to make easy orchestration on all OpenStack db-sync, add this
tag so people can use this tag in composition layer.
A use case it to set some orchestration to make sure MySQL Galera is
ready before running any Exec with this tag.

Change-Id: I2df5ae03c13b7bde00621a8b208e7204b4747713
Closes-Bug: #1755102
2018-03-12 16:34:36 +08:00
Diana Clarke e128ba6538 Correct permissions on the nova logfiles
When you execute nova-manage commands, oslo logs to the following
location (file name is dynamically created based on command name).

    /var/log/nova/nova-manage.log

Because puppet-nova is executing these commands as root,
nova-manage.log is owned by root, preventing the 'nova-manage
db archive_deleted_rows' entry in nova's crontab from executing.

    Permission denied: '/var/log/nova/nova-manage.log'

This log file is also an outlier, as all other log files in
/var/log/nova/ are owned by nova:nova.

Similar issues are possible for other nova logs, if for example
a nova services is initially started manually as root, so the
ownership of all nova logs is corrected before configuring nova.

Co-Authored-By: Oliver Walsh <owalsh@redhat.com>
Co-Authored-By: Diana Clarke <diana.joan.clarke@gmail.com>
Co-Authored-By: Maciej Kucia <maciej@kucia.net>
Closes-Bug: #1671681
Change-Id: I0ca0110cbf9139c79074cf603dcab9135f96e765
2017-12-19 20:24:52 +00:00
Maksym Yatsenko 8790f250f0 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: Ieb69b5a6a50d37b0a49a8c9e57275673d60b5f10
2017-02-23 10:37:38 -07: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
Alex Schultz be0ac8f320 Revert "Enable cell_v2 setup by default"
This reverts commit 055f91446f.

Change-Id: I063c0a062a4f391a932c60e48d3f2c0ba0e941bb
Related-Bug: #1656276
2017-01-13 09:42:42 -07:00
Mike Bayer 59858c0867 Allow db sync timeouts to be configurable
As Openstack projects continue to have longer database migration
chains, the Puppet default timeout of 300 seconds for an execution
is becoming too short a duration on some hardware, leading to timeouts.
As projects continue to add more migration scripts without "pruning"
the base, timeouts will continue to become more frequent unless
this time can be expanded.

The proposed change adds a configuration option db_sync_timeout
which maintains the Puppet default of 300 but allows TripleO to
change the timeout to something higher.

Change-Id: I6b30a4d9e3ca25d9a473e4eb614a8769fa4567e7
2017-01-04 13:13:15 -05:00
Alex Schultz 055f91446f Enable cell_v2 setup by default
In Ocata, nova has made the cell_v2 setup mandatory as part of the
upgrade process in I72fb724dc13e1a5f4e97c58915b538ba761c582d. This
change makes the cell_v2 setup part of the default install for Ocata as
this feature will be required for some parts of nova in Ocata.

Depends-On: I693239ff5026f58a65eb6278b1a8fcb97af4f561
Depends-On: I08efa36f5f62ae406ab20e8da77c01fbf3d9b11f
Change-Id: I7839e3c8bfdec96b0d372e7a9d3511289e8004b9
Related-Bug: #1649341
2016-12-23 03:57:42 +00:00
Alex Schultz 4234ce3df4 Add cell_v2 simple_cell_setup
As part of Ocata, nova has made the cell_v2 setup manditory for the
nova-api db sync process. This change adds a simple cell_v2 setup with a
cell0 and an execution of the 'nova-manage cell_v2 simple_cell_setup' as
part of the nova-api db setup and sync process.

Change-Id: Idfc369e9e17f7d5a30ce4ff52beb604dd4a6ac23
Closes-Bug: #1649341
2016-12-21 02:32:54 +00:00
ZhongShengping cf56e3f0f7 Fix spec test for sync
Change-Id: I8ffe7c003ebf04668162003dd99a93e5d08d08b2
2016-12-02 11:52:48 +08:00
ZhongShengping e04d996d37 Using on_support_os function to test
Change-Id: I7148c304f9ac3d272ae3e201c5ce021bac2ff5d8
2016-04-29 00:10:15 +08:00
Dan Prince 1e12e9c45c Classes to create and sync new nova_api DB
Per Mitaka nova commit 8e8e839ef748be242fd0ad02e3ae233cc98da8b2
we now need to create and sync the 'nova_api' database.

Closes-bug: #1539793
Co-Authored-By: Dan Prince <dprince@redhat.com>
Co-Authored-By: Emilien Macchi <emilien@redhat.com>

Change-Id: I234d2e9e219c6ea4235c3d3c5193b8924d6e6f8e
2016-02-02 11:58:50 +01:00