Skip to content

Conversation

@everydayintech
Copy link
Contributor

Motivation

Failed curl downloads of the OS image resulted in failed OSD. This improvement means that if network connectivity is interrupted for several minutes, the download will continue where it was interrupted. Save-WebFile is more robust against network disconnections and disruptions.

How it works

To resume failed HTTP downloads, this change uses the curl --continue-atoption if the remote server supports the HTTP Accept-Ranges header, and retries the download up to ten times using exponential backoff.

Example

Working example where the network connection was disrupted for several minutes:
image

Copy link
Owner

@OSDeploy OSDeploy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work ... thanks!

@OSDeploy OSDeploy merged commit 98520c9 into OSDeploy:master Oct 2, 2025
@OSDeploy OSDeploy self-assigned this Oct 2, 2025
@MichaelEscamilla
Copy link
Collaborator

This is awesome! Thanks @everydayintech!

KatsuhiroWatanabe added a commit to KatsuhiroWatanabe/OSD that referenced this pull request Oct 6, 2025
…tion, and improve download reliability

- Add support for importing offline OS catalogs in
  - Get-OSDCloudOperatingSystems.ps1
  - Get-OSDCloudOperatingSystemsIndexMap.ps1
  - Get-OSDCloudOperatingSystemsIndexes.ps1
- Add offline driver catalog support in OSDCloud.DriverPack.ps1
- Add post-network script execution and optional supression of module auto-update in
  - Initialize-OSDCloudStartNet.ps1
  - OSDCloudTemplate.ps1
- Since PR OSDeploy#316 adresses a simillar improvement, I've removed my changes.
  (Improve Save-WebFile.ps1 by checking HTTP headers before download)
KatsuhiroWatanabe added a commit to KatsuhiroWatanabe/OSD that referenced this pull request Oct 6, 2025
…tion, and improve download reliability

- Add support for importing offline OS catalogs in
  - Get-OSDCloudOperatingSystems.ps1
  - Get-OSDCloudOperatingSystemsIndexMap.ps1
  - Get-OSDCloudOperatingSystemsIndexes.ps1
- Add offline driver catalog support in OSDCloud.DriverPack.ps1
- Add post-network script execution and optional supression of module auto-update in
  - Initialize-OSDCloudStartNet.ps1
  - OSDCloudTemplate.ps1
- Since PR OSDeploy#316 adresses a simillar improvement, I've removed my changes.
  (Improve Save-WebFile.ps1 by checking HTTP headers before download)
KatsuhiroWatanabe added a commit to KatsuhiroWatanabe/OSD that referenced this pull request Oct 12, 2025
…tion, and improve download reliability

- Add support for importing offline OS catalogs in
  - Get-OSDCloudOperatingSystems.ps1
  - Get-OSDCloudOperatingSystemsIndexMap.ps1
  - Get-OSDCloudOperatingSystemsIndexes.ps1
- Add offline driver catalog support in OSDCloud.DriverPack.ps1
- Add post-network script execution and optional supression of module auto-update in
  - Initialize-OSDCloudStartNet.ps1
  - OSDCloudTemplate.ps1
- Since PR OSDeploy#316 adresses a simillar improvement, I've removed my changes.
  (Improve Save-WebFile.ps1 by checking HTTP headers before download)
KatsuhiroWatanabe added a commit to KatsuhiroWatanabe/OSD that referenced this pull request Oct 12, 2025
…xecution

- Add support for importing offline OS catalogs in
  - Get-OSDCloudOperatingSystems.ps1
  - Get-OSDCloudOperatingSystemsIndexMap.ps1
  - Get-OSDCloudOperatingSystemsIndexes.ps1
- Add offline driver catalog support in OSDCloud.DriverPack.ps1
- Add post-network script execution and optional supression of module auto-update in
  - Initialize-OSDCloudStartNet.ps1
  - OSDCloudTemplate.ps1
- removed: Improve Save-WebFile.ps1 by checking HTTP headers before download

Due to conflicts with PR OSDeploy#316 affecting Save-WebFile.ps1, my changes have been removed to maintain consistency with the upstream implementation.
KatsuhiroWatanabe added a commit to KatsuhiroWatanabe/OSD that referenced this pull request Dec 1, 2025
…xecution

- Add support for importing offline OS catalogs in
  - Get-OSDCloudOperatingSystems.ps1
  - Get-OSDCloudOperatingSystemsIndexMap.ps1
  - Get-OSDCloudOperatingSystemsIndexes.ps1
- Add offline driver catalog support in OSDCloud.DriverPack.ps1
- Add post-network script execution and optional supression of module auto-update in
  - Initialize-OSDCloudStartNet.ps1
  - OSDCloudTemplate.ps1
- removed: Improve Save-WebFile.ps1 by checking HTTP headers before download

Due to conflicts with PR OSDeploy#316 affecting Save-WebFile.ps1, my changes have been removed to maintain consistency with the upstream implementation.
KatsuhiroWatanabe added a commit to KatsuhiroWatanabe/OSD that referenced this pull request Dec 1, 2025
…xecution

- Add support for importing offline OS catalogs in
  - Get-OSDCloudOperatingSystems.ps1
  - Get-OSDCloudOperatingSystemsIndexMap.ps1
  - Get-OSDCloudOperatingSystemsIndexes.ps1
- Add offline driver catalog support in OSDCloud.DriverPack.ps1
- Add post-network script execution and optional supression of module auto-update in
  - Initialize-OSDCloudStartNet.ps1
  - OSDCloudTemplate.ps1
- removed: Improve Save-WebFile.ps1 by checking HTTP headers before download

Due to conflicts with PR OSDeploy#316 affecting Save-WebFile.ps1, my changes have been removed to maintain consistency with the upstream implementation.
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.

3 participants