Commit Graph

158 Commits

Author SHA1 Message Date
zhhuabj e0d3b6a365 Support disabling apache wsgi socket rotation
Bug LP 1863232 introduced a new Apache configuration option called
WSGISocketRotation which allows users to disable wsgi socket
rotation. This patch makes this configurable with a new
wsgi-socket-rotation config option that defaults to the Apache
default and can optionally be set to False.

Closes-Bug: #2021550
Change-Id: I85d48b646b3d0778aae3a7dd3942ad45b4af002d
2023-09-04 18:15:31 +08:00
Corey Bryant 3ace19e601 Add 2023.2 Bobcat support
* sync charm-helpers to classic charms
* change openstack-origin/source default to bobcat
* add mantic to metadata series
* align testing with bobcat
* add new bobcat bundles
* add bobcat bundles to tests.yaml
* add bobcat tests to osci.yaml
* update build-on and run-on bases
* drop kinetic
* update charmcraft_channel to 2.x/stable

Change-Id: I6886c96797784c3b98b965ebe1b4a99de22d84a0
2023-08-02 14:16:54 -04:00
Corey Bryant 05efc621c4 Add Antelope support
* sync charm-helpers to classic charms
* change openstack-origin/source default to antelope
* align testing with antelope
* add new antelope bundles
* add antelope bundles to tests.yaml
* add antelope tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases

Change-Id: I70cadc739d692cf442aef8012477e89a9601c06f
2023-03-07 20:07:40 +00:00
Corey Bryant f9206facde Add Kinetic and Zed support
* sync charm-helpers to classic charms
* change openstack-origin/source default to zed
* align testing with zed
* add new zed bundles
* add zed bundles to tests.yaml
* add zed tests to osci.yaml and .zuul.yaml
* update build-on and run-on bases
* add bindep.txt for py310
* sync tox.ini and requirements.txt for ruamel
* use charmcraft_channel 2.0/stable
* drop reactive plugin overrides
* move interface/layer env vars to charmcraft.yaml

Change-Id: I8f2c34f3a4a0601ee19aa694b323cc0f9ee65616
2022-08-26 18:40:41 +00:00
Alex Kavanagh 97f0144739 Updates to enable jammy and finalise charmcraft builds
- Add 22.04 to charmcraft.yaml
- Update metadata to include jammy
- Remove impish from metadata
- Update osci.yaml to include py3.10 default job
- Modify tox.ini to remove py35,py36,py37 tox target and add py310
  target.
- ensure that the openstack-origin is yoga

Change-Id: Ia0cdf927a4d4d2339ca1739066bf9a965c97d190
2022-04-06 10:54:36 +01:00
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
Marcin Wilk 690d1d190c Allow resizing to the same host
By default resizing an instance to the same host as the source is
not enabled. This change adds new charm config option that maps
directly to the nova.conf setting which effectively gives a user
possibility to enable/disable this functionality.

Closes-Bug: #1946620
Change-Id: I13d0c332cd0b110344b7a1645e3e4fd250fce33a
2022-02-11 15:46:56 +00:00
Zuul 68a124df5d Merge "Drop default cpu-allocation-ratio to 2:1." 2021-12-17 11:39:54 +00:00
James Vaughn 6c1efee2d0 Add aggregate filtering and isolation options
Add limit-tenants-to-placement-aggregate,
placement-aggregate-required-for-tenants and
enable-isolated-aggregate-filtering options.

Closes-Bug: #1920982
Change-Id: Ibbb0e412d1a821cdb56e447ca88b91afca50c8c6
2021-11-29 10:34:26 +09:00
James Troup 379d54f577 Drop default cpu-allocation-ratio to 2:1.
The old default of 16:1 was, IMO, really only suitable for test
clouds (or niche use cases where a high over subscription makes sense
with a production workload).  Our defaults should make sense for
production and this change reflects that.

Closes-Bug: 1942921
Change-Id: I17b64cab01fb7abe97309f5dbdf0295d72369226
2021-11-25 18:33:45 +00:00
Peter Matulis 7ac2d02060 Overhaul README
Overhaul the charm README.

  The section on SSH host lookup caching in particular
  received a lot of attention.

  Apart from formatting, the Spaces section was deliberately
  left untouched as improvements are part of a separate
  documentation effort.

Improve the 'cache-known-hosts' option entry in config.yaml.

Change-Id: I14019ad38a9c4976026c607daca9d768c692535c
2021-10-01 17:28:39 -04:00
Nobuto Murata 60ca023894 Update worker-multiplier config description
Based on the change in charm-helpers:
https://github.com/juju/charm-helpers/pull/553

Related-Bug: #1843011
Change-Id: Ibd10814bca056de26445fa26b5745f2c3683ae51
2021-03-30 11:22:17 +09:00
Andrea Ieri 1bf5a92832 Make disabling build_failure_weight_multiplier optional.
This commit introduces a new charm option allowing operators to override
the hardcoded 0.0 that disabled hypervisor demotion on build failures
from pike onward.

In certain environments it may be preferable to retain the upstream
behavior of letting the scheduler work around malfunctional computes and
favor instance building reliability at the cost of a potentially uneven
load distribution.

Change-Id: I2faa5ab8cd505a9d61a9fa26e1b08d16b0c795fb
Closes-Bug: 1892934
2020-08-28 09:53:44 -04:00
James Page 9a06df27ba Drop support for xvpvnc at Ussuri
Add a note to the configuration file that xvpvnc is not supported
for bionic/ussuri or focal (or later) releases.

Change-Id: Ia3fced85bc544c6ee31474b3f68e067bdd8b5dfe
Closes-Bug: 1885158
2020-07-23 08:24:32 +01:00
Hemanth Nakkina b5b6966f6d Add new config option to set [quota].count_usage_from_placement
New config option count_usage_from_placement is added in Nova from
Train release to enable/disable counting of quota usage from placement
service. Corresponding config parameter is required in nova-cloud-controller
charm.

This patch introduces quota-count-usage-from-placement config parameter in
nova-cloud-controller charm. For openstack releases train or above, this
option is rendered in nova.conf for nova-cloud-controller units.

func-test-pr: https://github.com/openstack-charmers/zaza-openstack-tests/pull/250
Change-Id: I57b9335b7b6aecb8610a66a59cb2e4e506e76a5e
Closes-Bug: #1864859
2020-04-28 18:07:21 +05:30
Vladimir Grevtsev ab6398463a Adding support for cross_az_attach config option.
Allow attach between instance and volume in different
availability zones. If False, volumes attached to an
instance must be in the same availability zone
in Cinder as the instance availability zone in Nova.

Change-Id: I21df8e0dfa585133c5ef6a55cdbbc2071c267424
Closes-Bug: #1856776
2020-03-09 14:41:00 +03:00
Stamatis Katsaounis 0065d148f6 Add oslo notification format configuration option
This patch adds a configuration option for oslo notification format.
Charm Helpers can accept this option to fill the configuration
template appropriately.

Change-Id: I9b41854aca91f5ed42844be8805a941bc686336e
Signed-off-by: Stamatis Katsaounis <skatsaounis@admin.grnet.gr>
2020-01-03 11:26:43 +02: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
Felipe Reyes 62262f845a Add new config option to set [spice].agent_enabled
This new config called spice-agent-enabled is added to inform the spice agent
is not installed in the guest instance, which in conjunction with an image
property hw_pointer_model=usbtablet allows accurate position of the mouse in
Windows guests.

This option is not rendered in the nova.conf local to nova-cloud-controller
units, instead it's passed to related nova-compute units.

Change-Id: Id64699b6d04aa05935b31d55532df45c6d973fa7
Depends-On: https://review.opendev.org/699461
Closes-Bug: #1856602
2019-12-17 15:52:36 -03: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
Alex Kavanagh f7f6fa295c Policyd override implementation
This patchset implements policy overrides for nova-cloud-controler.

This change includes a charm-helpers sync to bring in the policyd helper
code.

Note there are no functional tests for this feature as the charm still
uses the old style non-zaza amulet framework.  The Related-Bug below is
tracking this issue.

Change-Id: Ia5f3f8189d4a7b7b46a827707d964ebe40740aeb
Closes-Bug: #1741723
Related-Bug: #1845639
2019-10-07 22:16:36 +01:00
Alex Kavanagh 9d8ccd169a Switch knownhost caching on by default
This change "flips the switch" by changing the default for caching
knownhosts to true.  This means that during deployment host lookups are
only performed once for each related unit.  This was experimental for
the previous charm release.

Release note is change-id: Ib3d17b4057dd7f671f123b1da7df21c9f3d7e182

Change-Id: I644df508563f93b661af6bfd5fb668f0e31d5e4d
2019-09-26 10:53:49 +01:00
Alex Kavanagh fe65e12b31 Add caching for knownhost private-address lookups
This change adds caching for the host look ups associated with a
private-address of a unit.  This cache is maintained across hook
invocations, and is designed to reduce the time spent in
cloud-compute-relation-changed hooks (which occur as nova-compute units
join and update on the cloud-compute relation).

The feature has been added under an EXPERIMENTAL config flag (with the
default being "don't use the cached values") in case there are any
corner cases around DNS resolution in the deploying cloud during
deployment.

An action is included to allow clearing of the cache at unit,
application and whole relation level.  This clears the cache and
re-triggers the host resolution, and relation updates.  This is in case
of either 1) DNS changed during the deployment, 2) DNS has been altered
during the running of the cloud.

Change-Id: I5a68bf4c30bf1591184d660d50559c969822ddcf
2019-07-16 14:27:30 +01:00
Rodrigo Barbieri a51efaf640 Propagate vendor_data from nova-cloud-controller
When using DVR and L3HA neutron deployment options,
Nova API Metadata requests are served from compute nodes,
instead of from neutron-gateway nodes.

This change allows nova-cloud-controller to send vendor_data
configuration values to nova-compute charm relation so it
can write to nova-compute's nova.conf appropriately.

Replaced the existing context logic with inheritance
from a new context created in charm-helpers, so the
logic can be shared across several charms that write
vendor metadata to nova.conf and vendor_data.json.

Also, small fix in the vendor-data and vendor-data-url
descriptions, where it was incorrectly stating that such
configuration would be effective in nova-cloud-controller
on Queens release.

The values set in vendor-data and vendor-data-url config
options will always be propagated to nova-compute regardless
of the OpenStack release. Those values will continue to only
be effective in nova-cloud-controller nodes on Rocky release
or later.

Included sync of charm-helpers code in order to inherit
the refactored vendor metadata contexts.

Change-Id: If8373fc6b2d04dbc29ed07896d385ac920cae3f4
Depends-On: I0c79e1bfac9fbe7009a7e862ad010cfa2de8cfda
Closes-Bug: #1777714
2019-06-05 10:22:56 -03:00
Frode Nordahl f7674cf35e
Deprecate separate configuration options for console TLS
Console TLS will automatically be set up when the Nova API has TLS
enabled, either through configuration (``ssl_*``) or through
certificates relation to vault.

Having multiple knobs to set up the console TLS is not really
necessary and it adds to complexity.

Change-Id: I6efb72bced8473ad52e623318a51ed976c7ac31c
Related-Bug: #1819140
2019-03-22 09:49:09 +01: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
James Page b6e314077f Drop support for single-nova-consoleauth
Remove support for single-nova-consoleauth operation; this option
managed a single instance of the nova-consoleauth process across
a cluster nova-cloud-controller application using the hacluster
charm.  This proves somewhat racey on deployment as the ocf resource
deep checks the operation of nova-consoleauth including connectivity
to AMQP etc..  If the clustering of the service occurs before
other principle relations have been completed, the resource will
fail to start and the hook execution will spin, never returning.

HA deployments should always use memcached to share tokens between
instances of the nova-consolauth daemon; If the 'ha' relation is
detected, then ensure that a memcache relation is then required
for charm operation.

To support evaluation of the memcache relation completeness
the memcache specific code in InstanceConsoleContext was split out
into a new memcache specific class RemoteMemcacheContext.

Existing pacemaker resources will be deleted on upgrade; units will
move into a blocked state until a relation is added to memcached.

The nova-consoleauth service is resumed on upgrade to ensure that
instances run on all nova-cloud-controller units.

Change-Id: I2ac91b2bd92269b761befeb7563ad01cc5431151
Closes-Bug: 1781620
2019-03-06 12:36:06 +00:00
James Page b99d806cf3 Update default scheduler filters
Make the default set of scheduler filters conditional on the release
being deployed; For Pike or later the CoreFilter, RamFilter and
DiskFilter are superfluous to requirements as this filters are in
effect completed by the Placement API.

Add DiskFilter to list of filters for older OpenStack releases.

Change-Id: Iddb4f1f068b982dcd9a70b11b89df1be9f8aaf20
Closes-Bug: 1731302
Closes-Bug: 1732164
2019-03-04 16:20:12 +00:00
Frode Nordahl fe0ba3b883
Adjust default of ``ram-allocation-ratio`` configuration option
In modern hyper-converged architectures the upstream default of
1.5 does not really fit.

Set to 0.98 to give some headroom on the compute nodes and add
a note about the potential need to adjust this value further.

Change-Id: I64e3379686128dd7f222bdfae133a6c90e8f3ef0
Closes-Bug: #1818234
2019-03-01 22:56:29 +01: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
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
James Page d3a843ea4c Enable {Different,Same}HostFilter
The SameHostFilter and DifferentHostFilter have been present in Nova
since Icehouse; add both of these simple filters to the default
enabled filters to provide simple affinity/anti-affinity hints.

This plugs some holes in our tempest test coverage as tests relating
to these features are currently disabled.

Change-Id: I852f24b21784f6de05232107a5cdf6e779f18b23
2018-09-27 15:09:56 +01:00
James Page 0f14eac672 Remove deploy from source support
Drop support for deployment from Git repositories, as deprecated
in the 17.02 charm release.  This feature is unmaintained and has
no known users.

Change-Id: I2fe15b648d485e5b03965a00dee6324669ebe9fa
2018-01-12 10:42:50 +00:00
James Page 5c79af1bd1 Drop postgresql support
Remove postgresql DB support; This feature is untested as part
of the charms, is not in use and was deprecated as part of
the 1708 charms release.

Change-Id: I866559f519ace3476e0cc85661d99e5f5491227d
2017-12-21 12:01:58 +00:00
David Ames 373158b5cf Update HAProxy default timeout values
The default HAProxy timeout values are fairly strict. On a busy cloud
it is common to exceed one or more of these timeouts. The only
indication that HAProxy has exceeded a timeout and dropped the
connection is errors such as "BadStatusLine" or "EOF." These can be
very difficult to diagnose when intermittent.

This charm-helpers sync pulls in the change to update the default
timeout values to more real world settings. These values have been
extensively tested in ServerStack. Configured values will not be
overridden.

Partial Bug: #1736171

Change-Id: I0a3a8f0dd2dedcc8e02dd6af2f5486501698833e
2017-12-11 11:37:20 -08:00
Edward Hope-Morley 8dc0b72a4b Set default value of disk-allocation-ratio to 1.0
This makes it inline with upstream Openstack defaults.

Change-Id: Id771c26a7b023bc5fdc330e03758e5425dc60e8e
2017-11-10 09:43:08 +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
Edward Hope-Morley 5519a2706d Fix description of openstack-origin config opt
Change-Id: I85bdb107872668a8e307e2edaa40bf27bf9925a0
2017-08-25 10:41:06 +01:00
Frode Nordahl 6fcc9b0e1e Cleanup config.yaml
Change-Id: I740a400f1d4280949b594ffc4070c2cbc01d2d33
2017-07-06 07:58:24 +02: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
James Page b699e56699 Make worker-multiplier sane in container environments
Resync charm-helpers to pickup the capped worker-multiplier
changes when deploying in containers.

Drop the default value for worker-multiplier of 2.0; this
is now handled from within the codebase rather than via a
default configuration value, reflecting the differing
behaviours between container and non-container deployments.

Change-Id: Iec5fa21b0e1b377bcb22ad5193c84aa0ae525f16
Closes-Bug: 1665270
2017-04-27 09:28:27 +01:00
Ryan Beisner 2bd1f60d7c Update amulet test definitions for Newton
- Remove Precise-Icehouse Amulet test definitions if they exist.

- Add Xenial-Newton Amulet test definitions.

- Add Yakkety-Newton Amulet test definitions.

- Use the percona-cluster charm in tests instead of the mysql charm.

Change-Id: Idab48a7831008c5353eeb56da5deb49ce1305a41
2016-10-12 13:34:02 -05:00
James Page 469ef8dced Add support for serial console proxy access
Support access to instances via optionally enabled serial console
feature provided in Nova.

Seria console access is enabled using a new config flag; this flag
plus the required base_url for the nova-serialproxy are also passed
over the cloud-compute relation for use in nova-compute units.

This is only supported in OpenStack Juno or later, and replaces
the standard output to the nova console-log.

Change-Id: I3bfcca88bd6147be337e6d770db7348170b914e6
2016-09-15 12:37:33 +01:00
Felipe Reyes 68b0afed6d Add disable-aws-compat config to disable AWS compatibility layer
For OpenStack >= Liberty EC2 and objectstore services aren't installed and
deprecated, but there is no way to disable it, this patch adds a way to
permanently disable and enable them

Change-Id: Ie78ba5af1d953e8ebed9195202522ff73efcde9f
Closes-Bug: #1533255
2016-09-12 05:46:43 +00:00
Jenkins b1be7173d7 Merge "Various deploy from source changes and c-h sync" 2016-07-14 14:30:22 +00:00
Corey Bryant ec8e442b73 Various deploy from source changes and c-h sync
* openstack-origin is no longer required when using openstack-origin-git.
* Drop kilo from openstack-origin-git default values because upper
  constraints doesn't work in kilo for openstack-dashboard and glance.
* Add flag to allow for disabling upper constraints when using
  openstack-origin-git with user-specified git repositories.

Change-Id: I903158434d552b50ef8250bbcab8c0b19b82e26e
2016-07-14 13:12:53 +00:00
Billy Olsen 8d35070586 Change worker-multiplier to float
Change the worker-multiplier to a floating point config option type
instead of integer. This allows users to specify workers to be less
than the number of CPUs, which is useful in deployments with multiple
services deployed into containers on top of bare metal.

The fix is to simply change the config option type and to sync in
the necessary update from lp:charm-helpers.

Partial-Bug: #1602444

Change-Id: I2c846832d24f709a3d019b766f5f23c28c4371f4
Signed-off-by: Billy Olsen <billy.olsen@gmail.com>
2016-07-12 17:39:11 -07:00