- Snapped binary packages of Filebeat, NRPE and Telegraf (disabled by default)
- Added W/A of Telegraf segfault after ELF patching by snapcraft
- Implemented IPMI input tuning for Telegraf
- Allowed to run NRPE as root:root (from custom PPA)
- Implemented Filebeat, NRPE and Telegraf control scripts and config on top of snap-overlay
- Added support for checking Microstack systemd services by NRPE
- Added few generic and Microstack-specific NRPE checks
- Added possibility to override default config paths for the daemons
- Added support for in-band IPMI input to Telegraf
- Stick LMA wrappers and services naming to Microstack conventions
- Increase build timeout in .zuul conf by 30min
Change-Id: I68dbdb11248cf0c1e22e9333af3cf0f88954f557
We are now building with a version of snapcraft and snapd that doesn't
need the passthrough property for "after" commands in a daemon. We can
get rid of the properties, which will allow us to upload to the snap
store automatically, as a bonus.
Change-Id: I6defdac64f7b61a2894f3d6417597f7d03bc61d4
Added build-environment to qemu (works around issue where patchelf was
not finding libs).
Added hack to force wrapping of all non bash apps, to work around
snapd issue with multiple instances of PATH in the snap environment.
Also snuck in fix for horizon build. Horizon is specified in upstream
constraints now, which means that our build fails if we try to build
it from source in the same part that looks at the constriants file.
Misc fixes to make the tests nicer.
Change-Id: I50c88878c4f9dbb07006cab899a717e334be07d0
Running microstack.remove will remove the br-ex virtual bridge device,
then uninstall MicroStack.
We do this because we can't use ovs-ctl to remove the bridge as part
of a remove hook, as the Open vSwitch daemons are not running at that
point. The microstack.remove command gives operators a way to cleanly
uninstall the snap, without needing to reboot to get rid of br-ex.
Added test exercising the code to test_basic.py.
Rerranged entry points a bit (moved some things into main.py) to make
code sharing easier, and to prevent a proliferation of entry point
scripts in our root dir.
Change-Id: I9ff25864cd96ada3a9b3da8992c2b33955eff0b4
Closes-Bug: #1852147
Fixed backticks so that they actually wrap the whole command.
Added code to gamely make a guess about the username of the launched
instance and the location of the ssh key. Falls back on placeholders
if it can't.
Closes-bug 1850586
Change-Id: I980ee8617dfc4bf7c60846052d66ff18cf8aa8e9
Added a script to tools that makes it a bit easier to spin up a
checkout of the MicroStack source in a vm, in preparation for making a
change and testing a build.
Change-Id: I6b88c99f4c3bfa22e82bc740193c1993776eb757
Addresses requests to make it easier to avoid conflicts between the
Horizon dashboard and http services that might already be running on
the machine.
Configurable via snap config. Exposing via arguments to .init and
testing post init configuration is left for a separate PR.
Eventually, these may move to non standard ports by default. This PR
sets the stage for that, but further discussion is needed before we
decide whether to implement.
(This commit also contains a sneaky fix for the username display at the
end of the launch script.)
Closes-Bug: 1814829
Change-Id: If728d6ec8024bca4d3e809637fbdcc03ed4e6934
This change prevents builds in the gate from timing out while pulling
the iptables part, which was happening with increasing frequency.
The part was originally added in an attempt to isolate ourselves
better from the host system, despite being classically confined. This
approach was unreliable -- it doesn't work particularly well for
commands requiring sudo. We can back off this change (especially since
we've removed the special pathing that pointed us at the snapcraft
built iptables anyway -- I think that the part is superfluous).
In addition to the automated tests, I have verified that the following
work:
1. xenial and eoan installs
2. clustering
3. refresh from beta and edge
Change-Id: I7d314eccc0433e54a800ed47add684c2e0fa6565
Closes-bug: 1854081
Now happens in a template, just like all the other values, which fixes
an issue where it doesn't get overridden during an upgrade.
Change-Id: Ied84ddc0282c77de6797f90efc8923ae66a9d59e
Broke default config settings into a separate script, which the
install hook always called, and post-refresh calls if it can't find
the new config hierarchy.
This fixes issues w/ upgrading from beta to edge.
Change-Id: I6b11109c2a2f6aca142a18c9fa274b332891d5c8
When refreshing a snap, set-br-ex could fail because the iptables
rules that it sets were already setup. We now exit zero if this is
true, which prevents us from breaking on upgrades.
Change-Id: Ibfee98cabfa3e35bf53dbd191de2cf46f3709a51
Refactored test framework so that we have more flexibility in terms of
installing various versions of microstack before and after running
some tests. Moved in class "globals" into per instance variables,
to avoid broken cases with incomplete cleanup.
Added test_refresh.py, plus matching env in tox.
Refresh tests will fail currently, because we have some pending issues
that break refreshes. Fixing those is a subject for a different
commit.
Refactored cluster_test.py and control_test.py to use new framework.
Should (and do) pass.
Framework now cleans up multipass hosts regardless of whether or not
the tests passed. Leaning on the .tar.gz for local troubleshooting
helps us make it better for in gate troubleshooting.
Change-Id: I6a45b39132f5959c2944fe1ebbe10f71408ee777
Now reflects current build process, and has correct url to source code.
Also changed references to "microstack" and "Microstack" to
"MicroStack".
Change-Id: I60f6a28c3e47ed785692e59c0de79e298e437900
Closes-Bug: 1846979
Previously, the snap set up a bridge using the default 10.20.20.0/24
network upon install. If there was a good reason not to use this
network (e.g., it already exists and is being used for another
purpose), MicroStack, and the host machine, could wind up in a broken
state.
This PR delays setting up the bridge until after we have given an
operator a chance to override the default settings.
This has been manually tested. To test, do the following:
1) Checkout the code, and run tox -e build
2) Run tools/make-a-microstack.sh
3) snapctl set config.network.ext-cidr and config.network.ext-gateway
4) Run microstack_init
5) Exit the snap shell and run microstack.launch
Change-Id: I9e268495f313b29d9781d80a2468fc0a1a450aa0
Closes-Bug: https://bugs.launchpad.net/microstack/+bug/1851521
Remove some of the redundancy in tox.ini.
Fixed some lint issues that weren't caught before due to gaps in the
linting coverage.
I think that there's more work to be done here, but this does make
things better than they were before.
Change-Id: I82487dbb9366f3de16b25615bd081b6315671655
Added a question which allows off host access to horizon
dashboard. Activated it by default, as that's probably what people are
going to actually want.
Change-Id: I0d5bccb3b2eb2b409072d8ae5f8b923942386119
Moved to pure Python where clib conflicts arose in using command line
tools.
Fixed erroneous assumptions about the presence and reliability of a
$HOME variable while running init.
Added tests specific to eoan, disco and xenial. They are not yet part
of the gate.
Change-Id: I2fc74fcc2ae9876442bb87a3446aef48d0428f2f
This enables basic clustering functionality. We add:
tools/cluster/cluster/daemon.py: A server that handles validation of
cluster passwords.
tools/cluster/cluster/client.py: A client for this server.
Important Note: This prototype does not support TLS, and the
functionality in the client and server is basic. Before we roll
clustering out to production, we need to have those two chat over TLS,
and be much more careful about verifying credentials.
Also included ...
Various fixes and changes to the init script and config templates to
support cluster configuration, and allow for the fact that we may have
endpoint references for two network ips.
Updates to snapcraft.yaml, adding the new tooling.
A more formalized config infrastructure. It's still a TODO to move the
specification out of the implicit definition in the install hook, and
into a nice, explicit, well documented yaml file.
Added nesting to the Question classes in the init script, as well as
strings pointing at config keys, rather than having the config be
implicitly indicated by the Question subclass' name. (This allows us
to put together a config spec that doesn't require the person reading
the spec to understand what Questions are, and how they are
implemented.)
Renamed and unified the "unit" and "lint" tox environments, to allow
for the multiple Python tools that we want to lint and test.
Added hooks in the init script to make it possible to do automated
testing, and added an automated test for a cluster. Run with "tox -e
cluster".
Added cirros image to snap, to work around sporadic issues downloading
it from download.cirros.net.
Removed ping logic from snap, to workaround failures in gate. Need to
add it back in once we fix them.
Change-Id: I44ccd16168a7ed41486464df8c9e22a14d71ccfd
Moved security rules and keypair creation into init first.
Launch script now takes image name as positional argument, and name of
instance as a named argument. This makes it work more like launch in
other Canonical tools.
Written in Python, for ease of maintenance.
--retry and --wait args allow it to behave like tests expect it to,
while humans will get a much more intuitive (and much less noisy)
experience.
Also increased time we wait for a ping on the host, to allow for
slower, pure qemu, emulation times, and bring it in line with what
Tempest does in similar situations.
Change-Id: I11dcc098012468e9c88dcc7af78cde6920f31ecd
Bump ovs to 2.11.1 to ensure alignment with Stein Cloud Archive.
This also means that the patches for OVS can be dropped as the
change was included in the 2.11.1 release.
Change-Id: I9896f1dbd80a2344565a752d6c697f0a3219c210
Ported basic-test.sh to test_basic.py, and folded in
test_horizonlogin.py.
Made a testing framework for shared components.
Added test_control.py
Got rid of default .stestr.conf, as we're going to have multiple tests
running, and one conf is confusing.
Manually ordering functional tests for now, as stestr noms too much
output, and runs things in parallel, which doesn't work for our
functional tests.
Skipping compute node test for now, as it won't work until we can
connect to a control node with databases and such.
Moved very-basic-test.sh to tools/make-a-microstack.sh. It's really
more of a tool for manual testing than an automated test.
Added test-requirements and updated gitignore.
Moved auto-detection of kvm extensions to init, rather than test, as
it makes more sense there.
Change-Id: Iba7f7fe07cbb066790f802cf2a7c87c68994062c
We will probably defer to the documentation once it's
ready and keep a more streamlined storefront here.
Change-Id: Ifb5dc23440eca6f4a706457aba7990299e5faf7b
Closes-Bug: 1841791
This lays the groundwork for interactive init, as well as being able
to specify control and compute nodes.
Added preliminary config lists for control and compute nodes. Added
appropriate default snapctl config settings in install script.
Also changed "binary" questions to "boolean" questions, as that's
better wording, and it means that my docstrings are not a confusing
mix of "boolean" and "binary" when I forget which term I used.
Snuck in a fix for the "basic" testing environment -- it was missing
the Python requirements, and was therefore failing!
Change-Id: I7f95ab68f924fa4d4280703c372b807cc7c77758
Move logging output for most services to systemd.
Add a hook in snap.openstack to tell OpenStack services to wait
until we set database.ready in the snap config before starting. This
prevents spamming systemd with error messages before we run
microstack.init (See matching PR against snap.openstack, coming soon.)
Incidentally fix issue w/ the way that shell.py was running
CalledProcessError and parsing output.
Order patches part after uca-sources, to work around an issue we
discovered with apt update while those two parts are running in
parallel. (python-apt segfaults, and no fun is had by anyone.)
Remaining gaps in our logging: systemd still displays some errors
during init, which might be fixable with further ordering of snapctl
start invocations. We're also relying on MySQL and RabbitMQ log output
to know when those services are started, so we haven't moved their
output to systemd just yet.
Dropped in a fix to work w/ updated version of snap.openstack.
Change-Id: I130ed730c14ab35b8b677b9c9f573fa6fe1e8f13
We want to allow operators to override Horizon's default
settings. This involves moving local_settings.d out of the read only
snap filesystem, and into $SNAP_COMMON. This is a little bit tricky.
First, we patch settings.py and local_settings.py as we're building the
snap, to include a LOCAL_PATH in $SNAP_COMMON.
Then, we add a template with the rest of our default overrides,
and write it out to $SNAP_COMMON/horizon/local_settings.d
Finally we tweak our tests so that we can give our overrides a
spin. As a bonus, this makes test_horizonglogin.py a lot easier to run
in our multipass testing scenario!
`tox -e basic` now also runs selenium tests, as well.
Change-Id: Ic0ce18cfa1b97a93191da749095d8aa2270d5aeb
Port the python2.7 local settings overrides to the python3.6 directory
structure.
Move all local_settings.py overrides into _05_snap_tweaks.py as part
of troubleshooting some remaining problems. Everything is more
organized and functional now :-)
Added selenium tests.
Change-Id: I54923e1dc9c7ffa47c2ef6fb90ea9d224b0d2eee
Move openstack-projects part from python2 to python3.
Add cloud archive.
Update qemu and libvirt versions to those from cloud archive (they
work with python3, while the distro packages versions don't).
Switch from rocky to stein.
Fetch libvirt and qemu sources via "apt source". Gets rid of sub
version hard coding in snapcraft.
Update hard coded references in tests to rocky from stein.
Change-Id: Idb38717998a13feaaf0782e880e540f28bc452a8
Just runs `tests/basic_test.sh -m` without building the snap
first. Useful for when you want to re-run the basic_test to verify
that a sporadic issue has been fixed, without rebuilding the snap each
time.
Counterargument: you could always just run `tests/basic_test.sh -m` on
its own. I find it easier to keep one test command in my fingers,
however, rather than having to switch between "tox plus args" and
"something else plus args"
Change-Id: I5ec28864ed41a4e11726df8aee1d31b8ef097f03
Renamed the old and outdated "configure-openstack" script to "init.sh"
Updated init.sh and folded most of the configure hook into it.
Removed database installation step from install hook.
We can now install microstack without a database dump, which helps
immensely in updating. And we have a logical place to put additional
configuraiton, including some of the manual steps in DEMO.md, which
could be scripted if we gave users a chance to skip the system changes
that they wanted to skip.
Also updated README and DEMO file to match new flow. Updated test
files.
Future cleanup and features documented in Trello, but not included in
this PR, which is big enough already :-)
Change-Id: I8d926a8b463124494ddb7a4696adbe86f89db7d5
Moved openstack env variables out of snapcraft.yaml, and into a
"microtack.rc".
Made openstack-wrapper, which auto sources microstack.rc.
Key off of revised snap.openstack, which supports snapctl config
values in templates. Moved a lot of the overlay into
snap-overlay/templates, and added config values to them. Also writes
templates just once, when you run snap-openstack setup.
Change-Id: Ib0f2e3fc97f491d9ed9dfbafc61dc8e27a8a2b48
This should fix the issue where the configure hook doesn't run
properly on systems without netcat installed.
Also got rid of call to install netcat in tools/install_and_build.sh.
Doubled timeout in .zuul.yaml to deal with timeout that happened
during this test (I think that we were pushing the hour timeout as it was).
Change-Id: Ie9cd729109a871c32c12108163d22008d91155f9
Tweaked tests/basic_test.sh functional test so that it no longer
requires multpass, and can run without kvm cpu extensions being
enabled (not all machines in the game have cpu extensions.)
Added tox.ini, wrapper script for building and installation, etc.
Change-Id: I968116dd7bec412a55813c896d60cfc86c7070db