Skip to content

TOOL-11815 linux-pkg: kernel sync-with-upstream logic sometimes fails to find expected tags upstream#178

Merged
pzakha merged 1 commit intodelphix:masterfrom
pzakha:tool-11815
Jul 13, 2021
Merged

TOOL-11815 linux-pkg: kernel sync-with-upstream logic sometimes fails to find expected tags upstream#178
pzakha merged 1 commit intodelphix:masterfrom
pzakha:tool-11815

Conversation

@pzakha
Copy link
Copy Markdown
Contributor

@pzakha pzakha commented Jun 29, 2021

Canonical has 2 ways of naming their tags:

  • Ubuntu-gcp-5.4.0-1046.49
  • Ubuntu-gcp-5.4-5.4.0-1046.49_18.04.1

For a given kernel version and a given distribution, only one naming scheme is being used. When two distributions (such as 20.04 and 18.04) use the same major kernel version, Canonical first applies the patches to one distribution and then creates a base tag. It then backports those changes to the older distribution, and then creates a longer tag name.

For instance with the example above we can see that the base tag exists on the 20.04 remote:

$ git ls-remote focal-gcp | grep 1046
7870999272937a8d2e14165409d799c2876771a3 refs/tags/Ubuntu-gcp-5.4.0-1046.49

While on 18.04 there is the longer tag name:

$ git ls-remote bionic-gcp | grep 1046
0432f0aad667c47d0d45345292fd59b4b5ee0d09 refs/tags/Ubuntu-gcp-5.4-5.4.0-1046.49_18.04.1

This review also fixes 2 small issues:

  1. On focal we use the non-hwe kernel for the "generic" platform
  2. The old logic for detecting if the kernel is up-to-date is slightly wrong: it checks if the upstream head is an ancestor of the current head, but there's a corner case where this doesn't quite work, such as when the current head was based on a tag that is between the upstream head and the current head. For instance:
* Delphix commit 6 (HEAD)
*  ...
* Delphix commit 1
* Previous upstream
* Ubuntu commit
* ...
* Ubuntu commit
* New upstream
* ...

Testing

Ran update-upstream to update all kernels on Focal

@pzakha pzakha requested a review from sdimitro June 29, 2021 17:26
Copy link
Copy Markdown
Contributor

@sdimitro sdimitro left a comment

Choose a reason for hiding this comment

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

LGTM and I appreciate the writeout+code_comments

@pzakha pzakha merged commit d06bc66 into delphix:master Jul 13, 2021
pzakha added a commit to pzakha/linux-pkg that referenced this pull request Aug 2, 2021
Backports the following changes:
- Add comment to explain use of "--allow-downgrades" (delphix#150)
- change drgn upstream repo to main (delphix#161)
- TOOL-11734 linux-pkg should use install_build_deps_from_control_file whenever possible (delphix#177)
- TOOL-11757 linux-pkg: use build dependencies list stored in virtualization package repository (delphix#175)
- TOOL-11815 linux-pkg: kernel sync-with-upstream logic sometimes fails to find expected tags upstream (delphix#178)
- TOOL-11892 Bulk modify of shebang lines to use /usr/bin/env (delphix#179)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants