-
Notifications
You must be signed in to change notification settings - Fork 5
Test installer's IPv6 features #316
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
Draft
ydirson
wants to merge
26
commits into
master
Choose a base branch
from
installer-features/ipv6
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.
Draft
Conversation
This file contains hidden or 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
Signed-off-by: Yann Dirson <[email protected]>
- adding it behind the scene makes it more difficult to write tests for IPv6 - only needed for install, not upgrade or restore Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
This is useful for a lambda passed to @pytest.mark.answerfile, where in some variants of a test we want to add an element, but nothing in other variants (eg. a <raid> block) Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
This is a preparation for type hint addition, where we cannot mutate in-place a variable to another type: we have to build an object of the correct return type incrementally. Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Issue raised by type checkers. Signed-off-by: Yann Dirson <[email protected]>
Type checkers today are unable to determine that `defn` does not contain an `attrib` member, this prevents them from checking our dict would provide compatible data (which is does not). Signed-off-by: Yann Dirson <[email protected]>
Note the `type: ignore[call-arg]` in test_fixtures is here to overcome a bug/limitation in mypy 1.15.0: in callable_marker() it seems to consider that `value(**params)` produces at least one argument. Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
Signed-off-by: Yann Dirson <[email protected]>
The helper_vm_with_plugged_disk fixture for tune_firstboot was only able to attach a single disk. For RAID support we need several disks, and that fixture would fail. Signed-off-by: Yann Dirson <[email protected]>
Using a temporary variable is unnecessary and hurts readability. Also use logger formatting as designed. Signed-off-by: Yann Dirson <[email protected]>
Code will be more readable when we start manipulating other info about system disks. Signed-off-by: Yann Dirson <[email protected]>
Adds a new system_disk test parameter to distinguish raid1 setup from (pre-existing) single-disk one. Adds Alpine-specific setup for tune_firstboot to manually assemble the RAID. Signed-off-by: Yann Dirson <[email protected]>
Well, it was indeed working "by chance", as calling readlink on a non-link returns empty, which instead of getting [ to return non-zero because empty string is not "busybox" got it to return non-zero because the comparison operator had no first operand. Signed-off-by: Yann Dirson <[email protected]>
More parameter values will come in a later commit. Signed-off-by: Yann Dirson <[email protected]>
… ipv4dhcp Note that I absolutely hate this lack of indentation, but pycodestyle and emacs' python-mode are comploting for this
FIXME: mypy disagrees
FIXME: - pycodestyle disagrees - mypy disagrees
FIXME: - uses IPv4 at install time - requires different ARP_SERVER for install and test_boot, since DNS is not set in xcpng using autoconf and we cannot use a name - ipv6 dhcp is currently known broken in xcpng - ipv6 autoconf is currently broken if also using IPv6 at install time? - only install is handled - ...
Signed-off-by: Yann Dirson <[email protected]>
This allows the test to get the IPv6 address from the host even if it starts with an IPv4 first (in which case the transient IPv4 would be use, rapidly causing issues). Signed-off-by: Yann Dirson <[email protected]>
This allows upgrading installer with network_config6 support with patches from https://github.com/xcp-ng/host-installer/commits/ipv6/ (assumes you have that in ~/src/xs/host-installer) * just using network_config=none to try beneficiating from default ipv6 autoconf bombs out because of lack of v6 config * network_config6=autoconf currently gets no DNS configuration, so only works if not using the network for installation AND numeric IP address for ARP_SERVER, so is left out for now FIXME: - this uses an unreleased installer patch - should support upg and rst
glehmann
reviewed
May 28, 2025
@@ -84,7 +84,8 @@ class TestNested: | |||
vifs=[dict(index=0, network_name=NETWORKS["MGMT"])], | |||
)) | |||
@pytest.mark.answerfile( | |||
lambda system_disks_names, local_sr, package_source, system_disk_config, iso_version, admin_iface: AnswerFile("INSTALL") | |||
lambda system_disks_names, local_sr, package_source, system_disk_config, iso_version, | |||
admin_iface: AnswerFile("INSTALL") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can do
lambda system_disks_names, local_sr, package_source, system_disk_config, iso_version, admin_iface:
AnswerFile("INSTALL")
.top_setattr({} if local_sr == "nosr" else {"sr-type": local_sr})
…
without even a \
because the lambda is in between parentheses.
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.
Based on top of #311