962 Commits

Author SHA1 Message Date
Jenkins
c1fb99e35f Merge "Expose metadata config options" 2017-01-25 16:46:35 +00:00
Liam Young
71a303db65 Expose metadata config options
Expose the 'enable_metadata_network' and 'enable_isolated_metadata'
configuration options. enable_isolated_metadata enables metadata the
metadata service on networks with no router port.

Change-Id: If773109007a456385adebf295d044247417135db
Closes-Bug: 1514901
2017-01-25 14:39:20 +00:00
Edward Hope-Morley
03091ad65b Add debug entry to nova.conf templates
This was previously missing making it impossible to
enable debug logging for nova-api-metadata service.

Change-Id: I7a88c4c6bb325909fc2f9046b4c266194360fe1b
Closes-Bug: 1657487
2017-01-18 15:18:39 +00:00
Corey Bryant
7917aa021e Sync charm-helpers to pick up Ocata UCA support
Change-Id: I7d6ecc1f92a545436c5c7dccee7d68399b8cbeb0
2016-12-07 10:47:18 -05:00
Jenkins
36cedfe527 Merge "Update Amulet defs, series metadata and c-h sync" 2016-12-07 13:22:02 +00:00
Ryan Beisner
c72c0bf75a Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable.

- Fix test executable hashbangs for virtualenv prep.

- Add Yakkety-Newton Amulet test definitions.

- Prep Xenial-Ocata Amulet test definitions (not yet enabled).

- Prep Zesty-Ocata Amulet test definitions (not yet enabled).

- Remove Precise charm series metadata if present.

- Remove Precise Amulet test definitions if present.

Change-Id: Iebca0e30342d35e9c2344d9f1f527ca9c64129d0
2016-12-06 16:40:55 +00:00
Jenkins
3ec6bdf690 Merge "newton: legacy external networking support" 2016-12-06 11:33:07 +00:00
James Page
2a89032bbd newton: legacy external networking support
For OpenStack Newton, the external network bridge configuration
default switched from br-ex to '' inline with the preferred
method of configuring external networks using provider networks
via the l2 agent (instead of the l3 agent).

This had the side effect of breaking support for legacy style
networking.

Set:

  external_network_bridge = br-ex

in the event that new style external networking is not being used
to preserve backwards compatibility for now.

Note that this option will be removed in Ocata, so environments
need to upgrade to the preferred method of external networking in
order to stay supported.

Change-Id: Id929c0fa9baa0ecf0168d4d08f93939b56f847ab
Closes-Bug: 1634966
2016-11-23 11:21:18 +00:00
Ante Karamatic
0bd0e84823 Use proper dnsmasq config file when dnsmasq-flags are set
Instead of using that file only when instance-mtu is defined, it should also be used when dnsmasq-flags are defined.

Change-Id: Ib753d428a65025f79613798e58c987942dcd1495
Closes-Bug: #1642501
2016-11-17 09:29:32 +01:00
gecong1973
52994e3782 Replace LOG.warn with LOG.warning
logging.warn is deprecated in Python 3.[1]
[1] https://docs.python.org/3/library/logging.html#logging.warning

Change-Id: I9812372ca32497e7806a4b365aef2670ef7ad9af
2016-11-16 15:57:49 +08:00
David Ames
c9488cff61 Newton apparmor fixes
In newton neutron-lbaas-agent has been renamed neutron-lbaasv2-agent.
The apparmor profile and resource map requires updates to handle this.

Change-Id: Ia8ac50e5e7fa32139528b90d82dfdd1489a2173a
Depends-On: I69b4e3c38b7b24c4ef93010e5612faf377d7a67a
2016-10-12 16:45:51 -07:00
Ryan Beisner
3821e0a3d5 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: I69b4e3c38b7b24c4ef93010e5612faf377d7a67a
2016-10-12 21:05:00 +01:00
James Page
25030b687b OVS ODL always uses l3-agent
The change in:

  If1bc6151e8bb9b23eaac94662f4d18ff63040af2

accidentally switch the charm to use the neutron-vpn-agent for OVSi
ODL deployments; this is incorrect and breaks functional tests in
the odl-controller charm.

Moved the logic that switches l3->vpn back into OVS plugin mode
only so that OVS ODL uses l3-agent always.

Change-Id: I968a09217a5058191509650d080752d2a4aa1455
2016-10-12 17:36:00 +01:00
James Page
b77fc3b1a5 Fix packages and restart map for ovs-odl
OpenStack Newton drops support for LBaaS v1; ensure that
OVS ODL integration aligns with OVS ML2 integration and
switches to the lbaasv2 agent package for >= newton.

Change-Id: If1bc6151e8bb9b23eaac94662f4d18ff63040af2
Closes-Bug: 1632660
2016-10-12 14:30:10 +01:00
Liam Young
a5b680daa6 Correct package list post-upgrade
The list of packages to install post-upgrade was being retrieved
using the pre-upgrade OpenStack release version due to the
os_release function using a caches value.

This change syncs in charmhelpers which includes the reset_os_release
function to clear the cache. This charm now uses that function to
clear the cache after the dist-upgrade

Change-Id: I23f7af2b464c7e710423c15122c06bcea84e27a3
Closes-Bug: 1631897
2016-10-10 12:38:06 +00:00
David Ames
19203bc59b Pre-release charm-helpers sync 16.10
Get each charm up to date with lp:charm-helpers for release testing.

Change-Id: I35999e4310b199929a87aafd1b2b7900b97aff9f
2016-09-30 09:09:31 -07:00
David Ames
83d0ad0238 Add apparmor template for neutron services
Add support for application of apparmor profiles to
neutron and nova daemons that run on neutron-gateway
units.

By default this is disabled but may be enabled by setting
the aa-profile-mode option to ether 'complain' or 'enforce'.

Note that the apparmor profiles do not try to reproduce the
permissions required for all operations that may be undertaken
using oslo.rootwrap; daemons are granted permission to run
'sudo' without any apparmor based restrictions.

Change-Id: Ibe568a46ee4c1f1148c162f0f0b2907153770efe
2016-09-28 23:06:50 +00:00
James Page
d8943bba30 Add support for application version
Juju 2.0 provides support for display of the version of
an application deployed by a charm in juju status.

Insert the os_application_version_set function into the
existing assess_status function - this gets called after
all hook executions, and periodically after that, so any
changes in package versions due to normal system updates
will also be reflected in the status output.

This review also includes a resync of charm-helpers to
pickup hookenv and contrib.openstack support for this
feature.

Change-Id: I3d763c10b9e597ea5d3deca04960b8e032b08521
2016-09-20 12:29:10 +01:00
Jenkins
6e34edb6d2 Merge "Add charm series data to metadata.yaml" 2016-09-15 13:10:55 +00:00
James Page
714afdfbea Add charm series data to metadata.yaml
This optimizes the publication process to the charm store, and
ensures that the charm code and version is consistent across all
supported Ubuntu series.

Change-Id: I19cc9c52abde2ce1f700c858343baffe1ceab257
2016-09-14 09:31:52 +01:00
Edward Hope-Morley
279ae9a3ee Use rpc_notifier driver for notifications
list_notifier was deprecated a very long time ago so
all versions since Icehouse should use the
rpc_notifier.

Also removed unnecessary amulet test that is causing
race conditions.

Change-Id: I44a2e6f2cc98f58373eddc50aa0dea268e94c753
Closes-Bug: 1620564
2016-09-12 14:37:56 +01:00
Ryan Beisner
76a20a615c Update tox.ini files from release-tools gold copy
All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Also create empty dirs with .keep files where necessary.
Some classic charms have actions and/or lib dirs, and some
do not. In all classic charms, flake will now check those
dirs to ensure lint coverage of existing or future content.

Change-Id: I95470bdd2d544e657ceccb240235e734a70987ee
2016-09-09 19:43:18 +00:00
Jenkins
2a89c5d35f Merge "Various fixes for deploy from source" 2016-09-09 13:51:24 +00:00
Jenkins
9213f84b6e Merge "Update tox.ini files from release-tools gold copy" 2016-09-08 15:40:04 +00:00
Corey Bryant
9c67db390c Various fixes for deploy from source
* Add arping to base install packages
* Install nova configs
* Drop neutron-lbaas-agent in Newton
* Add symlinks to pip installed nova-rootwrap, nova-rootwrap-daemon
  and neutron-ns-metadata-proxy

Change-Id: I1edf8324644430e07dab9333e666d1760195f5e5
2016-09-07 16:06:42 +00:00
Ryan Beisner
fc7f4512e9 Update tox.ini files from release-tools gold copy
All OpenStack Charms now contain identical tox.ini files,
not to be modified or made unique within each charm repo.

This is to ensure consistency across charm repos in tox
target naming, approach and purpose, also giving the
charm dev and test experience additional consistency.

Change-Id: I02bb4fa2978c548d8d8df00ce3add2b98bb65593
2016-09-06 22:09:13 +00:00
James Page
cd9f61d465 Switch to LBaaS v2 for OpenStack Newton
OpenStack Newton drops support for LBaaS v1; Switch to using the
v2 agent, with associate new template for driver options.

Upgrades from Mitaka will work as the old neutron-lbaas-agent
package will be removed as part of the dist-upgrade to the new
Newton packages and then the new neutron-lbaasv2-agent package
will be installed (as prescribed in the upstream migration
documentation).

Change-Id: I7ef26aca2f86f663366d463aeb3695ff5a402661
2016-09-06 17:09:41 +01:00
Jenkins
1f53fc8379 Merge "Enable neutron gw charm to control # of workers" 2016-08-12 23:35:35 +00:00
Narinder Gupta
93d6440e45 Enable neutron gw charm to control # of workers
Charm was missing this functionality and this patch is to add
this feature. We were trying to deploy this charm on bare metal
host machine with 72 cores. In end up creating 144 processes for
nova-metadata-api, and neutron.

This patch will provide the option to limit the number of worker
process in case of high number of cores in a host.

Enable it for icehouse, kilo, liberty and mitaka.

Partial-Bug: 1600482
Change-Id: Iedcbe6c53746a203937b78dd00e83fda7681bd8f
2016-08-12 10:56:42 -07:00
Corey Bryant
843705205b Use os_release() and blacklist python-pymysql for DFS
Use os_release() instead of get_os_codename_install_source() to
determine the OpenStack release where possible.  Make this change
in all paths that deploy from source uses because it checks both
openstack-origin and openstack-origin-git when determining the
release.

Also don't install python-pymysql deb when deploying from source.

Change-Id: I0b8ea17c5b06ef8ab6cf6c4cfd0a2f4721615b91
2016-08-10 14:12:43 +00:00
Liam Young
c7d3f0da7b Pre 1607 release charm-helpers sync
Sync charmhelpers to pick up bug fixes for 1607 release

Change-Id: Iba9fab03a12d07dae14d54c9d080ff807af8ad94
2016-07-21 14:21:08 +00:00
James Page
3addbcebbb Enable use of use_neutron flag
For mitaka onwards, use of the 'use_neutron' flag should be made
instead of setting the network API class.

For newton, this is required as the network_api_class is ignored.

Change-Id: Idcf2d080b90909f4b52b45826118d7c6be20ae05
2016-07-20 14:13:32 +01:00
James Page
34fbfcfb08 Use bundletester for amulet test execution
Switch to using bundletester for execution of functional tests,
leveraging tox to build out test virtualenvs.

Rename amulet tests inline with gate-* and dfs-* naming standards.

Update README to refer to functional testing section of the charm
guide.

Change-Id: I9b36f8a6375da5cf5807d51e1d009c47d74dc1dd
2016-07-18 17:58:02 +01:00
David Ames
017f641a50 Pre-release charm-helpers sync
To begin release testing get each charm up to date with lp:charm-helpers

Change-Id: Ib5307473c7cba65c816bed923c1ed82e2d988f47
2016-07-15 10:17:41 -07:00
Corey Bryant
8e6381d958 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: I37a1cc5f767cbc4d035ee534437ff66ca7100751
2016-07-13 19:25:40 +00:00
James Page
68ea83e60d Avoid restart races for nova-api-metadata
It's possible that the nova-api-metadata will startup during the
time that the nova-conductor processes on the nova-cloud-controller
units are still starting up, resulting in a messaging timeout which
causes the daemon to exit 0.

Upstart will restart a service in this scenario, however systemd is
configured in packaging to only restart 'on-failure' so will not
attempt to restart.

This points to two other bugs - one that a messaging timeout results
in a exit code of 0, and that the OpenStack services under systemd
behave differently to under upstart.

Install an override file for systemd based installs to mimic the
behaviour of upstart, and deal with a code logic problem in the
restart_trigger handling to ensure that the charm does at least
try to restart the nova-api-metadata service at the right points
in time.

Change-Id: Ia08b7840efa33fd301d0e2c55bb30ae1a102cbfa
Closes-Bug: 1547122
2016-07-12 13:02:39 +01:00
James Page
1fd4c20f5d Use correct relation key for restarts
The nova-cloud-controller charm set the relation key 'restart_trigger';
this charm was using 'restart_nonce' which obviously never gets set,
so the nova-api-metadata service would never actually get restarted
when required.

Use the correct relation key, fixing remote restart triggers for
nova-api-metadata, resolving races in deployment.

Change-Id: Ic3dbdd41f87c0362f7f725d0f58458f5239ea093
Closes-Bug: 1547122
2016-07-08 17:48:42 +01:00
Corey Bryant
21b20ccf14 Add systemd init support for deploy from source
systemd is used instead of upstart by default since Ubuntu 15.10
(Wily).  This adds systemd init file support for nova services
that are deployed from source.

Change-Id: I784e6b9908222995c56c9f3c06cc54f0254d4761
2016-07-07 11:00:30 +01:00
James Page
7491779846 Resync charmhelpers for licensing change
The charm-helpers project have re-licensed to Apache 2.0
inline with the agreed licensing approach to intefaces,
layers and charms generally.

Resync helpers to bring charmhelpers inline with charm
codebase.

Change-Id: Ia808bc55096986285bfb5d27852387be2ec416f8
2016-07-06 16:37:54 +01:00
James Page
1ae03b0f8e Switch to using charm-store for amulet tests
All OpenStack charms are now directly published to the charm store
on landing; switch Amulet helper to resolve charms using the
charm store rather than bzr branches, removing the lag between
charm changes landing and being available for other charms to
use for testing.

This is also important for new layered charms where the charm must
be build and published prior to being consumable.

Change-Id: I543ac243b4e8c3deb7c88d641d0f50bda812d284
2016-06-23 09:59:56 +01:00
Jenkins
381fed32c3 Merge "Add defaults for openstack-origin-git config option" 2016-06-23 08:09:13 +00:00
Corey Bryant
8f01c3aec6 Add defaults for openstack-origin-git config option
openstack-origin-git currently only supports YAML that specifies
the git repositories to deploy from.

This adds support for default openstack-origin-git values. The
default values supported are: icehouse, kilo, liberty, mitaka,
and master.  For example: openstack-origin-git=master.

Change-Id: Ib2e0224f70e51d2686b6bb1f28e6ad528621eafb
2016-06-16 14:29:26 +00:00
Alex Kavanagh
0322be6cc6 Fix for multiple status-set - related to bug 1588462
This change fixes the obvious race for a status_set() between
check_optional_interfaces() and assess_status() as the later calls the former
which calls status_set(), returns the status, which is then potentially set
again by the assess_status() function.  This cleans up the code so that only a
single status_set() is performed when calling assess_status().

Change-Id: I05e071d635819c516ab76684842a25a9c2f81d83
Related-Bug:#1588462
2016-06-16 10:55:57 +00:00
Jenkins
a55b96215f Merge "Support new style (and multiple) external networks" 2016-06-15 14:12:30 +00:00
Trent Lloyd
5dee017f12 Support new style (and multiple) external networks
Switch the generated configuration to use "new" style external
networks when ext-port is not set.  In this case we configure
external_network_bridge = (intentionally blank),
gateway_external_network_id = (blank) and update the README with
information on using this new style of configuration.

The current template configures external networks by using the default
external_network_bridge=br-ex (implied when not set).  This activates
legacy code which assumes that a single external network exists on
that bridge and the L3 Agent directly plugs itself in.
provider:network_type, provider:physical_network and
provider:segmentation_id are ignored.  You cannot create multiple
networks and you cannot use segmented networks (e.g. VLAN)

By setting external_network_bridge = (intentionally blank) the L2
Agent handles the configuration instead, this allows us to create
multiple networks and also to use more complex network configurations
such as VLAN.  It is also possible to use the same physical connection
with different segmentation IDs for both internal and external
networks, as well as multiple external networks.

Legacy/existing configurations where ext-port is set generate the same
configuration as previous and should continue to work as before.  I do
not believe it to be easy to migrate existing setups to the "new"
style configuration automatically as changes to the neutron network
configuration may be required (specifically: provider:physical_network
will now be used when it was not before, and may not be correct) and
the physical port needs to be moved from br-ex to br-data which the
charm does not currently handle and is likely to error as it does not
attempt removal first.  Further work may be possible in this area.

For information about this new style of configuration being preferred,
see discussions in LP#1491668, LP#1525059 and
http://docs.openstack.org/liberty/networking-guide/scenario-classic-ovs.html

Change-Id: I8d2bb8098e080969e0445293b1ed79714b2c964f
Related-Bug: #1491668
Related-Bug: #1525059
Closes-Bug: #1536768
2016-06-14 17:45:47 +01:00
James Page
5d90c55f43 Resync charm helpers
Add support for OpenStack Newton and Ocata.

Rework version detection code to just match on major version for
OpenStack projects using semantic versioning.

Provide fallback version detection based on major.minor versions
for swift packages.

Rework config-flags support helpers.

Fix is_ip function to correctly detect both IPv4 and IPv6 addresses.

Change-Id: Ib8ba1c709494c844b61a0654956bbd41b875d986
2016-05-27 12:28:24 +01:00
James Page
5e1d6e88ff Resync charm-helpers
Avoid use of 'service --status-all' which is currently
broken on trusty for upstart managed daemons; the change
moves to detecting how the daemon is managed, and then
using upstart status XXX or the return code of service XXX
status to determine whether a process is running.

Fixes for IPv6 network address detection under Ubuntu
16.04 which changes the output format of the ip commands
slightly.

Update the version map to include 8.1.x as a Neutron
version for Mitaka.

Change-Id: If3a1e835d201f10a05236ba06623699a2ad8e09b
Closes-Bug: 1581171
Closes-Bug: 1581598
Closes-Bug: 1580674
2016-05-18 14:08:15 +01:00
Liam Young
8dd2af43c1 Nova conf needs domain information
Running nova-api-metadata service on mitaka with keystone v3
enabled currently fails to authenticate when querying the neutron
server. This is because it is not passing the project and user
domain information. this change adds that in as per the Mitaka
installation guide.

Change-Id: Id6921392a634585f9551e64ec12e42460252d2e5
2016-04-18 06:12:08 +00:00
James Page
045ce8a4bd Drop use of neutron-plugin-metering-agent
As the minimum OpenStack release supported is now Icehouse
which provided the neutron-metering-agent package, switch
to using this by default for ovs and ovs-odl plugin types.

Resolves install failures for ovs-odl on Xenial/Mitaka where
the neutron-plugin-metering-agent transitional package has
been removed.

Change-Id: I431bef69b597bc9c55ed6f4c35552e6f1b707d30
2016-04-14 11:08:12 +01:00
James Page
c287278881 Restart nova-api-metadata on restart_nonce changes
The nova-cloud-controller presents a restart_nonce key on the
quantum-network-service relation once db migration has been
completed and the nova-conductor service is able to respond to
RPC calls.

Restart the nova-api-metadata when this data changes to ensure
a running service post deployment.

Change-Id: Iafc27fbb2a70e3195fc189e4056a1ca58ff6b663
Closes-Bug: 1547122
2016-04-14 10:04:13 +01:00