nova cloud controller #361

Supports: xenial bionic focal groovy hirsute impish

Description

OpenStack is a reliable cloud infrastructure. Its mission is to produce the ubiquitous cloud computing platform that will meet the needs of public and private cloud providers regardless of size, by being simple to implement and massively scalable. . OpenStack Compute, codenamed Nova, is a cloud computing fabric controller. In addition to its "native" API (the OpenStack API), it also supports the Amazon EC2 API. . This charm provides the cloud controller service for OpenStack Nova and includes nova-scheduler, nova-api and nova-conductor services.


Overview

The nova-cloud-controller charm deploys a suite of OpenStack Nova services:

Usage

Configuration

This section covers common and/or important configuration options. See file config.yaml for the full list of options, along with their descriptions and default values. See the Juju documentation for details on configuring applications.

cache-known-hosts

Controls whether or not the charm will use the current cache for hostname/IP resolution queries for nova-compute units. This occurs whenever information that is passed over the nova-compute:cloud-compute relation changes (e.g. a nova-compute unit is added). The default value is 'true'. See section SSH host lookup caching for details.

console-proxy-ip

Sets a client accessible proxy IP address that allows for VM console access. It should route to the nova-cloud-controller unit when the application is not under HA. When it is, the value of 'local' will point to the VIP.

Ensure that option console-access-protocol is set to a value other than 'None'.

VNC clients should be configured accordingly. In the case of a VIP, it will need to be determined.

console-access-protocol

Specifies the protocol to use when accessing the console of a VM. Supported values are: 'None', 'spice', 'xvpvnc', 'novnc', and 'vnc' (for both xvpvnc and novnc). Type 'xvpvnc' is not supported with UCA release 'bionic-ussuri' or with series 'focal' or later.

Caution: VMs are configured with a specific protocol at creation time. Console access for existing VMs will therefore break if this value is changed to something different.

network-manager

Defines the network manager for the cloud. Supported values are:

  • 'FlatDHCPManager' for nova-network (the default)
  • 'FlatManager' - for nova-network
  • 'Neutron' - for a full SDN solution

When using 'Neutron' the neutron-gateway charm should be used to provide L3 routing and DHCP Services.

openstack-origin

States the software sources. A common value is an OpenStack UCA release (e.g. 'cloud:bionic-ussuri' or 'cloud:focal-wallaby'). See Ubuntu Cloud Archive. The underlying host's existing apt sources will be used if this option is not specified (this behaviour can be explicitly chosen by using the value of 'distro').

Deployment

These deployment instructions assume the following applications are present: keystone, rabbitmq-server, neutron-api, nova-compute, and a cloud database.

File ncc.yaml contains an example configuration:

   nova-cloud-controller:
     network-manager: Neutron
     openstack-origin: cloud:focal-wallaby

Nova cloud controller is often containerised. Here a single unit is deployed to a new container on machine '3':

juju deploy --to lxd:3 --config ncc.yaml nova-cloud-controller

Note: The cloud's database is determined by the series: prior to focal percona-cluster is used, otherwise it is mysql-innodb-cluster. In the example deployment below mysql-innodb-cluster is used.

Join nova-cloud-controller to the cloud database:

juju deploy mysql-router ncc-mysql-router
juju add-relation ncc-mysql-router:db-router mysql-innodb-cluster:db-router
juju add-relation ncc-mysql-router:shared-db nova-cloud-controller:shared-db

Five additional relations can be added:

juju add-relation nova-cloud-controller:identity-service keystone:identity-service
juju add-relation nova-cloud-controller:amqp rabbitmq-server:amqp
juju add-relation nova-cloud-controller:neutron-api neutron-api:neutron-api
juju add-relation nova-cloud-controller:cloud-compute nova-compute:cloud-compute

TLS

Enable TLS by adding a relation to an existing vault application:

juju add-relation nova-cloud-controller:certificates vault:certificates

See Managing TLS certificates in the OpenStack Charms Deployment Guide for more information on TLS.

Note: This charm also supports TLS configuration via charm options ssl_cert, ssl_key, and ssl_ca.

Actions

This section covers Juju actions supported by the charm. Actions allow specific operations to be performed on a per-unit basis. To display action descriptions run juju actions --schema nova-cloud-controller. If the charm is not deployed then see file actions.yaml.

  • archive-data
  • clear-unit-knownhost-cache
  • openstack-upgrade
  • pause
  • resume
  • security-checklist
  • sync-compute-availability-zones

High availability

When more than one unit is deployed with the hacluster application the charm will bring up an HA active/active cluster.

There are two mutually exclusive high availability options: using virtual IP(s) or DNS. In both cases the hacluster subordinate charm is used to provide the Corosync and Pacemaker backend HA functionality.

See OpenStack high availability in the OpenStack Charms Deployment Guide for details.

Spaces

This charm supports the use of Juju Network Spaces, allowing the charm to be bound to network space configurations managed directly by Juju. This is only supported with Juju 2.0 and above.

API endpoints can be bound to distinct network spaces supporting the network separation of public, internal and admin endpoints.

Access to the underlying MySQL instance can also be bound to a specific space using the shared-db relation.

To use this feature, use the --bind option when deploying the charm:

juju deploy nova-cloud-controller --bind \
   "public=public-space \
    internal=internal-space \
    admin=admin-space \
    shared-db=internal-space"

Alternatively, these can also be provided as part of a Juju native bundle configuration:

    nova-cloud-controller:
      charm: cs:xenial/nova-cloud-controller
      num_units: 1
      bindings:
        public: public-space
        admin: admin-space
        internal: internal-space
        shared-db: internal-space

Note: Spaces must be configured in the underlying provider prior to attempting to use them.

Note: Existing deployments using os-*-network configuration options will continue to function; these options are preferred over any network space binding provided if set.

Charm-managed quotas

The charm can optionally set project quotas, which affect both new and existing projects. These quotas are set with the following configuration options:

  • quota-cores
  • quota-count-usage-from-placement
  • quota-injected-files
  • quota-injected-file-size
  • quota-injected-path-size
  • quota-instances
  • quota-key-pairs
  • quota-metadata-items
  • quota-ram
  • quota-server-groups
  • quota-server-group-members

Given that OpenStack quotas can be set in a variety of ways, the order of precedence (from higher to lower) for the enforcing of quotas is:

  1. quotas set by the operator manually
  2. quotas set by the nova-cloud-controller charm
  3. default quotas of the OpenStack service

For information on OpenStack quotas see Manage quotas in the Nova documentation.

SSH host lookup caching

Caching SSH known hosts reduces 'cloud-compute' hook execution time. It does this by reducing the number of lookups performed by the nova-cloud-controller charm during SSH connection negotiations when distributing a new unit's SSH keys among existing units of the same application group. These keys are needed for VM migrations to succeed.

The cache is populated (or refreshed) when option cache-known-hosts is set to 'false', in which case DNS lookups are always performed. The cache is queried by the charm when it is set to 'true', where a lookup is only performed (adding the result to the cache) when the cache is unable satisfy the query.

When a modification is made to DNS resolution, the clear-unit-knownhost-cache action should be used. This action refreshes the charm's cache and updates the known_hosts file on the nova-compute units. Information can be updated selectively by targeting a specific unit, an application group, or all application groups:

juju run-action --wait nova-cloud-controller/0 clear-unit-knownhost-cache target=nova-compute/2
juju run-action --wait nova-cloud-controller/0 clear-unit-knownhost-cache target=nova-compute
juju run-action --wait nova-cloud-controller/0 clear-unit-knownhost-cache

When nova-cloud-controller is under HA, the same invocation must be run on all nova-cloud-controller units.

Policy overrides

Policy overrides is an advanced feature that allows an operator to override the default policy of an OpenStack service. The policies that the service supports, the defaults it implements in its code, and the defaults that a charm may include should all be clearly understood before proceeding.

Caution: It is possible to break the system (for tenants and other services) if policies are incorrectly applied to the service.

Policy statements are placed in a YAML file. This file (or files) is then (ZIP) compressed into a single file and used as an application resource. The override is then enabled via a Boolean charm option.

Here are the essential commands (filenames are arbitrary):

zip overrides.zip override-file.yaml
juju attach-resource nova-cloud-controller policyd-override=overrides.zip
juju config nova-cloud-controller use-policyd-override=true

See appendix Policy overrides in the OpenStack Charms Deployment Guide for a thorough treatment of this feature.

Documentation

The OpenStack Charms project maintains two documentation guides:

Bugs

Please report bugs on Launchpad.


Configuration

action-managed-upgrade
(boolean) If True enables openstack upgrades for this charm via juju actions. You will still need to set openstack-origin to the new repository but instead of an upgrade running automatically across all units, it will wait for you to execute the openstack-upgrade action for this charm on each unit. If False it will revert to existing behavior of upgrading all units on config change.
api-rate-limit-rules
(string) The API rate-limit rules to use for the deployed nova API, if any. Contents of this config options will be inserted in the api-paste.ini file under the "filter:ratelimit" section as "limits". . The syntax for these rules is documented at: http://docs.openstack.org/kilo/config-reference/content/configuring-compute-API.html
bridge-interface
(string) Bridge interface to be configured.
br100
bridge-ip
(string) IP to be assigned to bridge interface.
11.0.0.1
bridge-netmask
(string) Netmask to be assigned to bridge interface.
255.255.255.0
cache-known-hosts
(boolean) Caching is a strategy to reduce the hook execution time when 'cloud-compute' relation data changes. . If true, the charm will query the cache as needed and only perform a lookup (and add a cache entry) when an entry is not available in the cache. . If false, the charm will not query the cache, lookups will always be performed, and the cache will be populated (or refreshed). . If there is a possibility that DNS resolution may change during a cloud deployment then lookups may be inconsistent. In this case it may be preferable to keep the option false and only change it to true post deployment. . The 'clear-unit-knownhost-cache' action refreshes the cache (with forced lookups) and updates the knownhost file on nova-compute units.
True
config-flags
(string) Comma-separated list of key=value config flags. These values will be placed in the nova.conf [DEFAULT] section.
console-access-port
(int) Used to customize the console access port.
console-access-protocol
(string) Protocol to use when accessing virtual machine console. Supported types are None, spice, xvpvnc, novnc and vnc (for both xvpvnc and novnc). . NOTE: xvpvnc is not supported with bionic/ussuri or focal (or later) releases.
console-keymap
(string) Console keymap.
en-us
console-proxy-ip
(string) If console-access-protocol != None then this is the ip published to clients for access to console proxy. Set to local for the ip address of the nova-cloud-controller serving the request to be used.
local
console-ssl-cert
(string) DEPRECATED: Please use ssl_cert configuration option or the vault certificates relation. This configuration option will be removed in the 19.07 charm release. . Used for encrypted console connections. This differs from the SSL certificate used for API endpoints and is used for console sessions only. Setting this value along with console-ssl-key will enable encrypted console sessions. This has nothing to do with Nova API SSL and can be used independently. This can be used in conjunction when console-access-protocol is set to 'novnc' or 'spice'.
console-ssl-key
(string) DEPRECATED: Please use ssl_key configuration option or the vault certificates relation. This configuration option will be removed in the 19.07 charm release. . SSL key to use with certificate specified as console-ssl-cert.
cpu-allocation-ratio
(float) The per physical core -> virtual core ratio to use in the Nova scheduler. . Increasing this value will increase instance density on compute nodes at the expense of instance performance.
16
cross-az-attach
(boolean) 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. This also means care should be taken when booting an instance from a volume where source is not "volume" because Nova will attempt to create a volume using the same availability zone as what is assigned to the instance. . If that AZ is not in Cinder, the volume create request will fail and the instance will fail the build request. . By default there is no availability zone restriction on volume attach.
True
database
(string) Database name.
nova
database-user
(string) Username for database access.
nova
debug
(boolean) Enable debug logging.
disable-aws-compat
(boolean) For OpenStack Icehouse, Juno and Kilo by default a compatibility layer for EC2 and S3 is configured, setting this option to `true` the services are stopped and disabled.
disk-allocation-ratio
(float) Increase the amount of disk space that nova can overcommit to guests. . Increasing this value will increase instance density on compute nodes with an increased risk of hypervisor storage becoming full.
1
dns-ha
(boolean) Use DNS HA with MAAS 2.0. Note if this is set do not set vip settings below.
enable-new-services
(boolean) Enable new nova-compute services on this host automatically. When a new nova-compute service starts up, it gets registered in the database as an enabled service. Sometimes it can be useful to register new compute services in disabled state and then enabled them at a later point in time. This option only sets this behavior for nova-compute services, it does not auto-disable other services like nova-conductor, nova-scheduler, nova-consoleauth, or nova-osapi_compute. Possible values: True: Each new compute service is enabled as soon as it registers itself. False: Compute services must be enabled via an os-services REST API call or with the CLI with nova service-enable <hostname> <binary>, otherwise they are not ready to use.
True
enable-serial-console
(boolean) Enable serial console access to instances using websockets (insecure). This is only supported on OpenStack Juno or later, and will disable the normal console-log output for an instance.
ha-bindiface
(string) Default network interface on which HA cluster will bind to communication with the other members of the HA Cluster.
eth0
ha-mcastport
(int) Default multicast port number that will be used to communicate between HA Cluster nodes.
5404
haproxy-client-timeout
(int) Client timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 90000ms is used.
haproxy-connect-timeout
(int) Connect timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 9000ms is used.
haproxy-queue-timeout
(int) Queue timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 9000ms is used.
haproxy-server-timeout
(int) Server timeout configuration in ms for haproxy, used in HA configurations. If not provided, default value of 90000ms is used.
harden
(string) Apply system hardening. Supports a space-delimited list of modules to run. Supported modules currently include os, ssh, apache and mysql.
nagios_context
(string) Used by the nrpe-external-master subordinate charm. A string that will be prepended to instance name to set the host name in nagios. So for instance the hostname would be something like: . juju-myservice-0 . If you're running multiple environments with the same services in them this allows you to differentiate between them.
juju
nagios_servicegroups
(string) A comma-separated list of nagios servicegroups. If left empty, the nagios_context will be used as the servicegroup.
network-manager
(string) Network manager for the cloud; supports the following options: . FlatDHCPManager (nova-network) (default) FlatManager (nova-network) Neutron (Full SDN solution) . When using the Neutron option you will most likely want to use the neutron-gateway charm to provide L3 routing and DHCP Services.
FlatDHCPManager
neutron-external-network
(string) Name of the external network for floating IP addresses provided by Neutron.
ext_net
notification-format
(string) Specifies which notification format shall be used by nova-cloud-controller. . Starting in the Pike release, the notification_format includes both the versioned and unversioned message notifications. Ceilometer does not yet consume the versioned message notifications, so intentionally make the default notification format unversioned until this is implemented. . Possible Values are both, versioned, unversioned.
unversioned
nova-alchemy-flags
(string) Comma-separated list of key=value sqlalchemy related config flags to be set in nova.conf [database] section.
openstack-origin
(string) Repository from which to install. May be one of the following: distro (default), ppa:somecustom/ppa, a deb url sources entry, or a supported Ubuntu Cloud Archive e.g. . cloud:<series>-<openstack-release> cloud:<series>-<openstack-release>/updates cloud:<series>-<openstack-release>/staging cloud:<series>-<openstack-release>/proposed . See https://wiki.ubuntu.com/OpenStack/CloudArchive for info on which cloud archives are available and supported. . NOTE: updating this setting to a source that is known to provide a later version of OpenStack will trigger a software upgrade unless action-managed-upgrade is set to True.
distro
os-admin-hostname
(string) The hostname or address of the admin endpoints provided by the nova-cloud-controller in the keystone identity provider. . This value will be used for admin endpoints. For example, an os-admin-hostname set to 'ncc.admin.example.com' with ssl enabled will create a admin endpoint for as: . https://ncc.admin.example.com:8775/v2/$(tenant_id)s
os-admin-network
(string) The IP address and netmask of the OpenStack Admin network (e.g. 192.168.0.0/24) . This network will be used for admin endpoints.
os-internal-hostname
(string) The hostname or address of the internal endpoints provided by the nova-cloud-controller in the keystone identity provider. . This value will be used for internal endpoints. For example, an os-internal-hostname set to 'ncc.internal.example.com' with ssl enabled will create a internal endpoint as: . https://ncc.internal.example.com:8775/v2/$(tenant_id)s
os-internal-network
(string) The IP address and netmask of the OpenStack Internal network (e.g. 192.168.0.0/24) . This network will be used for internal endpoints.
os-public-hostname
(string) The hostname or address of the public endpoints provided by the nova-cloud-controller in the keystone identity provider. . This value will be used for public endpoints. For example, an os-public-hostname set to 'ncc.example.com' with ssl enabled will create public endpoints such as: . https://ncc.example.com:8775/v2/$(tenant_id)s
os-public-network
(string) The IP address and netmask of the OpenStack Public network (e.g. 192.168.0.0/24) . This network will be used for public endpoints.
pci-alias
(string) The pci-passthrough-whitelist option of nova-compute charm is used for specifying which PCI devices are allowed passthrough. pci-alias is more a convenience that can be used in conjunction with Nova flavor properties to automatically assign required PCI devices to new instances. You could, for example, have a GPU flavor or a SR-IOV flavor: . pci-alias='{"vendor_id":"8086","product_id":"10ca","name":"a1"}' . This configures a new PCI alias 'a1' which will request a PCI device with a vendor id of 0x8086 and a product id of 10ca. . For more information about the syntax of pci_alias, refer to https://docs.openstack.org/ocata/config-reference/compute/config-options.html
prefer-ipv6
(boolean) If True enables IPv6 support. The charm will expect network interfaces to be configured with an IPv6 address. If set to False (default) IPv4 is expected. . NOTE: these charms do not currently support IPv6 privacy extension. In order for this charm to function correctly, the privacy extension must be disabled and a non-temporary address must be configured/available on your network interface.
quota-cores
(int) The number of instance cores or vCPUs allowed per project. Possible Values are positive integers or 0 and -1 to disable the quota.
quota-count-usage-from-placement
(boolean) Setting this to True, enables the counting of quota usage from the placement service. . By default, the parameter is False and Nova will count quota usage for instances, cores, and ram from its cell databases. . This is only supported on OpenStack Train or later releases.
quota-injected-file-size
(int) The number of bytes allowed per injected file. . Possible Values are positive integers or 0 and -1 to disable the quota.
quota-injected-files
(int) The number of injected files allowed. . File injection allows users to customize the personality of an instance by injecting data into it upon boot. Only text file injection is permitted: binary or ZIP files are not accepted. During file injection, any existing files that match specified files are renamed to include .bak extension appended with a timestamp. . Possible Values are positive integers or 0 and -1 to disable the quota.
quota-injected-path-size
(int) The maximum allowed injected file path length. . Possible Values are positive integers or 0 and -1 to disable the quota.
quota-instances
(int) The number of instances allowed per project. Possible Values are positive integers or 0 and -1 to disable the quota.
quota-key-pairs
(int) The maximum number of key pairs allowed per user. . Users can create at least one key pair for each project and use the key pair for multiple instances that belong to that project. . Possible Values are positive integers or 0 and -1 to disable the quota.
quota-metadata-items
(int) The number of metadata items allowed per instance. . Users can associate metadata with an instance during instance creation. This metadata takes the form of key-value pairs. . Possible Values are positive integers or 0 and -1 to disable the quota.
quota-ram
(int) The number of megabytes of instance RAM allowed per project. Possible Values are positive integers or 0 and -1 to disable the quota.
quota-server-group-members
(int) The maximum number of servers per server group. Not supported in Icehouse and before . Possible Values are positive integers or 0 and -1 to disable the quota.
quota-server-groups
(int) The maxiumum number of server groups per project. Not supported in Icehouse and before . Server groups are used to control the affinity and anti-affinity scheduling policy for a group of servers or instances. Reducing the quota will not affect any existing group, but new servers will not be allowed into groups that have become over quota. . Possible Values are positive integers or 0 and -1 to disable the quota.
rabbit-user
(string) Username used to access rabbitmq queue.
nova
rabbit-vhost
(string) Rabbitmq vhost.
openstack
ram-allocation-ratio
(float) The physical ram -> virtual ram ratio to use in the Nova scheduler. . Increasing this value will increase instance density on compute nodes at the potential expense of instance performance. . NOTE: When in a hyper-converged architecture, make sure to make enough room for infrastructure services running on your compute hosts by adjusting this value.
0.98
region
(string) OpenStack Region
RegionOne
scheduler-default-filters
(string) List of filter class names to use for filtering hosts when not specified in the request. The default filters varies based on OpenStack release.
scheduler-host-subset-size
(int) The value to be configured for the host_subset_size property on FilterScheduler. This property sets the size of the subset of best hosts selected by the scheduler. . When a new instance is created, it will be scheduled on a host chosen randomly from a subset of the best hosts with the size set by this property. . Possible Values are positive integers. Any value less than 1 will be treated as 1.
service-guard
(boolean) Ensure required relations are made and complete before allowing services to be started . By default, services may be up and accepting API request from install onwards. . Enabling this flag ensures that services will not be started until the minimum 'core relations' have been made between this charm and other charms. . For this charm the following relations must be made: . * shared-db * amqp * identity-service
skip-hosts-with-build-failures
(boolean) Allow the scheduler to avoid building instances on hosts that had recent build failures. . Since it is generally possible for an end user to cause build failures - for example by providing a bad image - and maliciously reduce the pool of available hypervisors, this option is disabled by default. . Enable to allow the scheduler to work around malfunctioning computes and favor instance build reliability, at the cost of a potentially uneven cloud utilization. . Note: only effective from Pike onward
spice-agent-enabled
(boolean) Enable the SPICE guest agent support on the instances. . The Spice agent works with the Spice protocol to offer a better guest console experience. However, the Spice console can still be used without the Spice Agent. . For Windows guests is recommended to set this to configuration option to False and for those images set the property hw_pointer_model=usbtablet
True
ssl_ca
(string) SSL CA to use with the certificate and key provided - this is only required if you are providing a privately signed ssl_cert and ssl_key.
ssl_cert
(string) SSL certificate to install and use for API ports. Setting this value and ssl_key will enable reverse proxying, point Nova's entry in the Keystone catalog to use https, and override any certificate and key issued by Keystone (if it is configured to do so).
ssl_key
(string) SSL key to use with certificate specified as ssl_cert.
unique-server-names
(string) Sets the scope of the check for unique instance names. . An empty value (the default) means that no uniqueness check is done and duplicate names are possible. 'project': The instance name check is done only for instances within the same project. 'global': The instance name check is done for all instances regardless of the project.
use-internal-endpoints
(boolean) Openstack mostly defaults to using public endpoints for internal communication between services. If set to True this option will configure services to use internal endpoints where possible.
use-policyd-override
(boolean) If True then use the resource file named 'policyd-override' to install override YAML files in the service's policy.d directory. The resource file should be a ZIP file containing at least one yaml file with a .yaml or .yml extension. If False then remove the overrides.
use-syslog
(boolean) Setting this to True will allow supporting services to log to syslog.
vendor-data
(string) A JSON-formatted string that will serve as vendor metadata (via "StaticJSON" provider) to all VM's within an OpenStack deployment, regardless of project or domain. For deployments prior to Rocky and if metadata is configured to be provided by neutron-gateway, this value should be set in the neutron-gateway charm.
vendor-data-url
(string) A URL serving JSON-formatted data that will serve as vendor metadata (via "DynamicJSON" provider) to all VM's within an OpenStack deployment, regardless of project or domain. . Only supported in OpenStack Newton and higher. For deployments prior to Rocky and if metadata is configured to be provided by neutron-gateway, this value should be set in the neutron-gateway charm.
verbose
(boolean) Enable verbose logging.
vip
(string) Virtual IP(s) to use to front API services in HA configuration. . If multiple networks are being used, a VIP should be provided for each network, separated by spaces.
vip_cidr
(int) Default CIDR netmask to use for HA vip when it cannot be automatically determined.
24
vip_iface
(string) Default network interface to use for HA vip when it cannot be automatically determined.
eth0
worker-multiplier
(float) The CPU core multiplier to use when configuring worker processes for this service. By default, the number of workers for each daemon is set to twice the number of CPU cores a service unit has. This default value will be capped to 4 workers unless this configuration option is set.