Commit Graph

30 Commits

Author SHA1 Message Date
Zuul f55776445f Merge "Expose max_local_block_devices as an explicit charm option" 2022-03-11 08:41:05 +00:00
Arif Ali cdaa255120
Add scheduler-max-attempts flag
Using affinity/anti-affinity policies sometimes we get into a race
condition on the resources that are available on the hypervisors.
This flag allows to increase the number of retries and hence hosts
to schedule on and therefore allowing the successful scheduling
of instances.

This option was taken from the following URL, while future work
with placement is done to help with scheduling with affinity

https://docs.openstack.org/nova/latest/admin/troubleshooting/affinity-policy-violated.html

Signed-off-by: Arif Ali <arif.ali@canonical.com>
Change-Id: I353dbaa38eb0526014888ede27702b428eb66afd
2022-02-22 11:15:53 +00:00
Nobuto Murata 0e9136fe1e Expose max_local_block_devices as an explicit charm option
It's useful to force instance creations to fail if ephemeral drives are
requested when cloud admins want users to use persistent volumes always.

Closes-Bug: #1953561
Change-Id: I1c958b4bcf79512c06de6d81fe55c681bb5f38a7
2022-02-21 22:28:40 +09:00
Edward Hope-Morley 71c7cbecec Add default_log_levels to Mitaka and Ocata nova.conf
If debug is enabled we will also want oslo_messaging
debug logs and this allows for that. A previous patch
added this for >= Pike but it is also needed if these
logs are wanted in >= Mitaka.

Change-Id: I8d916e6082ee6fa6140406e1f69bab6bde01b65e
Related-Bug: #1817290
2020-06-23 13:33:52 +01:00
Zuul 49d6e5b5d2 Merge "Ensure we set compute upgrade_level" 2020-01-07 11:36:47 +00:00
Sahid Orentino Ferdjaoui 40282e0356 config: allow to create VMs with unique names
This commit introduces option osapi_compute_unique_server_name_scope
which allows operators to ensure VMs are created with unique names per
project or cloud.

Change-Id: Idacb60bb31cd60cb1deaec7cb3ec061f0c04da24
Closes-Bug: #1829782
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
2019-12-20 11:52:56 -03:00
Chris MacNaughton bfea6cc43f Ensure we set compute upgrade_level
With this change, we are enabling OpenStack compute services
to automatically determine the highest available RPC level
to use based on the service versions in the deployment.

Change-Id: I4e08de92ab8d0641398f3b54d7ea87d83c3b050a
Closes-Bug: #1825999
2019-12-19 11:39:04 +00:00
Zuul 4303190153 Merge "Add new config option to set host_subset_size" 2019-11-27 12:47:43 +00:00
Corey Bryant 41a36a3d1e Switch to placement config from charm-helpers
The placement config may eventually be shared among more than one
charm as more services begin to use it. This patch drops the local
sectional config and uses the same sectional config that now exists
in charm-helpers.

charm-helpers was synced to pick up this change.

Change-Id: I42b415d7c4834cd74887c27b2f4a4daeb8eae636
Related-Bug: 1850691
2019-10-31 19:36:05 +00:00
tpsilva bc1d19b680 Add new config option to set host_subset_size
A new config option called scheduler-host-subset-size was added
to configure FilterScheduler's host_subset_size property, which
size of the subset of best hosts selected by the scheduler.

Change-Id: Ic61917732d50806f74be0b4e7c87a51d738afbe7
Closes-bug: #1846203
2019-10-09 18:02:53 -03:00
Corey Bryant 2b3972f5f1 Sync charm-helpers and use "rabbit_use_ssl" for ocata
Ensure "rabbit_use_ssl" is specified in the [oslo_messaging_rabbit]
config section instead of "ssl" for Ocata, since "ssl" was not yet
introduced.

Change-Id: I27f89f3780a60c6fbb26d8aad637853403bddeb1
Closes-Bug: #1838696
2019-08-01 23:08:14 -04:00
Edward Hope-Morley 854603ed0b Support oslo_messaging logger debug
Pike onwards defaults to setting oslo_messaging logger
to INFO and we have no way to set it to DEBUG currently.
This patch will set it to DEBUG when debug is enabled.

Also sets glance.debug=True if debug enabled

Change-Id: I9216325f8e96cb9ee06cddbe75cdd15e98fb0827
Closes-Bug: #1817290
2019-03-22 10:06:15 +00:00
Zhang Hua b182ffa7f7 Add the support to customize the console access port
For novnc, need to set novncproxy_port in proxy nodes and
novncproxy_base_url in nova-compute nodes.
For xvpvnc, need to set xvpvncproxy_port in proxy nodes and
xvpvncproxy_base_url in nova-compute nodes.
For spice, need to set spicehtml5proxy_port in proxy nodes and
spicehtml5proxy_base_url in nova-compute nodes.

When release >= Mitaka, novncproxy_port and xvpvncproxy_port
are moved from [default] section into [vnc] section.
spicehtml5proxy_port is renamed to html5proxy_port and moved
to [spice] section.

So eventually the console access port can be customized by:

juju config nova-cloud-controller console-access-protocol=novnc
juju config nova-cloud-controller console-access-port=xx

If console-access-port is not defined, then default port is 6080
for novpc, 6081 for xvpvnc, 6082 for spice.

Change-Id: I4775ad42ba11b0c28163bf7e3718c56d18a2031f
Closes-Bug: #1800753
Signed-off-by: Zhang Hua <joshua.zhang@canonical.com>
2019-03-16 10:46:44 +00:00
Corey Bryant 66b4c91b5f Drop deprecated rabbit driver config options
The stein version of python-oslo.messaging (9.0.0+) has removed
the following config options from the [oslo_messaging_rabbit]
section:

rabbit_host, rabbit_port, rabbit_hosts, rabbit_userid,
rabbit_password, rabbit_virtual_host rabbit_max_retries, and
rabbit_durable_queues.

The above change requires a sync from charm-helpers.

These have been deprecated since Ocata, therefore this change
will be provided to pre-Stein templates in order to drop
deprecation warnings.

See release notes at:
https://docs.openstack.org/releasenotes/oslo.messaging/index.html

Change-Id: Id4a31a8ccfb2735d76dffe30c91c3ae733baa76b
Closes-Bug: #1817672
2019-02-26 10:35:08 +00:00
Andre Ruiz 5f21ea7124 Implement new option: enable_new_services
This change implements a new option in config.yaml that allows
services to come up disabled and be manually enabled later.

Change-Id: I345b56e347b63650ee3df07773ccb2e333610355
Closes-Bug: #1758776
2019-02-19 11:16:21 -03:00
Syed Mohammad Adnan Karim 95cd9bfd10 Add default project quota configuration for compute
Prior to this, the charm config did not support default quota
configurations for compute (ie. instances, compute, ram, etc.).
Default quota configuration changes will not impact existing
projects with modified quotas. Only new projects and projects with
unmodified quotas will adopt the defaults in the configuration file.

The following default quota settings were added:
instances
cores
ram
metadata_items
injected_files
injected_file_content_bytes
injected_file_path_length
key_pairs
server_groups
server_group_members

The functional test added checks that nova.conf quotas are set in
the correct section of the file.

Change-Id: Iae8c84dbfec97e1879d51963125f7674ea20ba22
Closes-Bug: 1386911
2018-12-17 20:29:03 +00:00
Alex Kavanagh 9c12812735 Switch the charm to support py3
Some major changes:
* the charm has been rebased (from a Python perspective) to be rooted in
  the charm directory.  This is a single root.
* Imports have been changed so that the don't add lots of imports to the
  namespace of the module doing the import.
* The code that used to run at module import time has been made lazy
  such that it only has to run if the relevant functions are called.
  This includes restart_on_change parameters, the harden function and
  the parameters to the guard_map.  Appropriate changes will be
  submitted to charm-helpers.
* Several tests had to be re-written as (incorrect) mocking meant that
  text fixtures didn't actually match what the code was doing.  Thus,
  the tests were meaningless.
* This has had a net positive impact on the unit tests wrt to importing
  modules and mocking.

Change-Id: Id07d9d1caaa9b29453a63c2e49ba831071e9457f
2018-10-18 15:43:03 +01:00
Liam Young 630a07013f Accept lists in pci-alias charm config
Allow json lists to be passed in via the pci-alias charm config
option so that multiple aliases can be set.

Increase amulet timeout due to gate failures

Change-Id: I3b5ea70224536f8d40f9c04482fa676c2b230bdd
Partial-Bug: #1735205
2018-10-05 10:07:51 +00:00
Liam Young e20db83c7d Add nova-metadata service
Add a service for handling nova metadata api services. This was
previously handled by the neutron-gateway and still is for
deployemnts up to and including Pike, For the neutron metadata
service and the nova service to communicate they need a shared
secret. To achieve this, the change includes:

* A charmhelper sync to get support for multiple wsgi vhosts
* Rendering new wsgi vhost and corresponding haproxy config.
* Setting a shared-secret down the relation with the neutron
  gateway.
* Remove fragile keystone authtoken checks as they are failing
  after a ch sync and any issues will be caught by the instance
  launch functional test.

Change-Id: I5ad15ba782cb87b6fdb3c0941a6482d201670bff
2018-10-03 07:24:05 +00:00
Liam Young 97f5a96163 Enable proxy header parsing
Ensure that oslo.middleware parses any proxy information
forwarded from haproxy/apache with regards to protocol;
this ensures that https connections are correctly detected.

Includes charm helper sync to bring in oslo middleware
template.

Change-Id: I1232d089ab91572ec31c1b2172881165097af5fb
Closes-Bug: 1758675
2018-06-28 11:41:19 +09:00
Edward Hope-Morley e824e45ed2 Ensure enabled_filters are in [filter_scheduler]
For >= Ocata the nova.conf template is adding filters
to an incorrect section unless additional filters are
defined due to a typo in the template. This patch
ensures that filters are always set in the
[filter_scheduler] section.

Change-Id: Iad5d830dd530ea27ddd3b92a39c15524e48af0aa
Closes-Bug: 1731319
2017-11-09 21:30:51 +00:00
Edward Hope-Morley af5a4ec747 Add disk-allocation-ration config option
We already support configuring ram and cpu overcommit so
this patch adds the ability to control disk overcommit.

Change-Id: Ib172e8b48cb34de4beb9cec1a277dc43ded36eed
Closes-Bug: 1726346
2017-10-23 12:11:35 +01:00
James Page b1da4f2dd4 Update notification config >= mitaka
Use oslo_messaging_notifications for mitaka or later releases
including setting the transport_url to the value provided by
the AMQP context.

This removes use of deprecated configuration options for
ceilometer notifications.

Change-Id: Ia57f29abbbabf1712b2385c2d94ece12f9ce0861
2017-07-31 10:41:26 +01:00
Zhang Hua 2eabf254f3 Add pci-alias option
Add a new pci-alias option which supports the use of PCI
devices in flavors. This allows, for example, a GPU or
a SR-IOV device to be automatically allocated to an
instance using a specific flavor.

Change-Id: I249ba04085d37657df0c8e3bb21723a388f08938
Closes-Bug: 1649868
2017-06-29 13:43:33 +01:00
David Ames ad0ca1c98d Re-enable the rabbitmq section in nova.conf
Commit c009d5e18d too aggressively
removed deprecated items. The oslo_messaging_rabbit section of the
template is still required for SSL.

Re-enable the oslo_messaging_rabbit section of the template.

Change-Id: I966c59122ba4dfbbddb09416f8f8123caa0d575f
2017-05-18 11:22:53 -07:00
David Ames c009d5e18d Ocata Deprecations
Update the nova.conf template for ocata to move configuration
items to their preferred locations and removed deprecated items.

Per https://docs.openstack.org/releasenotes/nova/ocata.html#upgrade-notes

Change-Id: I008c8791be24086b393bc82851833d6962260c79
2017-05-15 16:21:08 -07:00
Nobuto Murata 96b2cb0c96 Deprecate memcached_servers for mitaka+
Use a new config section oslo.cache with oslo_cache.memcache_pool backend
instead.

Change-Id: Ibfdbf0b4e985d7b74efeb69a05ca0ad0853b5067
Closes-Bug: 1684135
2017-04-20 00:24:58 +09:00
James Page 98459797bb Enable automatic host cell discovery
Configure the scheduler to automatically discover and
map hosts into cell1 every 30 seconds ensuring that
hosts are discovered automatically.

This will be completed by future work to orchestrate
the enablement and mapping of compute hosts into cells
using relations and actions at a later date.

Change-Id: I5ed10e67936388bb074739b63e3a5ecf9036035f
Partial-Bug: 1667124
2017-02-22 16:48:46 -05:00
Corey Bryant 1e2647a9b5 Enable minimal cells v2 support
A minimal cells v2 setup is required in Ocata, which includes the
following databases:
 1. An API database (named nova_api)
 2. A special cell0 database (named cell0)
 3. A "cell1" database (named nova - we're using the nova db as cell1)

The order of nova-manage commands is also updated in this commit.
The 'nova-manage api_db sync' must occur first because 'nova-manage
cell_v2' commands use the API database. 'nova-manage db sync' must
then be run after the 'nova-manage cell_v2' commands.

Finally, 'nova-manage cell_v2 discover_hosts' must be run whenever a
new compute node is introduced to add the host to cell1.

This commit includes a sync of charm-helpers to pick up AMQPContext
updates for transport_url.

Change-Id: Ia6f36ca8a360dc8490e9f41b62d499fa4d73d0b9
2017-02-16 18:23:21 +00:00
Corey Bryant 2564cf5a5f Enable nova-placement-api
This change installs the nova-placement-api, runs it under
mod_wsgi with apache2, updates nova.conf accordingly, and
registers its endpoints.

Change-Id: I4af4afa591cf68964e6146ca0ca0c51d1ddb8a64
2017-02-09 21:30:13 +00:00