Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🌱 E2e: Unhold CI packages before installing #7910

Merged

Conversation

lentzi90
Copy link
Contributor

What this PR does / why we need it:

It is common to mark kubeadm and related packages as held at a specific version to avoid accidental upgrades. The script for injecting CI artifacts does not take this into account, which means that if the base image used already has some version of a package installed and held, the script will fail to install the asked for version. To avoid this, we unhold before installing the packages and then hold again, as customary. Holding after installation also avoids any unintended upgrades later.

An alternative could be to add the flag --allow-change-held-packages to the install command, but I think unholding is a nicer way to do it.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes kubernetes-sigs/cluster-api-provider-openstack#1429

It is common to mark kubeadm and related packages as held at a specific
version to avoid accidental upgrades. The script for injecting CI
artifacts does not take this into account, which means that if the base
image used already has some version of a package installed and held, the
script will fail to install the asked for version.
To avoid this, we unhold before installing the packages and then hold
again, as customary. Holding after installation also avoids any
unintended upgrades later.
@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 12, 2023
@fabriziopandini
Copy link
Member

fabriziopandini commented Jan 12, 2023

It would be nice to get some eyes of folks from providers because they are the primary users of this script (or to bring this up to the community meeting)

@CecileRobertMichon @yastij @srm09 @sonasingh46

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 12, 2023
@sbueringer
Copy link
Member

/lgtm
/retest

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 9, 2023
@k8s-ci-robot
Copy link
Contributor

LGTM label has been added.

Git tree hash: f523fe75163574d4d26aeab49bf378735759f181

@fabriziopandini
Copy link
Member

/lgtm

Proposing a lazy consensus deadline for this Friday

apt-get install -y "$${CI_PACKAGE}=$${PACKAGE_VERSION}"
apt-mark hold "$${CI_PACKAGE}"
Copy link
Member

Choose a reason for hiding this comment

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

We probably should only hold if it was held before we Unhold

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I would say it is safer to hold regardless. This would only be used when requesting a specific version to be installed, so holding at that version makes sense IMO.

Copy link
Member

Choose a reason for hiding this comment

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

Good point

Copy link
Member

Choose a reason for hiding this comment

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

Also a script only for CI so shouldn't matter

@fabriziopandini
Copy link
Member

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: fabriziopandini

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

The pull request process is described here

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 May 15, 2023
@k8s-ci-robot k8s-ci-robot merged commit 8d9e5c2 into kubernetes-sigs:main May 15, 2023
@k8s-ci-robot k8s-ci-robot added this to the v1.5 milestone May 15, 2023
@lentzi90 lentzi90 deleted the lentzi90/hold-unhold-ci-artifacts branch May 15, 2023 10:53
@johannesfrey
Copy link
Contributor

/area e2e-testing

@k8s-ci-robot k8s-ci-robot added the area/e2e-testing Issues or PRs related to e2e testing label Jun 16, 2023
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/e2e-testing Issues or PRs related to e2e testing 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. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong kubeadm, kubelet versions in e2e tests
6 participants