Skip to content

Update the node package list only before installing packages#17690

Merged
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
hakman:update-packages
Oct 24, 2025
Merged

Update the node package list only before installing packages#17690
k8s-ci-robot merged 1 commit intokubernetes:masterfrom
hakman:update-packages

Conversation

@hakman
Copy link
Copy Markdown
Member

@hakman hakman commented Oct 17, 2025

/cc @justinsb

@k8s-ci-robot k8s-ci-robot requested a review from justinsb October 17, 2025 14:29
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. area/nodeup size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Oct 17, 2025
Signed-off-by: Ciprian Hacman <ciprian@hakman.dev>
@hakman
Copy link
Copy Markdown
Member Author

hakman commented Oct 17, 2025

/assign @justinsb

@hakman
Copy link
Copy Markdown
Member Author

hakman commented Oct 20, 2025

@justinsb any chance you have some time to look at this?

// If it is newer than 10 minutes, we skip apt-get update.
stat, err := os.Stat("/var/lib/dpkg/status")
if err != nil {
klog.Infof("Error getting dpkg status info: %v", err)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I feel like we probably should apt-get update in this case (?)

cmd.Env = env
output, err := cmd.CombinedOutput()
if err != nil {
klog.Infof("Error fetching the latest list of available packages: %v:\n%s", err, string(output))
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: klog.Warningf or klog.Errorf ...

And maybe a comment that we don't want to fail the nodeup for this, because it could be a transient mirror failure (for example)

@justinsb
Copy link
Copy Markdown
Member

Some suggestions but nothing major/blocking.

Thanks for doing this!

/approve
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Oct 24, 2025
@k8s-ci-robot
Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: justinsb

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 24, 2025
@k8s-ci-robot k8s-ci-robot merged commit cf5c050 into kubernetes:master Oct 24, 2025
26 checks passed
@k8s-ci-robot k8s-ci-robot added this to the v1.35 milestone Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. area/nodeup cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants