Skip to content
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

Automated RPU test #253

Draft
wants to merge 81 commits into
base: master
Choose a base branch
from
Draft

Automated RPU test #253

wants to merge 81 commits into from

Conversation

ydirson
Copy link
Contributor

@ydirson ydirson commented Sep 5, 2024

Split out and based on #226

Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
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 <yann.dirson@vates.tech>
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 <yann.dirson@vates.tech>
Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
stormi and others added 8 commits September 10, 2024 17:49
Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
Getting a vm_booted_with_installer starts with inserting a CD, will be
progressively enhanced.

ISOs are specified using a filename, or a download URL used through a
local cache.

Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
This is a first step for answerfile handling, to be able to run a
first real installation.

Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
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 <yann.dirson@vates.tech>
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 <yann.dirson@vates.tech>
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 <yann.dirson@vates.tech>
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 <yann.dirson@vates.tech>
@ydirson ydirson force-pushed the install-rpu branch 7 times, most recently from 18dd346 to 91ca5c1 Compare September 17, 2024 09:56
stormi and others added 3 commits September 18, 2024 10:22
Signed-off-by: Samuel Verschelde <stormi-xcp@ylix.fr>
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".
@ydirson ydirson force-pushed the install-rpu branch 5 times, most recently from 79c5b0a to 221f77d Compare September 18, 2024 12:45
Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
FIXME: dependency on tests from another module don't seem to get properly
located by pytest-dependency (--ignore-unknown-dependency required)
FIXME: how useful?
FIXME: had to keep a copy of perform_upgrade() after its functionality
was moved to vm_booted_with_installer fixture, must find a proper solution
for that
Useful to get the debug output from commands.ssh()

Signed-off-by: Yann Dirson <yann.dirson@vates.tech>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants