Skip to content

[Nexthop] Don't fail dnf when mirrors are unreachable#1006

Open
travisb-nexthop wants to merge 1 commit intofacebook:mainfrom
nexthop-ai:distro_image_init_dnf
Open

[Nexthop] Don't fail dnf when mirrors are unreachable#1006
travisb-nexthop wants to merge 1 commit intofacebook:mainfrom
nexthop-ai:distro_image_init_dnf

Conversation

@travisb-nexthop
Copy link
Contributor

Pre-submission checklist

  • I've ran the linters locally and fixed lint errors related to the files I modified in this PR. You can install the linters by running pip install -r requirements-dev.txt && pre-commit install
  • pre-commit run

Summary

During early boot or in some lab scenarios there is no external network connectivity and querying external RPM mirror will fail. By default CentOS treats this as a fatal failure and will refuse to continue dnf processing, even if the necessary packages are available in an RPM repo which can be accessed.

This is a problem because platform_manager uses dnf to install the BSP RPM which comes from the local_rpm_repo. We need this to succeed to have a usable system where platform_manager and therefore the FBOSS agents and services come up.

This change makes all RPM repos optional so a failure to connect will not cancel dnf operations. Thus platform_manager will succeed in installing the BSP RPM even when there is no external connectivity.

Test Plan

This was tested as a fresh install on a dut installed in an isolated network where there is no external network access.

During early boot or in some lab scenarios there is no external network
connectivity and querying external RPM mirror will fail. By default
CentOS treats this as a fatal failure and will refuse to continue dnf
processing, even if the necessary packages are available in an RPM repo
which can be accessed.

This is a problem because platform_manager uses dnf to install the BSP
RPM which comes from the local_rpm_repo. We need this to succeed to have
a usable system where platform_manager and therefore the FBOSS agents
and services come up.

This change makes all RPM repos optional so a failure to connect will
not cancel dnf operations. Thus platform_manager will succeed in
installing the BSP RPM even when there is no external connectivity.

This was tested as a fresh install on a dut installed in an isolated
network where there is no external network access.
@meta-cla meta-cla bot added the CLA Signed label Mar 17, 2026
@travisb-nexthop travisb-nexthop marked this pull request as ready for review March 17, 2026 00:25
@travisb-nexthop travisb-nexthop requested a review from a team as a code owner March 17, 2026 00:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant