|
23 | 23 | "m6i.metal", |
24 | 24 | "m7i.metal-24xl", |
25 | 25 | "m7i.metal-48xl", |
| 26 | + "m8i.metal-48xl", |
26 | 27 | "m6a.metal", |
27 | 28 | "m7a.metal-48xl", |
28 | 29 | ] |
29 | | - instances_aarch64 = ["m7g.metal"] |
| 30 | + instances_aarch64 = ["m6g.metal", "m7g.metal", "m8g.metal-24xl"] |
| 31 | + restore_only_platforms = [("al2023", "linux_6.18")] |
| 32 | + x86_64_platforms = DEFAULT_PLATFORMS + restore_only_platforms |
30 | 33 | commands = [ |
31 | 34 | "./tools/devtool -y test --no-build --no-archive -- -m nonci -n4 integration_tests/functional/test_snapshot_phase1.py", |
32 | 35 | # punch holes in mem snapshot tiles and tar them so they are preserved in S3 |
|
35 | 38 | "mkdir -pv snapshots", |
36 | 39 | "tar cSvf snapshots/{instance}_{kv}.tar snapshot_artifacts", |
37 | 40 | ] |
38 | | - pipeline.build_group( |
| 41 | + |
| 42 | + def create_step_key(instance, kv): |
| 43 | + """Buildkite key for a snapshot-create step. |
| 44 | +
|
| 45 | + Keys may only contain [A-Za-z0-9_\\-:], so dots in instance names |
| 46 | + (m5n.metal) and kernel versions (linux_5.10) are sanitized to |
| 47 | + underscores. Tarball paths stay unchanged. |
| 48 | + """ |
| 49 | + return f"snap-create-{instance}-{kv}".replace(".", "_") |
| 50 | + |
| 51 | + # Key each snapshot-create step so restore steps can depend on the |
| 52 | + # specific source snapshot they need, rather than waiting for every |
| 53 | + # snapshot-create step to finish. `build_group` doesn't sanitize |
| 54 | + # substituted key values, so we set the final key after it fans out. |
| 55 | + x86_create = pipeline.build_group( |
39 | 56 | "snapshot-create", |
40 | 57 | commands, |
41 | 58 | timeout=30, |
42 | 59 | artifact_paths="snapshots/**/*", |
43 | 60 | instances=instances_x86_64, |
44 | 61 | platforms=DEFAULT_PLATFORMS, |
45 | 62 | ) |
46 | | - pipeline.add_step("wait") |
47 | 63 |
|
48 | | - # allow-list of what instances can be restores on what other instances (in |
49 | | - # addition to itself) |
| 64 | + # https://github.com/firecracker-microvm/firecracker/blob/main/docs/snapshotting/snapshot-support.md#where-can-i-resume-my-snapshots |
| 65 | + aarch64_platforms = [("al2023", "linux_6.1")] |
| 66 | + aarch64_create = pipeline.build_group( |
| 67 | + "snapshot-create-aarch64", |
| 68 | + commands, |
| 69 | + timeout=30, |
| 70 | + artifact_paths="snapshots/**/*", |
| 71 | + instances=instances_aarch64, |
| 72 | + platforms=aarch64_platforms, |
| 73 | + ) |
| 74 | + for grp in (x86_create, aarch64_create): |
| 75 | + for s in grp["steps"]: |
| 76 | + s["key"] = create_step_key(s["agents"]["instance"], s["agents"]["kv"]) |
| 77 | + |
| 78 | + # allow-list of what instances can be restored on what other instances (in |
| 79 | + # addition to itself). aarch64 is restricted to same-instance restores. |
50 | 80 | supported = { |
51 | 81 | "m5n.metal": ["m6i.metal"], |
52 | 82 | "m6i.metal": ["m5n.metal"], |
53 | 83 | } |
54 | | - |
55 | | - # https://github.com/firecracker-microvm/firecracker/blob/main/docs/kernel-policy.md#experimental-snapshot-compatibility-across-kernel-versions |
56 | | - aarch64_platforms = [("al2023", "linux_6.1")] |
| 84 | + aarch64_all_platforms = aarch64_platforms + restore_only_platforms |
57 | 85 | perms_aarch64 = itertools.product( |
58 | | - instances_aarch64, aarch64_platforms, instances_aarch64, aarch64_platforms |
| 86 | + instances_aarch64, aarch64_platforms, instances_aarch64, aarch64_all_platforms |
59 | 87 | ) |
60 | 88 |
|
61 | 89 | perms_x86_64 = itertools.product( |
62 | | - instances_x86_64, DEFAULT_PLATFORMS, instances_x86_64, DEFAULT_PLATFORMS |
| 90 | + instances_x86_64, DEFAULT_PLATFORMS, instances_x86_64, x86_64_platforms |
63 | 91 | ) |
64 | 92 | steps = [] |
65 | 93 | for ( |
|
74 | 102 | # newer -> older is not supported, and does not work |
75 | 103 | if src_kv > dst_kv: |
76 | 104 | continue |
| 105 | + # only test cross-kernel restore between adjacent kernel versions |
| 106 | + if src_kv == "linux_5.10" and dst_kv == "linux_6.18": |
| 107 | + continue |
77 | 108 | if src_instance != dst_instance and dst_instance not in supported.get( |
78 | 109 | src_instance, [] |
79 | 110 | ): |
|
96 | 127 | "label": f"snapshot-restore-src-{src_instance}-{src_kv}-dst-{dst_instance}-{dst_kv}", |
97 | 128 | "timeout": 30, |
98 | 129 | "agents": {"instance": dst_instance, "kv": dst_kv, "os": dst_os}, |
| 130 | + "depends_on": [create_step_key(src_instance, src_kv)], |
99 | 131 | **per_instance, |
100 | 132 | } |
101 | 133 | steps.append(step) |
|
0 commit comments