Juju Charm - Nova Compute
Go to file
Ryan Beisner 6868b47b3e
Update pre-install hooks to fail on error
The pre-install operations may fail, yet that failure is not
elevated to the user. This masks the failure and makes early
package install issues difficult to troubleshoot.

If the basic pre-install script fails, the charm should not
proceed to later hooks as the requirements may not be met.

Hashbangs for bash should specify -e (errexit) on all of the
pre-install bash scripts.

Change-Id: I5532e6468fe4a9caffab81f890ab245bf441dfd4
Closes-bug: #1815243
Partial-bug: #1815231
2019-02-08 15:56:19 -06:00
actions Remove orphan symlink 2018-05-28 08:47:04 +02:00
files Support libvirt group instead of libvirtd when hugepages set up 2018-02-07 12:18:30 +09:00
hooks Update pre-install hooks to fail on error 2019-02-08 15:56:19 -06:00
lib Update tox.ini files from release-tools gold copy 2016-09-09 19:43:02 +00:00
templates Merge "Enable support for auto-converge and post-copy" 2019-01-09 12:01:26 +00:00
tests Don't include libvirtd on pause/resume 2019-01-25 16:51:59 -03:00
unit_tests Install multipath dependencies when use-multipath is True 2019-02-04 19:55:49 -07:00
.coveragerc Finish up: new templates, ssh key creation, Makefile. 2013-08-01 16:21:58 -07:00
.gitignore Fix up amulet for queens 2018-02-25 16:06:08 +00:00
.gitreview Add gitreview prior to migration to openstack 2016-02-24 21:53:34 +00:00
.project [trivial] fixup pydev project 2013-11-17 21:48:39 +00:00
.pydevproject Fixup kilo configs 2015-03-24 17:52:45 +00:00
.testr.conf Add tox support 2015-10-30 14:49:18 +09:00
.zuul.yaml import zuul job settings from project-config 2018-09-11 13:18:20 -04:00
LICENSE Re-license charm as Apache-2.0 2016-07-03 16:37:37 +00:00
Makefile Tests dir no longer need copy of charmhelpers 2018-10-10 12:41:06 +00:00
README.md Allow Juju AZ context information to be used 2018-10-09 14:02:12 +00:00
actions.yaml Add action to retrieve hugepage config 2018-05-16 22:22:46 +02:00
charm-helpers-hooks.yaml Update repo to do ch-sync from Git 2017-09-26 09:54:13 +02:00
config.yaml Install multipath dependencies when use-multipath is True 2019-02-04 19:55:49 -07:00
copyright Re-license charm as Apache-2.0 2016-07-03 16:37:37 +00:00
hardening.yaml Add hardening support 2016-03-24 11:18:41 +00:00
icon.svg Update charm icon 2017-08-02 18:21:57 +01:00
metadata.yaml Merge "Remove databases relation" 2018-07-17 15:01:24 +00:00
requirements.txt Update requirements 2018-10-03 13:10:59 -05:00
revision [hopem] added support for libvirt RBD imagebackend 2014-06-02 19:37:32 +01:00
test-requirements.txt Update requirements 2018-10-03 13:10:59 -05:00
tox.ini fix tox python3 overrides 2018-11-02 01:00:01 +00:00

README.md

Overview

This charm provides Nova Compute, the OpenStack compute service. Its target platform is Ubuntu (preferably LTS) + OpenStack.

Usage

The following interfaces are provided:

  • cloud-compute - Used to relate (at least) with one or more of nova-cloud-controller, glance, ceph, cinder, mysql, ceilometer-agent, rabbitmq-server, neutron

  • nrpe-external-master - Used to generate Nagios checks.

Database

Nova compute only requires database access if using nova-network. If using Neutron, no direct database access is required and the shared-db relation need not be added.

Networking

This charm support nova-network (legacy) and Neutron networking.

Storage

This charm supports a number of different storage backends depending on your hypervisor type and storage relations.

In order to have cinder ceph rbd support for Openstack Ocata and newer releases, ceph-access relation must be added to cinder-ceph to allow nova-compute units to communicate with multiple ceph backends using different cephx keys and user names.

$ juju add-relation nova-compute cinder-ceph

See LP Bug #1671422 for more information.

Availability Zones

There are two options to provide default_availability_zone config for nova nodes:

  • default-availability-zone
  • customize-failure-domain

The order of precedence is as follows:

  1. Information from a Juju provider (JUJU_AVAILABILITY_ZONE) if customize-failure-domain is set to True and Juju has set the JUJU_AVAILABILITY_ZONE to a non-empty value;
  2. The value of default-availability-zone will be used if customize-failure-domain is set to True but no JUJU_AVAILABILITY_ZONE is provided via hook context by the Juju provider;
  3. Otherwise, the value of default-availability-zone charm option will be used.

The default_availability_zone in Nova affects scheduling if a given Nova node was not placed into an aggregate with an availability zone present as a property by an operator. Using customize-failure-domain is recommended as it provides AZ-aware scheduling out of the box if an operator specifies an AZ during instance creation.

These options also affect the AZ propagated down to networking subordinates which is useful for AZ-aware Neutron agent scheduling.

NFV support

This charm (in conjunction with the nova-cloud-controller and neutron-api charms) supports use of nova-compute nodes configured for use in Telco NFV deployments; specifically the following configuration options (yaml excerpt):

nova-compute:
  hugepages: 60%
  vcpu-pin-set: "^0,^2"
  reserved-host-memory: 1024
  pci-passthrough-whitelist: {"vendor_id":"1137","product_id":"0071","address":"*:0a:00.*","physical_network":"physnet1"}

In this example, compute nodes will be configured with 60% of available RAM for hugepage use (decreasing memory fragmentation in virtual machines, improving performance), and Nova will be configured to reserve CPU cores 0 and 2 and 1024M of RAM for host usage and use the supplied PCI device whitelist as PCI devices that as consumable by virtual machines, including any mapping to underlying provider network names (used for SR-IOV VF/PF port scheduling with Nova and Neutron's SR-IOV support).

The vcpu-pin-set configuration option is a comma-separated list of physical CPU numbers that virtual CPUs can be allocated to by default. Each element should be either a single CPU number, a range of CPU numbers, or a caret followed by a CPU number to be excluded from a previous range. For example:

vcpu-pin-set: "4-12,^8,15"

The pci-passthrough-whitelist configuration must be specified as follows:

A JSON dictionary which describe a whitelisted PCI device. It should take the following format:

["device_id": "<id>",] ["product_id": "<id>",]
["address": "[[[[<domain>]:]<bus>]:][<slot>][.[<function>]]" |
"devname": "PCI Device Name",]
{"tag": "<tag_value>",}

where '[' indicates zero or one occurrences, '{' indicates zero or multiple occurrences, and '|' mutually exclusive options. Note that any missing fields are automatically wildcarded. Valid examples are:

pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet"}

pci-passthrough-whitelist: {"address":"*:0a:00.*"}

pci-passthrough-whitelist: {"address":":0a:00.", "physical_network":"physnet1"}

pci-passthrough-whitelist: {"vendor_id":"1137", "product_id":"0071"}

pci-passthrough-whitelist: {"vendor_id":"1137", "product_id":"0071", "address": "0000:0a:00.1", "physical_network":"physnet1"}

The following is invalid, as it specifies mutually exclusive options:

pci-passthrough-whitelist: {"devname":"eth0", "physical_network":"physnet", "address":"*:0a:00.*"}

A JSON list of JSON dictionaries corresponding to the above format. For example:

pci-passthrough-whitelist: [{"product_id":"0001", "vendor_id":"8086"}, {"product_id":"0002", "vendor_id":"8086"}]`

The OpenStack advanced networking documentation provides further details on whitelist configuration and how to create instances with Neutron ports wired to SR-IOV devices.