Skip to content

Conversation

@Devinwong
Copy link
Collaborator

@Devinwong Devinwong commented Jan 9, 2026

What type of PR is this?
/kind feature

What this PR does / why we need it:

  • During caching, dnf download will also download the required dependencies now by adding --resolve.
  • During provisioning, when dependency RPMs are cached, they are included in the argument list to dnf_install. When no dependency RPM is cached, only the main package RPM is included. And dnf_install will handle installing dependencies from configured repos (downloading from network) as needed.
    • e.g.: kubelet-1.34.0-5.azl3.x86_64.rpm requires containernetworking-plugins. Now we cache both at VHD build time and during provisioning, so dnf install will first try to install kubelet and containernetworking-plugins from local cache.

Which issue(s) this PR fixes:

Fixes #

Requirements:

  • uses conventional commit messages
  • includes documentation
  • adds unit tests
  • tested upgrade from previous version
  • commits are GPG signed and Github marks them as verified

Special notes for your reviewer:

Release note:

none

@Devinwong
Copy link
Collaborator Author

[Real world logs]
Before the fix:

+ dnf install -y /opt/kubelet/downloads/kubelet-1.34.0-5.azl3.x86_64.rpm
Last metadata expiration check: 1:08:24 ago on Wed Jan  7 22:07:49 2026.
Dependencies resolved.
============================================================================================
 Package                       Arch    Version       Repository                         Size
============================================================================================
Installing:
 kubelet                       x86_64  1.34.0-5.azl3 @commandline                       22 M
Installing dependencies:
 containernetworking-plugins   x86_64  1.7.1-4.azl3  azurelinux-official-cloud-native   26 M

Transaction Summary
============================================================================================
Install  2 Packages

Total size: 48 M
**Total download size: 26 M**
Installed size: 180 M
Downloading Packages:
containernetworking-plugins-1.7.1-4.azl3.x86_64  55 MB/s |  26 MB     00:00    
--------------------------------------------------------------------------------
Total                                            54 MB/s |  26 MB     00:00     

With this feature:

+ dnf install -y /opt/kubelet/downloads/kubelet-1.34.0-5.azl3.x86_64.rpm /opt/kubelet/downloads/containernetworking-plugins-1.9.0-1.azl3.x86_64.rpm
Last metadata expiration check: 0:54:51 ago on Fri Jan  9 20:37:36 2026.
Dependencies resolved.
================================================================================
 Package                       Arch     Version            Repository      Size
================================================================================
Installing:
 containernetworking-plugins   x86_64   1.9.0-1.azl3       @commandline    27 M
 kubelet                       x86_64   1.34.0-5.azl3      @commandline    22 M

Transaction Summary
================================================================================
Install  2 Packages

Total size: 49 M
Installed size: 183 M
Downloading Packages:
Running transaction check

Note it won't download anything from the internet

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