Skip to content

Commit

Permalink
lxd bridge
Browse files Browse the repository at this point in the history
  • Loading branch information
louiseschmidtgen committed Nov 8, 2024
1 parent 3a138c2 commit 8669a4e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -147,3 +147,7 @@ jobs:
with:
name: ${{ env.artifact_name }}
path: ${{ github.workspace }}/inspection-reports.tar.gz
- name: Tmate debugging session
if: ${{ failure() && github.event_name == 'pull_request' }}
uses: mxschmitt/action-tmate@v3
timeout-minutes: 120
10 changes: 5 additions & 5 deletions test/performance/tests/test_performance.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,20 @@
def test_load_test(instances: List[harness.Instance]):
cluster_node = instances[0]
joining_node = instances[1]
joining_node2 = instances[2]
joining_node_2 = instances[2]

join_token = util.get_join_token(cluster_node, joining_node)
join_token2 = util.get_join_token(cluster_node, joining_node2)
join_token_2 = util.get_join_token(cluster_node, joining_node_2)

assert join_token != join_token2
assert join_token != join_token_2

util.join_cluster(joining_node, join_token)
util.join_cluster(joining_node2, join_token2)
util.join_cluster(joining_node_2, join_token_2)

util.wait_until_k8s_ready(cluster_node, instances)
nodes = util.ready_nodes(cluster_node)
assert len(nodes) == 3, "nodes should have joined cluster"

assert "control-plane" in util.get_local_node_status(cluster_node)
assert "control-plane" in util.get_local_node_status(joining_node)
assert "control-plane" in util.get_local_node_status(joining_node2)
assert "control-plane" in util.get_local_node_status(joining_node_2)
11 changes: 8 additions & 3 deletions test/performance/tests/test_util/harness/lxd.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,18 @@ def __init__(self):
super(LXDHarness, self).__init__()

self._next_id = 0

self.profile = config.LXD_PROFILE_NAME
self.image = config.LXD_IMAGE
self.instances = set()

self._configure_profile(self.profile, config.LXD_PROFILE)

self._configure_network(
"lxdbr0",
"ipv4.address=auto",
"ipv4.nat=true",
)

LOG.debug(
"Configured LXD substrate (profile %s, image %s)", self.profile, self.image
)
Expand All @@ -53,9 +58,9 @@ def new_instance(self, network_type: str = "IPv4") -> Instance:
self.profile,
]

if network_type.lower() not in ["ipv4", "dualstack", "ipv6"]:
if network_type.lower() != "ipv4":
raise HarnessError(
f"unknown network type {network_type}, need to be one of 'IPv4', 'IPv6', 'dualstack'"
f"unknown network type {network_type}, need to be one of 'IPv4'"
)

try:
Expand Down

0 comments on commit 8669a4e

Please sign in to comment.