Commit Graph

1345 Commits

Author SHA1 Message Date
Darragh Bailey
442ef24e64
Make switcher JavaScript unparsed and reduce elements (#1539)
Avoid the need to parse the main version switching menu creation and
handling code by moving the site constants to a separate file.

Additionally move more of the element construction into the JavaScript
code to make it closer to a web component and facilitate more control by
a common script to be loaded by all published versions.
2022-08-12 18:30:57 +01:00
Darragh Bailey
a60836e260
Merge pull request #1536 with maintenance improvements
Simple maintenance improvements
2022-08-10 10:17:25 +01:00
a1346054
f7ecf03232
Remove dependence on deprecated apt-key for installation 2022-08-09 09:10:19 +00:00
a1346054
af77b859e3
Trim trailing whitespace 2022-08-08 22:46:07 +00:00
a1346054
b87652701d
Losslessly compress logo
using `zopflipng -m --iterations=500 in.png out.png`
2022-08-08 22:45:41 +00:00
a1346054
fc996b795f
Stop mixing tabs and spaces 2022-08-08 22:44:45 +00:00
a1346054
759a851428
Add missing final newline 2022-08-08 22:44:45 +00:00
a1346054
dbd2d3fdce
Fix typos 2022-08-08 22:44:45 +00:00
a1346054
b5e3f156e3
Properly quote variable 2022-08-08 22:44:44 +00:00
a1346054
37261dc180
Protect against $VAGRANT_HOME containing a space 2022-08-08 22:44:41 +00:00
Darragh Bailey
8a2bae3535
Cache requests for plugin version menu (#1533)
Add caching support to reduce the number of requests to lookup the
github APIs when generating the plugin version select menu.
2022-07-29 14:56:57 +01:00
dependabot[bot]
bec7fdc462
Bump github-pages from 226 to 227 in /docs (#1531) 2022-07-24 09:21:16 +00:00
Darragh Bailey
5fa1ed9dbd
Create dependabot config (#1530)
Enable dependency updates for docs generation
2022-07-24 09:00:51 +00:00
Darragh Bailey
82202945ce
Migrate documentation to github pages (#1523)
Switch from having all documentation contained within the README to
publishing a jekyll static site of documentation under github pages.

This allows for configuration and installation guides to be handled
separately to make for the relevant pieces to be in smaller chunks and
therefore easier to follow for users. Additionally a table of contents
can now be included in a left navigation section that ensures it should
be possible to quickly jump from the start to any section and back
again.

Include support for publishing previews and releases under separate
directories to allow for them to exist at the same time as the other
latest version of the documents.

The navigation section also includes support for accessing any of the
other versions published so that it easier to see what configuration
options exist for a given release. These will be published automatically
when releases are added.
2022-07-19 13:48:02 +00:00
Darragh Bailey
206a9244a8
Simple prepare test for 9p and virtiofs synced_folders (#1529)
Provide basic tests for 9p and virtiofs synced_folder capabilities to
validate prepare behaviour.
2022-07-13 16:36:17 +00:00
Nick Brown
2dc704e1f9
Support different rexml location for older vagrant (#1526)
Attempt fallback to loading rexml from rexml/rexml which is the path
used by older vagrant releases.
2022-07-12 17:41:54 +00:00
Darragh Bailey
41d153b91f
Tidy up virtiofs and 9p synced_folder messages (#1527)
Remove the excessive output generated for the synced_folder messages
emitted when using 9p and virtiofs synced_folders.

Fixes: #1525
2022-07-12 18:28:51 +01:00
Darragh Bailey
c5ed4bd89c
Ensure disk controller passed to create domain (#1520)
Previous PR added tests but missed that the disk controller was not
being set correctly in the create domain action by default.

Update config documentation to include option.
2022-06-25 15:48:05 +01:00
Michael Kerrin
37c3330de1 Allow use of virtio-scsi driver for SCSI devices (#692)
For better performance allows enabling the virtio-scsi model on the
scsi controller in VM's.

Additionally supports inferring use of virtio-scsi model from disk
device or bus, and similarly infer the correct values for these
based on device or bus.

Currently one controller per 7 domain volume disks is created, this
follows virt-manager's behaviour, and is assumed a reasonable default.
However note that virtio-scsi should be capable of allowing many more
disks to be assigned per controller than this. It is presumed that the
source of the number 7 is allowing for 8 devices per controller
including the host adapter, which therefore allows for 7. Hardware SCSI
controllers typically supported 16 addressable devices including the
adapter providing for a 15 disk limit. Whether this is necessary is not
yet clear.

Co-authored-by: Darragh Bailey <daragh.bailey@gmail.com>
2022-06-24 19:02:11 +01:00
Darragh Bailey
a4842acf12
Adjust spec to avoid early setting domain volumes (#1518) 2022-06-24 17:02:05 +00:00
Darragh Bailey
a02208ff88
Correct reference to daysUntilClose (#1516) 2022-06-19 12:19:53 +00:00
Darragh Bailey
cbd81fee81
Switch no-response action as probot deprecated (#1514) 2022-06-19 13:45:14 +02:00
Darragh Bailey
b2c3c23962
Tidy up driver code (#1505)
Clean up the driver code to allow it to be close to passing with a
rubocop scan.
2022-06-14 10:53:36 +01:00
Darragh Bailey
41bd20269e
Migrate acceptance tests to rspec (#1513)
Move existing tests executed with the help of bats to use rspec directly
combined with tags to filter them out from being executed by default.

This allows for more complex assertions as well as easier debug as the
code supports use of setting 'VAGRANT_SPEC_SKIP_CLEANUP' to prevent the
tests from removing the temporary directory created for home and work
directories.

Extend a number of classes from vagrant-spec to override default
behaviour to allow passing of additional environment variables for
packaging tests, as well as supporting the skip cleanup. Given the use
of after to perform the cleanup, need to vendor the vagrant-spec
acceptance context in order to modify it easily.
2022-06-13 23:43:06 +01:00
Darragh Bailey
66e0fa7dda
Ensure box version default of 0 uses mtime (#1512)
If a box is added directly without a version, vagrant will default set
it to 0. When this occurs it is necessary to ensure use of mtime to
distinguish when the disk image in the box was last updated to allow
replacement of the box to trigger a fresh upload.

Fixes: #1382
2022-06-13 10:25:43 +01:00
Darragh Bailey
26e25c0191
Provide ruby version and gemset config for rvm (#1511)
As a starting point to help those with use of rvm and documentation for
development and contribution, ensure that some basic config to select a
ruby version and gemset to use is in placed.
2022-06-09 06:19:04 +00:00
Darragh Bailey
a792fe0990
Only populate domain_name if not provided (#1509)
Ensure that when no box is defined for a pxe install, that the domain
name is only populated for subsequent boots and if it is already
provided by a create action, skip attempting to retrieve from a
non-existing domain XML.

Fixes: #1508
2022-06-08 19:37:51 +01:00
anonym
1ed088924a
Fix allow_existing for disks against newer versions of libvirt. (#1507)
When running vagrant-libvirt on an up-to-date Debian unstable with
libvirt 8.4.0 the expected error message doesn't contain the full
path any more.
2022-06-08 19:21:35 +01:00
Darragh Bailey
9885e58c21
Update after hook definition for recent vagrant (#1506)
Vagrant newer than 2.2.11 reworked how the after hook definition
functions requiring it to be called in a different way to ensure it is
possible to hook the box remove action to perform the expected local
action.

Add a compatibility function to ensure that the plugin works with both
mechanisms and some simple tests to ensure that with the unit tests
validated against the older vagrant versions that it confirms the action
will be called as expected.

As part of fixing the call of the remove_libvirt_image action, ensure it
only executes when the box removed is a libvirt one and ignores all
others.

Fixes: #1196
2022-06-05 17:44:10 +01:00
Darragh Bailey
b0cf1a3f91
Ignore dockerfile changes by default (#1503)
Avoid triggering rebuilds of all layers the dockerfile is modified.
2022-06-04 13:28:06 +00:00
Darragh Bailey
225009a19f
Add basic tests for synced folders 9p and virtiofs (#1504)
Basic tests for synced folder capabilities for 9p and virtiofs should
ensure consistent detection of files for coverage across multiple
versions of ruby as some versions pick up these files and others do not.
2022-06-04 14:20:20 +01:00
Darragh Bailey
70866ecbaa
Flag when source device for public network does not exist (#1499)
Detect when the device provided for connecting the VM to a public
network via the host does not exist and attempt to provide a useful
error message to give end users a hint of how to correct.

Fixes: #1477
2022-06-03 14:54:37 +01:00
Darragh Bailey
c7bcb50b2b
Avoid domain undefine on configuration update (#1496)
Calling undefine on a domain and recreating it can result in some edge
case errors where if the current capabilities of libvirt have been
reduced, it may not be possible to restore the old definition.

Instead switch to calling `domain_define` with the new definition and
check that the resulting libvirt domain definition has been updated in
the expected manner, otherwise report an error to the user.

Fixes: #949
Relates-to: #1329
Relates-to: #1027
Relates-to: #1371
2022-06-03 09:42:28 +00:00
Rodolfo Olivieri
7233c85504
Add support for snapshots (#1456)
Builds on the work started by @randomvariable in #840 addressing the comments
left there.

Fixes: #529

Signed-off-by: Rodolfo Olivieri rodolfo.olivieri3@gmail.com
2022-06-03 09:34:35 +00:00
Darragh Bailey
37597e22f9
Add action to resolve disk settings (#1502)
With multi volume boxes, need to ensure that disk settings such as the
device assigned are resolved dynamically once it has been established
which devices have already been assigned to the box volumes on either
initial creation or subsequent boots.

Otherwise users are forced to always explicitly define the device for
additional storage instead of having it be automatically assigned the
next available device.

Consequently previous changes have broken the ability for machines
with additional storage to be halted and restarted correctly.

Include an integration test that for additional storage checks that the
machine can be stopped and started again.

Fixes: #1490
2022-06-02 19:09:18 +01:00
Darragh Bailey
d1232f0c20
Only call destroy on active networks (#1497)
When removing networks, skip calling destroy to deactivate the network
if it is not currently active. This avoids errors when the host has been
rebooted and vagrant machines are removed as the networks are typically
not automatically started.
2022-05-19 13:18:22 +00:00
Darragh Bailey
f498f102e1
Ensure updating loader tag supported (#1494)
The loader tag is required when nvram is being enabled. Ensure it is
marked as a requirement of validation and also support it's
configuration during the start domain action.
2022-05-17 15:03:55 +01:00
Darragh Bailey
9cda25a384
Support different rexml location for older vagrant (#1493)
Attempt fallback to loading rexml from rexml/rexml which is the path
used by older vagrant releases.

Fixes #1483
2022-05-12 21:45:44 +01:00
Darragh Bailey
e4122f480a
Use instance doubles for driver where possible (#1491)
Switch to instance doubles for driver where possible and reduce usage of
allow_any_instance_of.

Additionally replace some incorrect allows with expects to validate
calls are not made.
2022-05-06 19:30:55 +00:00
Darragh Bailey
4ffb63cd79
Switch to https from git for vagrant-spec (#1492)
Bundle now complains about cloning using the git protocol which is
insecure by default. Switching to https urls resolves.
2022-05-06 20:25:50 +01:00
byonoy-dne
c4fcfee510
Set undefine flags to keep NVRAM (#1329)
Handle enabling and disabling of NVRAM during start domain.

This patch contains latent support for upstream PR fog-libvirt#102 to support destroy
with NVRAM enabled once that is merged.

Fixes #1027.
2022-05-06 12:43:42 +01:00
Dan Čermák
f734a89681
Replace tabs with spaces in domain_all_settings.xml (#1489)
The xml renderer stopped rendering tabs and now uses spaces instead, which made
the test fail.
2022-05-05 09:37:42 +01:00
Jamie Barber
4e515e6f21
Guest PCI address options for passthrough devices (#1481)
When assigning a pci passthrough device, the domain, bus, slot and
function parameters pertain to the host device address. Add guest_
flavours of these to allow setting the address of the device in the
guest as well.

Fixes: #1475
2022-05-04 09:11:50 +00:00
Rodolfo Olivieri
1939528d7b
Update steps in the addtional notes (#1486)
While trying to use the steps provided in the `Additional Notes for Fedora and
Similar Linux Distributions` I noticed that some of the versions referenced
there were not up-to-date, as well as a missing script call for the krb5.

Signed-off-by: Rodolfo Olivieri <rolivier@redhat.com>
2022-05-04 08:30:58 +00:00
Tim Serong
3bdb1c93e6
Use require for HandleBox, SyncedFolders, WaitForCommunicator (#1485)
Using `autoload` fairly consistently results in 'constant not defined'
errors for each of HandleBox, SyncedFolders, WaitForCommunicator
when using ruby 3.1.  Presumably there's some sort of race condition.
Explicitly using `require` for these three makes the problem go away.
It might be a bit ugly to have those `require` lines right at the
point where those symbols are used, vs. the neat `autoload` section
at the top of the file, but I'm not sure how better to structure this.
Suggestions most welcome :-)

Fixes: #1445
Signed-off-by: Tim Serong <tserong@suse.com>
2022-05-03 19:58:36 +00:00
Dan Čermák
9675167c1c
unrestrict fog-core version to ~> 2 (#1487) 2022-05-02 13:26:14 +01:00
Thomas Wouters
390b437519
Ensure provisioner runs when performing a reload (#1484)
with libvirt-vagrant >= 0.8.0 `vagrant reload` no longer executed the provisioner.
2022-04-27 17:46:54 +01:00
Darragh Bailey
e65aec6b0b
Ensure provisioning executed after networking (#1480)
Provisioning is executed on the out-call action, so it should be added
the call start before the configuration of the network interfaces is
scheduled via a guest capability as it is also executed out the out call
to allow the first part to be performed before the VM is booted and the
latter to be done after it is running.

Fixes: #1479
2022-04-20 13:13:00 +01:00
ebaklund
008e910856
Added fix for issue #1472 (#1473)
Avoid crash caused by power management suspension where fog fails to translate domain state pmsuspended.

Changed the driver.state() function so that it does not crash on undefined domain state. Just return nil :unknown instead.

Added unittests and made existing more general.

Closes #1472
2022-04-04 09:58:10 +01:00
Darragh Bailey
55a220f1c8
Pass ssh command for port forwarding using array (#1469)
Switch to the command as an array format when passing the port
forwarding ssh command to spawn to switch to execution of the ssh
process directly instead of being executed by the default shell.

Fixes: #1467
2022-03-22 07:09:18 +00:00