Skip to content

fix(orion): improve vm build stability#2130

Merged
genedna merged 8 commits into
mainfrom
codex/orion-vm-swap-and-checks
Jun 24, 2026
Merged

fix(orion): improve vm build stability#2130
genedna merged 8 commits into
mainfrom
codex/orion-vm-swap-and-checks

Conversation

@Ivanbeethoven

Copy link
Copy Markdown
Collaborator

Summary

  • add VM swap setup to reduce Orion worker build instability under memory pressure
  • include test notes for the VM manager path
  • keep Orion dependencies aligned for the scheduler flow

Validation

  • cargo fmt --all --check
  • cargo clippy -p orion-scheduler --all-targets
  • cargo clippy -p orion --all-targets

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0d7353fffe

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread orion/Cargo.toml Outdated
[target.'cfg(target_os = "linux")'.dependencies]
scorpiofs = { git = "https://github.com/web3infra-foundation/scorpiofs.git" }
# scorpiofs = { git = "https://github.com/web3infra-foundation/scorpiofs.git" }
scorpiofs = { path = "../../scorpiofs" }

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restore a resolvable scorpiofs dependency

On Linux checkouts that don't also have a sibling ../../scorpiofs repository, this path dependency is not resolvable; cargo metadata fails while loading the default workspace member orion with failed to read /workspace/scorpiofs/Cargo.toml. Because orion is in the workspace's default members, this breaks normal clean-clone builds/tests rather than only selecting a local development override.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c20283f4ff

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread orion-scheduler/src/vm_manager.rs Outdated
Comment on lines +31 to +32
fallocate -l {size_g}G '{swap_file}' 2>/dev/null \
|| dd if=/dev/zero of='{swap_file}' bs=1M count=$(( {size_g} * 1024 )) status=none

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid unconditionally filling small VM disks

When callers use the supported image_disk_gb override with a small value (or omit it where the default image has less than ~8 GiB free), this command still allocates an 8 GiB swapfile on /; set -e then aborts on ENOSPC before systemctl start orion-runner, so otherwise valid small VMs can no longer deploy. Size the swap from available space or reject/raise too-small disks before starting the VM.

Useful? React with 👍 / 👎.

Comment thread .github/workflows/base.yml Outdated
Comment on lines +124 to +125
git clone --depth 1 --branch codex/antares-fuse-local-libfuse https://github.com/web3infra-foundation/scorpiofs.git ../scorpiofs
git clone --depth 1 --branch codex/stabilize-libfuse-buck2-races https://github.com/rk8s-dev/rk8s.git ../rk8s

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Make self-hosted dependency clones idempotent

In this workflow, the test job runs on the persistent self-hosted runner for web3infra-foundation/mega PRs, but these clones target ../scorpiofs and ../rk8s, which are outside the checkout directory that actions/checkout cleans. After one run leaves either sibling repo behind, a later run on the same runner hits git clone's destination path ... already exists and is not an empty directory error before tests start; remove/reuse the directories or clone under $RUNNER_TEMP.

Useful? React with 👍 / 👎.

@genedna genedna merged commit c7f6710 into main Jun 24, 2026
8 checks passed
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