Commit Graph

11 Commits (f61cbbf72fa0432fc9b1c228169ac83a449867cd)

Author SHA1 Message Date
Dmitrii Shcherbakov f61cbbf72f Switch to Firefox from PhantomJS
As PhantomJS is no longer maintained and there are packaging problems,
let's switch to using Firefox in a headless configuration which is a
scenario supported by Selenium.

Change-Id: Ic98c5b71202f033b9013c126f6bacdb49980acfa
2020-04-23 16:24:22 +03:00
Zuul 214f0e8d5b Merge "Test fixes and tweaks" 2020-04-03 16:14:41 +00:00
Pete Vander Giessen f6c44fb77a Test fixes and tweaks
Fixed issue where tests/ was ignorning DISTRO env

Added SNAP_FILE env variable, which allows tests to be run on an
abitrary .snap file. For example, one fetch with `snap download`.

Change-Id: Ie6cce841e00d6d56d0525d0a81c4faad3c54e8e8
2020-04-02 18:11:56 +00:00
Pete Vander Giessen c123af21d3 Strict confinement related fixes
(Not complete strict confinement, but these don't break anything
devmode related, and get us closer to having strict confinement

Added more needed interfaces to snapcraft.yaml.

Created a wrapper around dnsmasq so that we can run as the snap_daemon
user. Added snap_daemon user to snapcraft.yaml.

Added a utility script for connecting interfaces that don't auto
connect (tools/ Not useful for production, but saves a lot
of time when testing.

libvirt no longer uses unix sock group "sudo" (can't run setguid in
strict confinement).

Got rid of "find_missing_plugins" in init script. By the time we
release strict confinement to production, all those plugins will auto

Change-Id: I8324ac7bd0332c41cac17703eb15d7301e7babf3
2020-04-02 17:31:54 +00:00
Pete Vander Giessen 5611bc9759 Strict confinement (devmode)
Make MicroStack strictly confined, albeit in devmode for now.

Addresses unpredictable breakages with apt package upgrades in eoan
and focal, and sets the stage for a better isolated, less fragile snap
going forward.

We now use layouts to handle libvirt and qemu setting paths at compile
time. This is cleaner than the organize hack.

Moved away from calls to systemctl in init, as a strictly confined
snap cannot call systemctl on a non snappy system.

Disabled call to sysctl to set ipv4_fowarding, as we don't have access
to sysctl in a strictly confined snap. This may break some users, and
we need to figure out a way to address the breakage.

Got rid of routine, moving rabbitmq setup into a
bash script instead (it's just cleaner).

Moved keypair creation into launch script, as it's difficult to do
sensible things with keypair creation in the init script, which is
running using sudo, and therefore doesn't have access to

Added (but commented out) code that will check to verify that plugs
are connected before running microstack.init or ovs-vsctl. This code
may go away entirely, as we plan on auto connecting all of our
interfaces, and don't technically need to guard against not having
them connected.

Added temporary local upper-constraints file, to fix an issue where
upstream upper-constraints was breaking pip install by setting a
neutron version. This needs a better long term fix, but works for now.

Closes-bug: 1860660
Change-Id: Iaf1f1482609f05285ed9061317b32e90bffd2da0
2020-03-05 09:31:15 +00:00
Pete Vander Giessen 725e299308 Fixes for snapcraft 3.9.x
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
2020-01-29 14:49:03 +00:00
Pete Vander Giessen a89f5574c3 Added microstack.remove command
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

Rerranged entry points a bit (moved some things into to make
code sharing easier, and to prevent a proliferation of entry point
scripts in our root dir.

Change-Id: I9ff25864cd96ada3a9b3da8992c2b33955eff0b4
Closes-Bug: #1852147
2019-12-17 17:11:32 +00:00
Pete Vander Giessen 1a25e50a17 Made horizon, rabbit and mysql ports configurable
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
2019-11-27 15:27:54 +00:00
Pete Vander Giessen 960685b91e Added refresh tests
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, 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

Refactored and 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
2019-11-20 21:35:51 +00:00
Pete Vander Giessen cb940157ab Fix Eoan.
Moved to pure Python where clib conflicts arose in using command line

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
2019-11-05 03:22:42 +00:00
Pete Vander Giessen dfd1d5ec68 Added testing for control nodes
Ported to, and folded in

Made a testing framework for shared components.


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 to tools/ 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
2019-10-16 15:44:38 +00:00