Skip to content

setup: dependency install fails on a fresh boot when apt/dpkg is locked by unattended-upgrades #74

Description

@VijitSingh97

What happened

Provisioning a fresh Ubuntu 24.04 install (miner-0, the new release test rig), sudo ./rigforge.sh setup aborted immediately at the dependency step:

[INFO] The following system dependencies are required:
   build-essential cmake libuv1-dev libssl-dev libhwloc-dev
[ERROR] rigforge aborted while installing dependencies (exit 1).

Root cause

On a fresh boot, unattended-upgrades / the apt-daily timers hold the dpkg/apt lock for the first minute or two. install_dependencies runs (rigforge.sh:366):

sudo apt-get update -qq && sudo DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ... 

which fails hard when the lock is held (Could not get lock /var/lib/dpkg/lock-frontend). The -qq hides the real error, so the abort message is opaque. Re-running once the lock freed succeeded immediately — confirming it's a transient lock, not a missing package/mirror issue.

This is a common, very reproducible first-boot condition, and it's exactly the kind of thing the new real-hardware release e2e (#72) is meant to catch.

Proposed fix

Acceptance

  • setup succeeds on a freshly-booted box even while unattended-upgrades holds the lock.
  • On a genuine apt failure, the real error is surfaced, not hidden by -qq.

Found provisioning the miner-0 release rig (real-hardware validation of the release-gated e2e direction).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingsetuprigforge.sh, config.json, first-run setup

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions