-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scripts to help batch-running automated install/upgrade/restore and post-install tests #261
Draft
ydirson
wants to merge
58
commits into
master
Choose a base branch
from
install-runtests
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In 0a5ea64 the method was moved from BaseVM to Pool, but an intermediate version had it moved to Host, and the final version missed the conversion on one call site, breaking tune_firstboot tests. Signed-off-by: Yann Dirson <[email protected]>
This in INFO level makes user think the test is blocked on xapi-wait-init-complete while the problem is with reaching pool members: Sep 06 12:50:28.791 INFO Wait for XAPI init to be complete on 172.16.210.12 Sep 06 12:50:28.792 DEBUG [172.16.210.12] xapi-wait-init-complete 60 Sep 06 12:50:29.221 DEBUG [172.16.210.12] xe host-list --minimal ... Sep 06 12:50:30.503 DEBUG [172.16.210.12] xe host-param-get uuid=0aea61f4-c9d1-4060-94e8-4eb2024d082c param-name=address Sep 06 12:50:30.926 DEBUG > 172.16.210.11 Sep 06 12:50:30.929 DEBUG [172.16.210.11] cat /etc/xensource-inventory Sep 06 12:52:47.216 DEBUG > ssh: connect to host 172.16.210.11 port 22: Connection timed out Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Samuel Verschelde <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Samuel Verschelde <[email protected]>
This is not meant to be a fixture anyway. Signed-off-by: Yann Dirson <[email protected]>
This suppresses hostkey checking, making the script more suitable for non-interactive use, and makes it easier to understand when something goes wrong. FIXME locate "lib" more properly Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Tests for generation of the reference files, and for checking against them. Signed-off-by: Yann Dirson <[email protected]>
byte-compiled version of /etc/xapi.d/plugins/vmss Signed-off-by: Yann Dirson <[email protected]>
8791a80
to
19ef189
Compare
Signed-off-by: Yann Dirson <[email protected]>
Getting a vm_booted_with_installer starts with inserting a CD, will be progressively enhanced. ISOs are specified through an iso_version key, matched to a filename, or to a download URL used through a local cache, in data.py. The ISO is uploaded to the SR through the pool master's mountpoint, which will lead to extra network traffic but avoids having to (mis)record the server's location. The iso_version value is temporarily specified using a pytest marker. Signed-off-by: Yann Dirson <[email protected]>
This is a first step for answerfile handling, to be able to run a first real installation. Signed-off-by: Yann Dirson <[email protected]>
Currently relies on the installer fetching the answerfile from the PXE server, to ensure the latter's ARP tables are populated with the obtained DHCP address. Monitoring the install progress is done by repeatedly polling with grep, which is far from ideal performance-wise, but avoids adding too much complexity. Signed-off-by: Yann Dirson <[email protected]>
Detection of host IP till now relies on the fact we download the answerfile from PXE server. Once we take this file from the ISO this network traffic won't happen so we need some other mechanism to fill the server's ARP tables. test-pingpxe.service is installed in install.img by iso-remaster. Since it is difficult to wait until the IP has been assigned before launching the service, make it ping continuously until we can reach the PXE server. One the installed host we will set a static IP instead. Signed-off-by: Yann Dirson <[email protected]>
This is necessary to get rid of old ARP cache entries that would match our IP to the MAC used by the VM clone in a previous test. Signed-off-by: Yann Dirson <[email protected]>
This process has several steps: - building of a data structure holding all of the answerfile data, from a customizable base in data.py and from tests-specific items - serialization as XML to be read by host-installer - necessary changes to the ISO for host-installer to use it We now have to explicitly enable the network during access (was implied by the use of a remote answerfile). Similarly we now rely on the test-pingpxe service, as nothing else would otherwise populate the server's ARP table. This is needed so: - different tests can use different parameters without the need for provisionning every answerfile to be used - tests can dynamically add contents for their own needs, before the XML gets actualy written Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
This is not ideal, as we would need to encapsulate machine boot in a fixture - that will be fixed when we switch away from pytest-dependency. Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
No direct upgrade to 8.3 for those versions. Signed-off-by: Yann Dirson <[email protected]>
This is just base infra, different machines have not differences yet. Signed-off-by: Yann Dirson <[email protected]>
Uses a helper VM to modify firstboot data in installed disk Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
clone+start:// will be used to implement--hosts=cache://... clone:// itself is not yet used directly, but as the "base" protocol upon which clone+start build, it seems logical (and basically free) to implement. Signed-off-by: Yann Dirson <[email protected]>
Will allow it to access host_list through closure. Signed-off-by: Yann Dirson <[email protected]>
Special care taken for making sure a created VM is destroyed if setup_host fails further down the line. Signed-off-by: Yann Dirson <[email protected]>
Add a new parameter to allow booting using netinstall. If an ISO only supports netinstall, it is specified it in the data.py by setting the `net-only`option to True. This option is set to False by default. Signed-off-by: Guillaume <[email protected]> Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
…store Signed-off-by: Yann Dirson <[email protected]>
This gets back to DHCP, as static IPs are not needed for this part of the job.
FIXME: config.py seems a bad idea after all FIXME: duplicated logic should be factored out
FIXME: should be in job instead
When using --hosts=cache://... it is much too early for such a check, so we have to give the info manually, and the script would not allow this. And honor it not just for "collect".
c44763e
to
92e1266
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is based on top of #226, and includes merges of #260 and https://github.com/xcp-ng/xcp-ng-tests/commits/stormi/post-install-test-job/
To exclude the #226 contents, use https://github.com/xcp-ng/xcp-ng-tests/compare/install..install-runtests