oxidecomputer / oxidecomputer/omicron

sled-agent should not be part of the "system" contract

Open
#5,321 0 comments 0 reactions 1 assignee View on GitHub

@citrus-it is already working on this.

Since Mar 25, 2024.

Dominant language
Rust
Stars
572
Forks
97
Avg merge
2d 12h
Merged PRs (30d)
96

Description

#5318 and #5319 caused sled-agent to use up all of the available contracts in its project:

BRM44220001 # ls -1 /proc/`pgrep sled-agent`/contracts | wc -l
    9968
BRM44220001 # prctl -P `pgrep sled-agent` | egrep contract
project.max-contracts privileged 10000 - deny -

When this occurred, system services such as cron also began to fail, and it was not possible to connect to the server via ssh. Both of these were also failing to fork:

BRM44220001 # tail /var/cron/log
! cannot fork Mon Dec 29 06:14:47 1986
! rescheduling a cron job Mon Dec 29 06:14:47 1986

This is because sled-agent is in the system project, along with services such as cron and ssh.

BRM44220001 # ps -ef -o pid,project,args | egrep 'cron|sled-agent|ssh'
  686   system /opt/oxide/sled-agent/sled-agent run /opt/oxide/sled-agent/pkg/config.toml
  685   system ctrun -l child -o noorphan,regent /opt/oxide/sled-agent/sled-agent run /opt/oxi
  607   system /usr/sbin/cron
  637   system /usr/sbin/sshd
...

We should place sled-agent in its own project so that it is not sharing resource limits like this.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.