Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 37 additions & 1 deletion docs/_docs/reference/rust-rqd.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ The Rust RQD includes experimental support for running frames in Docker containe

The Rust RQD uses YAML configuration files with extensive customization options:

- **Default location**: `/etc/openrqd/rqd.yaml`
- **Packaged install**: `/etc/openrqd/rqd.yaml` (the bundled systemd service points `OPENCUE_RQD_CONFIG` at it)
- **Standalone binary**: `~/.local/share/rqd.yaml` when `OPENCUE_RQD_CONFIG` is not set. This file is optional; if it is missing, RQD runs on built-in defaults
- **Override with environment**: `OPENCUE_RQD_CONFIG=/path/to/config.yaml`
- **Sample configs**: Available in `rust/config/` directory

Expand All @@ -243,6 +244,7 @@ Key configuration sections:
- Container runtime settings (when enabled)
- Frame recovery across restarts (see below)
- Log-based exit-status rules (see below)
- Overriding hardware values reported to Cuebot (see below)

### Frame Recovery Across Restarts

Expand Down Expand Up @@ -348,6 +350,40 @@ The exit status is an arbitrary number chosen in `rqd.yaml` and repeated in `ope
plus a *Start After* column) and in the `cuebot_layers_delayed` / `cuebot_layer_delays_total`
Prometheus metrics.

### Overriding Hardware Values

RQD can report different hardware to Cuebot than the host really has. This is useful for testing, or for giving the farm only part of a machine. Set `override_real_values` in the **`machine`** section of `rqd.yaml`:

```yaml
machine:
override_real_values:
cores: 4 # cores per physical CPU (socket)
procs: 1 # physical CPUs (sockets)
memory_size: "16GB" # "16GB" = 16 x 10^9 bytes; "16GiB" = 16 x 2^30 bytes
hostname: "render-042" # name the host registers under in Cuebot
os: "rocky9" # reported as the host's OS
workstation_mode: true # adds the "desktop" tag
```

Behavior notes:

- **All fields are optional**: anything left out is read from the host as usual.
- **Total cores is `procs × cores`**: Cuebot multiplies the two, so `cores: 4` with `procs: 8` reports a 32-core host. To report 4 cores, use `cores: 4` with `procs: 1`.
- **Memory above the real amount** is accepted, but RQD logs a warning, because Cuebot may then book frames the host cannot fit.
- **`workstation_mode` is not `runner.desktop_mode`**: the two are separate settings in separate sections.
- **Read at startup only**: restart RQD after changing these values.

To confirm the overrides took effect, look for this line in the RQD log at startup:

```
Applying override_real_values: cores=Some(4), procs=Some(1), ...
```

If it is missing, check the lines RQD prints before logging starts:

- `Config::load: using config file: ...` shows which file RQD actually read.
- `WARN Config::load: ignoring unrecognized config key "..."` names every key RQD did not recognize, such as `runner.override_real_values` when the block is under the wrong section, or `machine.override_real_values.memory` when a field name is misspelled.

## Testing

### Unit Tests
Expand Down
11 changes: 11 additions & 0 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 16 additions & 18 deletions rust/config/rqd.dummy.cuebot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,26 +19,24 @@ machine:
proc_stat_path: "./rust/crates/rqd/resources/proc/stat"
proc_loadavg_path: "./rust/crates/rqd/resources/proc/loadavg"
temp_path: "/tmp"
use_session_id_for_proc_lineage: true
# Report different hardware to Cuebot than the host really has:
# use_ip_as_hostname: false
# override_real_values:
# cores: 4 # cores per physical CPU
# procs: 1 # physical CPUs; Cuebot sees procs x cores
# memory_size: "2GB"
# workstation_mode: true
# hostname: "some_host_name"
runner:
snapshots_path: $HOME/.rqd/snapshots
kill_monitor_interval: 10s
kill_monitor_timeout: 60s
force_kill_after_timeout: true
docker.mounts:
- target: ""
source: ""
typ: ""
bind-propagation: ""
docker.images:
rhel7: "centos7:latest"
rocky9: "rockyimage:latest"
# monitor_interval_seconds: 3
# use_ip_as_hostname: false
# nimby_mode: false
# override_real_values:
# cores: 4
# procs: 8
# memory: "2Gb"
# desktop_mode: true
# hostname: "some_host_name"
# docker_mounts:
# - target: ""
# source: ""
# typ: ""
# bind_propagation: ""
# docker_images:
# rhel7: "centos7:latest"
# rocky9: "rockyimage:latest"
34 changes: 16 additions & 18 deletions rust/config/rqd.local.cuebot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,24 @@ machine:
proc_stat_path: "/Users/dtavares/dev/rust_opencue/crates/rqd/resources/proc/stat"
proc_loadavg_path: "/Users/dtavares/dev/rust_opencue/crates/rqd/resources/proc/loadavg"
temp_path: "/Users/dtavares/tmp"
use_session_id_for_proc_lineage: true
# Report different hardware to Cuebot than the host really has:
# use_ip_as_hostname: false
# override_real_values:
# cores: 4 # cores per physical CPU
# procs: 1 # physical CPUs; Cuebot sees procs x cores
# memory_size: "2GB"
# workstation_mode: true
# hostname: "some_host_name"
runner:
snapshots_path: $HOME/.rqd/snapshots
kill_monitor_interval: 10s
kill_monitor_timeout: 60s
force_kill_after_timeout: true
docker.mounts:
- target: ""
source: ""
typ: ""
bind-propagation: ""
docker.images:
rhel7: "centos7:latest"
rocky9: "rockyimage:latest"
# monitor_interval_seconds: 3
# use_ip_as_hostname: false
# nimby_mode: false
# override_real_values:
# cores: 4
# procs: 8
# memory: "2Gb"
# desktop_mode: true
# hostname: "some_host_name"
# docker_mounts:
# - target: ""
# source: ""
# typ: ""
# bind_propagation: ""
# docker_images:
# rhel7: "centos7:latest"
# rocky9: "rockyimage:latest"
17 changes: 11 additions & 6 deletions rust/config/rqd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -145,18 +145,23 @@ machine:
# collect_pss: false

# Override real system values (useful for testing or limiting resources)
# All fields are optional - only specify what you want to override
# All fields are optional - only specify what you want to override.
# This block belongs under `machine:`. RQD prints a warning at startup for
# any key it does not recognize, e.g. one placed under the wrong section.
# override_real_values:
# # Number of CPU cores to report
# # Cores per physical CPU (socket)
# cores: 4
#
# # Number of processing slots to allocate
# procs: 8
# # Number of physical CPUs (sockets). Cuebot sees procs x cores cores in
# # total, so cores: 4 with procs: 2 reports an 8-core host
# procs: 2
#
# # Amount of memory to report (supports units like "2GB", "4096MB")
# # Amount of memory to report. Accepts decimal units ("2GB" is
# # 2,000,000,000 bytes) or binary units ("2GiB" is 2,147,483,648 bytes)
# memory_size: "2GB"
#
# # Enable workstation/desktop mode
# # Report this host as a workstation (adds the "desktop" tag).
# # This is separate from `runner.desktop_mode`
# workstation_mode: true
#
# # Override the hostname reported to Cuebot
Expand Down
1 change: 1 addition & 0 deletions rust/crates/rqd/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ futures = { workspace = true }
dashmap = { workspace = true }
serde = { version = "1.0", features = ["derive"] }
serde_derive = "1.0"
serde_ignored = "0.1.14"
serde_json = "1.0"
async-trait = { workspace = true }
async-stream = { workspace = true }
Expand Down
Loading
Loading