44 Commits

Author SHA1 Message Date
Pete Vander Giessen
6dd262cd2b Moved etc/nuetron into /etc/snap-nova-hypervisor
Neglected to move these files the first time around.

Change-Id: I9b48da098761caebe1ecaa7b00f31c83c5acbf0b
2017-08-11 15:50:39 +00:00
Pete Vander Giessen
6a11f694d4 Added config files to snap.
This is part of a transition to storing the config files in the snap,
rather than in snapstack.

Also updated .gitignore to ignore emacs temp files and snapcraft
cruft.

Change-Id: Ic08196c14649ed27178453335935acc7ea990455
2017-08-10 19:55:18 +00:00
Jenkins
c3a469e00e Merge "Updated proxy env var passthrough in tox.ini" 2017-08-10 18:59:36 +00:00
Corey Bryant
895eae04f0 Update README snap install command
This snap is now being published to ocata/edge only.

Change-Id: I4c1e204e7d599b3c5e6e89a2822f960db52c714b
2017-08-09 17:08:51 -04:00
Pete Vander Giessen
a7895934fe Updated proxy env var passthrough in tox.ini
We made a breaking change to snapstack. SNAP_BUILD_PROXY ->
SNAPSTACK_HTTP/S_PROXY.

Change-Id: Ieb05c7f9870c500aac6e8c4c7befa6b447dbc461
2017-08-08 14:03:10 +00:00
Pete Vander Giessen
8f43785d63 Added snapstack test.
Tweaked tox.ini to invoke snapstack, and added test_snapstack.py to
tests dir.

Also added nova-hypervisor.sh to nova-hypervisor/tests, as part of the
plan to move those scripts from snap-test to the individual snaps.

Change-Id: I2e0363d361893a899b6cd4e4683e6d14bac1a0ed
2017-07-27 19:00:16 +00:00
Corey Bryant
3f0b92da64 Drop nova-hypervisor interface connection commands
Now that the nova-hypervisor's interfaces are all auto-connected
at install time [1], drop the manual connection commands from the
README.

[1] https://forum.snapcraft.io/t/auto-connecting-the-nova-hypervisor-interfaces/1145/19

Change-Id: I9cbf12d582b0bf12348f9c8f73f5970af9c01664
2017-07-11 20:27:22 +00:00
Corey Bryant
73681fbe5d Use auto-alias for neutron-*-cleanup
The current snaps now have well-known aliases defined at install time
for commands [1]. This means we can drop the manual alias definition
from snapcraft.yaml and the instructions for setting it up.

When building/installing locally users can still create the aliases
with 'snap alias'.

[1] https://forum.snapcraft.io/t/auto-aliases-for-openstack-base-snaps/1146/6

Change-Id: I2eef1705d5e1c01e4f8b76ebdbbaf64374df7272
2017-07-11 20:22:41 +00:00
Corey Bryant
a5f537e3b3 Drop system-trace connection from README
This is inline with the recent change that dropped system-trace
from snapcraft.yaml plugs.

Change-Id: I7db90e496f38ac0ce76fe6efd12eed420d3d75fc
2017-07-05 16:21:16 +00:00
Corey Bryant
a4e24ec597 Install conntrack from Debian package
Building conntrack from source is failing on ppc64 due to:
"build-aux/config.guess: unable to guess system type". We want to
move as many of the commands to stage-packages as possible to get
the benefit of security team support, so let's move conntrack to
stage-packages as a start.

Change-Id: Icb66d012ca516e55a295da05be59c680879c865e
2017-07-05 16:17:33 +00:00
Corey Bryant
fd95ab5997 Drop unnecessary interfaces
It appears we don't need to use the account-control and
kernel-module-control interfaces.

* account-control: This is no longer needed, possibly because we've patched
  the offending call via patches/drop-use-of-fchownat.patch.

* kernel-module-control: While we get a denial for sys_module, it doesn't
  appear to be adversely affecting anything while testing. For more details,
  see [1].

[1] https://forum.snapcraft.io/t/auto-connecting-the-nova-hypervisor-interfaces/1145/10

Change-Id: Ifa666d6070dbb746dcf6fa18cad1789ff237f38e
2017-07-03 19:15:07 +00:00
Corey Bryant
e8173abb91 Add patches to drop use of setuid and fchownat
Drop use of setuid and fchownat as they're not covered by any current
plugs and the code isn't required because in strict mode everything runs
as root.

Change-Id: Ic4f0dd6029c869595e35adc343d55e35d50e0d33
2017-06-30 18:45:04 +00:00
Corey Bryant
753a8077f3 Drop uuid-runtime and add coreutils stage-package
* Drop uuid-runtime from openvswitch stage-packages as it doesn't appear to
  be required. On a related note, the snap currently requires the openvswitch
  Debian package to be installed, which has a dependency on uuid-runtime.

* Add coreutils stage-package to nova part to enable use of /bin/chmod.

Change-Id: If673f37b78e681af79e1de48c4542cc37e2f14ea
2017-06-30 18:43:06 +00:00
Corey Bryant
f62ba3e8f8 Interface updates including chmod and sys_module
* Add account-control plug: This is required to enable chmod calls.

* Add kernel-module-control plug: This is required to enable the sys_module
  capability.

* Drop system-trace plug: This was raised during the review for auto-connecting
  interfaces for the nova-hypervisor snap [1]. The system-trace plug gives
  privileged access to all processes on the system, so ideally we don't want to
  connect it. I haven't hit any issues when testing without it.

  [1] forum.snapcraft.io/t/auto-connecting-the-nova-hypervisor-interfaces/1145

Change-Id: I9de1b0fff4e98df48a60202af53057f8edf662ba
2017-06-30 18:19:30 +00:00
Corey Bryant
676aef1290 Allow dhcp to work correctly:
* Add missing tools: conntrack, dhcp_release(6), dhcp_lease_time
* Patch dnsmasq to drop setuid

Change-Id: I1c2d9d8e0e30a4ca0c9bf67ad50782b448505e86
2017-06-30 17:58:24 +00:00
Corey Bryant
214d6b1a4d Remove dangling symlink before copying to iptables-xml
The launchpad build was failing with the following:
  cp: not writing through dangling symlink
  '/build/nova-hypervisor/parts/iptables/install/bin/iptables-xml'

Update the cp command to remove existing destination file before
attempting to open it.

Change-Id: I50e6a1e7a1d5a558e502d5613a188f24392554e8
2017-06-26 14:52:58 +00:00
Corey Bryant
e580bc461d Fix symlink violation for $SNAP/bin/iptables-xml
The snap store upload was failing with "package contains external
symlinks: bin/iptables-xml". This is because $SNAP/bin/iptables-xml
was symlinked to /sbin/xtables-multi.

Configflags such as --binddir and --sbindir, among others, don't appear
to help. As a result, just manually copy $SNAP/sbin/xtables-multi to
$SNAP/bin/iptables-xml in the install scriptlet.

Change-Id: I85a2584add41d3e8bad84a4af3914333a05371f7
2017-06-22 17:56:46 +00:00
Corey Bryant
5e028582ce Switch back to strict confinement
The following are included in the switch to strict confinement:
* Set snapcraft.yaml confinement to strict and restore/update plugs
* Drop building of python as it's not required for strict snaps
* Switch back to running apps under root
* Build bridge-utils, iptables, iproute2, and libxml2 into snap

Change-Id: I58bc68a946b832ddba5630abf9f2fd5174afed65
2017-06-22 12:12:15 +00:00
Corey Bryant
90b0ac1560 Patch (_COMMON) dirs into oslo.config defaults
Change-Id: Ifa1409569d9449043826b34c5b4504e431a775a8
2017-06-22 00:47:26 +00:00
Corey Bryant
6e1268b593 Switch from conf.d to <project>.conf.d
This aligns with the extension that oslo.config expects.

Change-Id: I87eca8870c98492e2e7ddbc3c983a9c74c9a3c9a
2017-06-16 18:11:57 +00:00
Corey Bryant
5fa1fef7ff Enable override of config files
Enable the ability for default config files to be overridden.

Also refresh the README while documenting how default config files can
be overridden.

Change-Id: I809c98090e68a2ecddf56971da10f13e3eb6000c
2017-06-05 10:19:19 -04:00
Corey Bryant
d9950811ee Define alias' for neutron-ovs-cleanup and neutron-netns-cleanup
Change-Id: I4eaeb96638c092de933b1f4f2039de6f95e79cdb
2017-05-22 17:39:51 -04:00
Corey Bryant
59790f6b59 Use both SNAP and SNAP_COMMON with --config-file
Change-Id: I711d20faed1f0eaf92ad7d4977e35a080b0bed02
2017-05-18 18:20:41 +00:00
Corey Bryant
78c8c92b4b Drop privileges when running commands
Drop privileges to a regular user when running commands defined
by this snap.

Change-Id: I6b4526a53432992c201f0b2693598bd7f090b3a1
2017-05-18 17:02:12 +00:00
Corey Bryant
d9e1e5bfb2 Drop apostrophe from template
Template wasn't rendering with the apostrophe, so drop it.

Change-Id: I7e36fdbefba4ecb4536a234362b73dbedf33b9db
2017-05-04 21:51:13 +00:00
Corey Bryant
8cdd348c85 Use full paths to binaries and set instances_path
Change-Id: Iedcf8b72ab96120df24d59b5fe9a56955f3cd690
2017-05-03 18:57:31 +00:00
Corey Bryant
7529ca1b81 Base this snap on stable Ocata tar file
Change-Id: I396b19c71dbc04730d0f2f0b48875b440cc6956c
2017-05-03 18:56:38 +00:00
Corey Bryant
7b489d4242 Add libxml2-dev and libxslt1-dev to build-packages
Change-Id: I95274754ea5baf82f858f4f740fffad9a29e0979
2017-05-03 18:32:59 +00:00
Corey Bryant
0ee36dc24a Compile python and set environment variables
Classic python snaps require python to be compiled from source.
Additionally, this change adds environment variables required for
command execution. We'll do this until the environment dictionary
is fully supported by snapd, at which point we can use it instead.
Finally, use a fixed python path in order to get the correct
site-specific config.

These changes were recommended in the following bug:
https://bugs.launchpad.net/snapcraft/+bug/1675479

Change-Id: I09f552c330b5651105c547842b61b3ae737d61ce
2017-04-24 21:03:25 +00:00
Corey Bryant
d731331bc5 Touch namespace package __init__.py files
This is a work-around for https://bugs.launchpad.net/bugs/1675479,
where namespace packages aren't installed correctly.

Change-Id: I0147c6f3c6b97ba0c67c383e04cebb9b4928961f
2017-04-24 14:34:05 +00:00
Corey Bryant
7d540c988b Switch to classic confinement
Classic confinement drops apparmor/seccomp sandboxing and enables
dropping privileges to a regular user when running services.

We will continue to store all of the snap's files in $SNAP* directories
and $SNAP_COMMON is used as the root directory where setup dirs,
templates, and copyfiles are installed.

Change-Id: I3d8d2160a2fd6fadae65491fcd4e479b7a6d66b6
2017-04-24 14:30:37 +00:00
James Page
67273af6d7 Enable use of openvswitch interface now its landed in snapd
Change-Id: I7c85de8f501288214e3cc9609c2326f623bf9578
2016-12-15 15:07:08 +00:00
James Page
2a0fe46cce Add hardware-observe interface for nova-compute to allow physical host introspection 2016-12-01 14:02:57 +00:00
James Page
2c7d0c84e2 Fixup misc typos 2016-11-30 10:40:55 +00:00
James Page
90e28774de Basic hygene tidy 2016-11-30 10:39:13 +00:00
James Page
9eecf1f265 Disable kernel module build for ipset 2016-11-29 17:21:15 +00:00
James Page
f6fcb5c9e4 Add some default tunnel types, set firewall_driver correctly for ovs 2016-11-29 16:06:57 +00:00
James Page
4be25a11a5 Add nova-api-metadata agent for local access for neutron-metadata-agent 2016-11-29 14:53:15 +00:00
James Page
766a7f52f5 Add workaround for disabling rootwrap for now 2016-11-29 14:14:25 +00:00
James Page
f63616e538 Updates prior to first publish to snap store 2016-11-29 13:48:14 +00:00
James Page
2994aa17ff Add use of openvswitch interface (wip), keep sudo running to placate ovs-agent, drop override of root_helper 2016-11-28 18:13:17 +00:00
James Page
7ebc576f51 Drop full ovs build, libvirt + qemu builds, add dnsmasq for neutron-dhcp-agent use 2016-11-28 17:20:30 +00:00
James Page
1c4f5794a0 Misc updates, inclusion of libvirt and qemu 2016-11-28 09:54:22 +00:00
James Page
dcd50354c3 Initial baseline of hypervisor snap 2016-11-24 09:16:50 +00:00