pytest-pve-cloud 3.2.5__tar.gz → 3.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pytest_pve_cloud-3.2.5/src/pytest_pve_cloud.egg-info → pytest_pve_cloud-3.3.0}/PKG-INFO +2 -2
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/requirements.txt +1 -1
- pytest_pve_cloud-3.3.0/src/pve_cloud_test/_version.py +1 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pve_cloud_test/cloud_fixtures.py +39 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pve_cloud_test/k8s_fixtures.py +89 -16
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pve_cloud_test/terraform.py +4 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pve_cloud_test/test_env_schema.yaml +28 -1
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0/src/pytest_pve_cloud.egg-info}/PKG-INFO +2 -2
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/requires.txt +1 -1
- pytest_pve_cloud-3.2.5/src/pve_cloud_test/_version.py +0 -1
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/LICENSE.md +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/README.md +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/pyproject.toml +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/setup.cfg +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pve_cloud_test/options.py +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pve_cloud_test/tdd_watchdog.py +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/SOURCES.txt +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/dependency_links.txt +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/entry_points.txt +0 -0
- {pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/top_level.txt +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-pve-cloud
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Author-email: Tobias Huebner <tobias.huebner@vmzberlin.com>
|
|
5
5
|
License-Expression: GPL-3.0-or-later
|
|
6
6
|
License-File: LICENSE.md
|
|
7
|
-
Requires-Dist: py-pve-cloud<3.
|
|
7
|
+
Requires-Dist: py-pve-cloud<3.4.0,>=3.3.0
|
|
8
8
|
Requires-Dist: kubernetes==34.1.0
|
|
9
9
|
Requires-Dist: pytest==8.4.2
|
|
10
10
|
Requires-Dist: ansible-runner==2.4.2
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "3.3.0"
|
|
@@ -3,6 +3,7 @@ import inspect
|
|
|
3
3
|
import logging
|
|
4
4
|
import os
|
|
5
5
|
import re
|
|
6
|
+
import tempfile
|
|
6
7
|
from contextlib import contextmanager
|
|
7
8
|
|
|
8
9
|
import ansible_runner
|
|
@@ -295,3 +296,41 @@ def get_proxmoxer(get_test_env):
|
|
|
295
296
|
assert nodes
|
|
296
297
|
|
|
297
298
|
return proxmox
|
|
299
|
+
|
|
300
|
+
|
|
301
|
+
@pytest.fixture(scope="session")
|
|
302
|
+
def get_pve_hosts_inv(get_test_env):
|
|
303
|
+
logger.info("proxmox hosts cloud inventory")
|
|
304
|
+
with tempfile.NamedTemporaryFile(
|
|
305
|
+
"w", suffix=".yaml", delete=False
|
|
306
|
+
) as temp_cloud_inv:
|
|
307
|
+
# write pve cloud inventory file for main pve cluster setup playbook
|
|
308
|
+
pve_clusters = {
|
|
309
|
+
get_test_env["pve_test_cluster_name"]: {
|
|
310
|
+
"pve_unique_cloud_services": ["dns", "dhcp", "psql-state"],
|
|
311
|
+
"pve_host_vars": (
|
|
312
|
+
get_test_env["pve_test_cluster_host_vars"]
|
|
313
|
+
if "pve_test_cluster_host_vars" in get_test_env
|
|
314
|
+
else {}
|
|
315
|
+
),
|
|
316
|
+
"pve_haproxy_floating_ip_external": get_test_env[
|
|
317
|
+
"pve_test_cluster_floating_external"
|
|
318
|
+
],
|
|
319
|
+
"pve_haproxy_floating_ip_internal": get_test_env[
|
|
320
|
+
"pve_test_cluster_floating_internal"
|
|
321
|
+
],
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
|
|
325
|
+
yaml.dump(
|
|
326
|
+
{
|
|
327
|
+
"plugin": "pxc.cloud.pve_cloud_inv",
|
|
328
|
+
"pve_cloud_domain": get_test_env["cloud_inventory"]["pve_cloud_domain"],
|
|
329
|
+
"pve_clusters": pve_clusters,
|
|
330
|
+
}
|
|
331
|
+
| get_test_env["cloud_inventory"],
|
|
332
|
+
temp_cloud_inv,
|
|
333
|
+
)
|
|
334
|
+
temp_cloud_inv.flush()
|
|
335
|
+
|
|
336
|
+
return temp_cloud_inv.name
|
|
@@ -12,6 +12,16 @@ from pve_cloud_test.cloud_fixtures import get_test_env
|
|
|
12
12
|
logger = logging.getLogger(__name__)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
+
def get_e2e_limit_feature(get_test_env, feature_key):
|
|
16
|
+
if (
|
|
17
|
+
"pve_test_limit_features" in get_test_env
|
|
18
|
+
and feature_key in get_test_env["pve_test_limit_features"]
|
|
19
|
+
):
|
|
20
|
+
return get_test_env["pve_test_limit_features"][feature_key]
|
|
21
|
+
|
|
22
|
+
return False
|
|
23
|
+
|
|
24
|
+
|
|
15
25
|
@pytest.fixture(scope="session")
|
|
16
26
|
def get_secondary_kubespray_inv(get_test_env):
|
|
17
27
|
logger.info("create secondary kubespray")
|
|
@@ -50,6 +60,12 @@ def get_secondary_kubespray_inv(get_test_env):
|
|
|
50
60
|
], # route these specially to this secondary
|
|
51
61
|
}
|
|
52
62
|
],
|
|
63
|
+
"qemu_global_vars": {
|
|
64
|
+
"zpool_create_force": True, # needed for recreate since by id disk doesnt get wiped
|
|
65
|
+
"e2e_limit_containerd_downloads": get_e2e_limit_feature(
|
|
66
|
+
get_test_env, "limit_containerd_downloads"
|
|
67
|
+
),
|
|
68
|
+
},
|
|
53
69
|
"qemu_base_parameters": {
|
|
54
70
|
"cpu": "host",
|
|
55
71
|
"net0": "virtio,bridge=vmbr0,firewall=1"
|
|
@@ -57,23 +73,75 @@ def get_secondary_kubespray_inv(get_test_env):
|
|
|
57
73
|
"sockets": 1,
|
|
58
74
|
},
|
|
59
75
|
"qemus": [
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
76
|
+
(
|
|
77
|
+
{
|
|
78
|
+
"k8s_roles": ["master", "worker"],
|
|
79
|
+
"disk": {
|
|
80
|
+
"size": "150G",
|
|
81
|
+
"options": {
|
|
82
|
+
"discard": "on",
|
|
83
|
+
"iothread": "on",
|
|
84
|
+
"ssd": "on",
|
|
85
|
+
"cache": "unsafe",
|
|
86
|
+
},
|
|
87
|
+
"pool": get_test_env["pve_vm_storage_id"],
|
|
69
88
|
},
|
|
70
|
-
"
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
89
|
+
"zpool_csi_parameters": {
|
|
90
|
+
"pool_properties": {"ashift": "12"},
|
|
91
|
+
"vdevs": [
|
|
92
|
+
{
|
|
93
|
+
"disks": [
|
|
94
|
+
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_scsi1-pxzfs"
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"disks": [
|
|
99
|
+
"/dev/disk/by-id/scsi-0QEMU_QEMU_HARDDISK_scsi2-pxzfs"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
},
|
|
104
|
+
"zfs_localpv_csi_disks": (
|
|
105
|
+
[
|
|
106
|
+
{
|
|
107
|
+
"from_storage": {
|
|
108
|
+
"size": "50G",
|
|
109
|
+
"options": {
|
|
110
|
+
"discard": "on",
|
|
111
|
+
"iothread": "on",
|
|
112
|
+
"ssd": "on",
|
|
113
|
+
"cache": "unsafe", # fastest for consumer ssds
|
|
114
|
+
},
|
|
115
|
+
"pool": get_test_env["pve_vm_storage_id"],
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
]
|
|
119
|
+
+ [
|
|
120
|
+
{
|
|
121
|
+
"via_passthrough": {
|
|
122
|
+
"disk_id": get_test_env["kubernetes"][
|
|
123
|
+
"zfs_localpv_test"
|
|
124
|
+
]["disk_id"],
|
|
125
|
+
"options": {"iothread": "on"},
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
if "zfs_localpv_test" in get_test_env["kubernetes"]
|
|
130
|
+
else []
|
|
131
|
+
),
|
|
132
|
+
"parameters": {
|
|
133
|
+
"cores": 4,
|
|
134
|
+
"memory": 10240,
|
|
135
|
+
},
|
|
136
|
+
}
|
|
137
|
+
| {
|
|
138
|
+
"target_host": get_test_env["kubernetes"][
|
|
139
|
+
"zfs_localpv_test"
|
|
140
|
+
]["target_host"]
|
|
141
|
+
}
|
|
142
|
+
if "zfs_localpv_test" in get_test_env["kubernetes"]
|
|
143
|
+
else {}
|
|
144
|
+
),
|
|
77
145
|
],
|
|
78
146
|
"target_pve_hosts": list(get_test_env["pve_test_cluster_hosts"].keys()),
|
|
79
147
|
"root_ssh_pub_key": get_test_env["ssh_pub_key"],
|
|
@@ -143,6 +211,11 @@ def get_kubespray_inv(get_test_env):
|
|
|
143
211
|
"mount_options": ["discard", "barrier=0"],
|
|
144
212
|
}
|
|
145
213
|
],
|
|
214
|
+
"qemu_global_vars": {
|
|
215
|
+
"e2e_limit_containerd_downloads": get_e2e_limit_feature(
|
|
216
|
+
get_test_env, "limit_containerd_downloads"
|
|
217
|
+
)
|
|
218
|
+
},
|
|
146
219
|
"qemu_base_parameters": (
|
|
147
220
|
{
|
|
148
221
|
"cpu": "host",
|
|
@@ -185,6 +185,10 @@ def apply(
|
|
|
185
185
|
all_pods_running = True
|
|
186
186
|
|
|
187
187
|
for pod in kube_v1.list_pod_for_all_namespaces().items:
|
|
188
|
+
if pod.metadata.deletion_timestamp:
|
|
189
|
+
logger.info(f"skipping pod scheduled for deletion {pod.metadata.name}")
|
|
190
|
+
continue
|
|
191
|
+
|
|
188
192
|
phase = pod.status.phase
|
|
189
193
|
assert (
|
|
190
194
|
phase != "Failed"
|
|
@@ -22,7 +22,21 @@ properties:
|
|
|
22
22
|
type: string
|
|
23
23
|
description: |
|
|
24
24
|
Optional jump host for connecting the the test proxmox cluster. When defined the entire suite is testing via the jump
|
|
25
|
-
proxy functionality.
|
|
25
|
+
proxy functionality.
|
|
26
|
+
pve_test_limit_features:
|
|
27
|
+
type: object
|
|
28
|
+
additionalProperties: false
|
|
29
|
+
description: "Features to make slow / old hardware more stable / capable, for various tradeoffs."
|
|
30
|
+
properties:
|
|
31
|
+
limit_containerd_downloads:
|
|
32
|
+
type: boolean
|
|
33
|
+
description: "Set to true to limit max_concurrent_downloads on containerd runtimes in kubernetes and k0s."
|
|
34
|
+
use_unsafe_qemu_disks:
|
|
35
|
+
type: boolean
|
|
36
|
+
# todo. implement
|
|
37
|
+
description: "Qemu disks will be created with cache=unsafe, greatly increasing performance on consumer ssds for ceph / zfs."
|
|
38
|
+
# todo: also implement setting sync=disabled on zfs zpools / datasets for openebs / containerd dataset
|
|
39
|
+
# todo: also implement using network rbd for ceph csi as this also increases greatly pvc performance for consumer ssds
|
|
26
40
|
pve_test_cluster_hosts:
|
|
27
41
|
type: object
|
|
28
42
|
title: "PVE Cluster name"
|
|
@@ -149,6 +163,19 @@ properties:
|
|
|
149
163
|
- copy_target_pve
|
|
150
164
|
- tls_copy_stack_name
|
|
151
165
|
properties:
|
|
166
|
+
zfs_localpv_test:
|
|
167
|
+
type: object
|
|
168
|
+
description: "Config for disk passthrough and openebs zfs localpv csi testing."
|
|
169
|
+
required:
|
|
170
|
+
- target_host
|
|
171
|
+
- disk_id
|
|
172
|
+
properties:
|
|
173
|
+
target_host:
|
|
174
|
+
type: string
|
|
175
|
+
description: "pve-host.pve-cluster-name for host that contains the disk with the specified disk_id for passthrough."
|
|
176
|
+
disk_id:
|
|
177
|
+
type: string
|
|
178
|
+
description: "/dev/disk/by-id accuired id of the hard drive we want to pass through."
|
|
152
179
|
deployments_domain:
|
|
153
180
|
type: string
|
|
154
181
|
description: domain used for test deployments of the suites kubernetes clusters. This needs to be delegated correctly in your central dns.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pytest-pve-cloud
|
|
3
|
-
Version: 3.
|
|
3
|
+
Version: 3.3.0
|
|
4
4
|
Author-email: Tobias Huebner <tobias.huebner@vmzberlin.com>
|
|
5
5
|
License-Expression: GPL-3.0-or-later
|
|
6
6
|
License-File: LICENSE.md
|
|
7
|
-
Requires-Dist: py-pve-cloud<3.
|
|
7
|
+
Requires-Dist: py-pve-cloud<3.4.0,>=3.3.0
|
|
8
8
|
Requires-Dist: kubernetes==34.1.0
|
|
9
9
|
Requires-Dist: pytest==8.4.2
|
|
10
10
|
Requires-Dist: ansible-runner==2.4.2
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "3.2.5"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/entry_points.txt
RENAMED
|
File without changes
|
{pytest_pve_cloud-3.2.5 → pytest_pve_cloud-3.3.0}/src/pytest_pve_cloud.egg-info/top_level.txt
RENAMED
|
File without changes
|