Skip to content

Conversation

@pavannaregundi
Copy link
Contributor

@pavannaregundi pavannaregundi commented Nov 12, 2025

This change adds support for MIRROR_URL as a build parameters to sonic-buildimage. MIRROR_URL can be any mirror of https://packages.trafficmanager.net.

Why I did it

  • Download from https://packages.trafficmanager.net is flaky. Due to this there is a requirement to create local mirror for the same.
  • Current build options does not give option to set alternative mirror url.
Work item tracking
  • Microsoft ADO (number only):

How I did it

  • Introduced MIRROR_URL variable to replace all occurrences of https://packages.trafficmanager.net.
  • Since packages.trafficmanager.net appears in multiple places with both HTTP and HTTPS links, HTTPS is chosen for consistency and security.
  • Default value of MIRROR_URL is set to https://packages.trafficmanager.net.
  • The variable can be overridden by passing it as a build argument.
MIRROR_URL=https://packages.trafficmanager.net SONIC_VERSION_CONTROL_COMPONENTS=py2,py3,web,git,docker MIRROR_SNAPSHOT=y make configure PLATFORM=marvell-teralynx
MIRROR_URL=https://packages.trafficmanager.net SONIC_VERSION_CONTROL_COMPONENTS=py2,py3,web,git,docker MIRROR_SNAPSHOT=y make target/sonic-marvell-teralynx.bin

How to verify it

Currently https link of https://packages.trafficmanager.net, fails with following error. For this changes to be merged, we will need restrictions on https to be removed.

#14 3.208 Err:5 https://packages.trafficmanager.net/snapshot/debian/20251014T002409Z bookworm Release
#14 3.208   Redirection from https to 'http://packages.trafficmanager.net/debian-snapshot/debian/ts/20251014T002409Z/dists/bookworm/Release' is forbidden [IP: 13.107.246.68 443]
#14 3.439 Err:6 https://packages.trafficmanager.net/snapshot/debian/20251014T002409Z bookworm-updates Release
#14 3.439   Redirection from https to 'http://packages.trafficmanager.net/debian-snapshot/debian/ts/20251014T002409Z/dists/bookworm-updates/Release' is forbidden [IP: 13.107.246.68 443]
#14 3.673 Err:7 https://packages.trafficmanager.net/snapshot/debian/20251014T002409Z bookworm-backports Release
#14 3.673   Redirection from https to 'http://packages.trafficmanager.net/debian-snapshot/debian/ts/20251014T002409Z/dists/bookworm-backports/Release' is forbidden [IP: 13.107.246.68 443]
#14 3.905 Err:8 https://packages.trafficmanager.net/snapshot/debian-security/20251014T002334Z bookworm-security Release
#14 3.905   Redirection from https to 'http://packages.trafficmanager.net/debian-snapshot/debian-security/ts/20251014T002334Z/dists/bookworm-security/Release' is forbidden [IP: 13.107.246.68 443]

Changes are verified with alternative local mirror which does not have restriction for https.

Which release branch to backport (provide reason below if selected)

  • 202205
  • 202211
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Tested branch (Please provide the tested image version)

Description for the changelog

Link to config_db schema for YANG module changes

A picture of a cute animal (not mandatory but encouraged)

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

This change adds support for MIRROR_URL as a build parameters to
sonic-buildimage. MIRROR_URL can be mirror of https://packages.trafficmanager.net.

Signed-off-by: Pavan Naregundi <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command.

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