Skip to content

Wait for the network before fetching IPFS manifests on first boot - #735

Merged
Marketen merged 2 commits into
masterfrom
marc/fix-firstboot-ipfs-manifest-race
Oct 8, 2026
Merged

Marketen merged 2 commits into
masterfrom
marc/fix-firstboot-ipfs-manifest-race

Conversation

@Marketen

@Marketen Marketen commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Problem

On the first boot after a Debian ISO install, dappnode_install.sh runs from rc.local, which doesn't wait for DHCP. Debian configures the NIC as allow-hotplug, and network-online.target doesn't wait for those. The NOTIFICATIONS/PREMIUM versions are bare /ipfs/<cid> refs, so their manifests are fetched over the network. That is the first network access of an ISO install, and it can run before the machine has an address:

[ERROR] Could not fetch IPFS manifest for NOTIFICATIONS from: https://ipfs-gateway.dappnode.net/ipfs/QmW5…/dappnode_package.json

The installation then aborts on first boot. This reproduced on every Debian E2E run (#731); the gateway itself answers instantly. Ubuntu waits for the network through netplan, so it doesn't hit this.

Fix

Retry the manifest fetch for up to ~2 minutes (24 × 5 s) before giving up, with one warning on stderr (stdout is the function's return value). When the network is already up, nothing changes: the first attempt succeeds.

Verification

  • Unit-tested the function with a stubbed download: immediate success makes 1 request; success after failures returns the clean ref; persistent failure gives up after 24 attempts with the original error.
  • With this change and the cdrom fix, the Debian unattended USB E2E passes end to end.

🤖 Generated with Claude Code

After an ISO install, dappnode_install.sh runs from rc.local, which does
not wait for DHCP: Debian configures the NIC as allow-hotplug, and
network-online.target does not wait for those. Fetching the
NOTIFICATIONS/PREMIUM manifests, the first network access of an ISO
install, could therefore run before the machine had an address and
abort the installation with "Could not fetch IPFS manifest".

Retry the fetch for up to ~2 minutes before giving up.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Marketen
Marketen merged commit 0ff858b into master Oct 8, 2026
15 of 16 checks passed
@Marketen
Marketen deleted the marc/fix-firstboot-ipfs-manifest-race branch October 8, 2026 13:35
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.

2 participants