puppetdb fails to build from source on noble

Bug #2069384 reported by Pushkar Kulkarni
14
This bug affects 1 person
Affects Status Importance Assigned to Milestone
puppetdb (Ubuntu)
Fix Released
High
Unassigned
Noble
Fix Committed
High
Unassigned

Bug Description

[ Impact ]
* Package puppetdb fails to build from source on noble. The `default-jdk/jre` packages from java-common have been migrated to openjdk-21. And the puppetdb level on noble (7.12.1-3) fails to build with openjdk-21. See ppa build [1].

* The current binaries of puppetdb were built prior to the default-jdk migration to openjdk-21. Running them with openjdk-21 (which puppetdb does not support) can have unforeseen consequences to users.

* Users of puppetdb migrating to noble from jammy might see regressions.

[ Test Plan ]
* Building puppetdb 7.12.1-3 on noble as in [1] causes FTBFS.

[ Where problems could occur ]

* This SRU proposes upgrading puppetdb to 8.4.1-1 (which is currently uploaded to oracular). This version is compatible with openjdk-21.

* However, puppetdb 8.4.1-1 also needs libclj-http-clojure (>= 3.12.3) which is not satisfiable on noble [2]. I plan to create a parallel SRU request, which should precede the current one, for package clj-http-clojure too.

[ Other Info ]
* I haven't attempted running the 7.12.1-3 binaries with the default-jdk/openjdk-21 because FTBFS in itself is an indicator of incompatibility and needs to be addressed.
* I also created an SRU bug for clj-http-clojure [3].
* A successful PPA build of puppetdb 8.4.1-1 on Noble, with libclj-http-clojure updated to 3.12.3-1 is seen here [4].

[1] https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-sru1/+build/28577254
[2] https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-sru2/+build/28577255
[3] https://bugs.launchpad.net/ubuntu/+source/clj-http-clojure/+bug/2069390
[4] https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-sru3/+build/28577425

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :
description: updated
description: updated
Revision history for this message
Nick Rosbrook (enr0n) wrote :

Have you tried to determine if there is a minimal set of patches that could be cherry-picked for an SRU, rather than backporting a new upstream version? Usually, backporting a new upstream version as an SRU requires a micro release exception, but I do not see any for this package on [1].

Otherwise, following the backports process [2] for this package *might* be more appropriate (i.e. land the new version in -backports rather than -updates).

Note that I am not on the SRU team or anything, but I came to look at this as a sponsor, so those are my thoughts.

[1] https://wiki.ubuntu.com/StableReleaseUpdates#Documentation_for_Special_Cases
[2] https://wiki.ubuntu.com/UbuntuBackports

Changed in puppetdb (Ubuntu Noble):
status: New → Incomplete
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Thanks, Nick.

I tried to only backport the patch that fixes FTBFS with openjdk-21. I see a build-time test fail [1]. There is another patch in 8.4.1-1 that skips a test, but I don’t find that relevant to this test failure.

[1] https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-noble/+build/28592673/+files/buildlog_ubuntu-noble-amd64.puppetdb_7.12.1-3ubuntu1ppa1_BUILDING.txt.gz

Revision history for this message
Benjamin Drung (bdrung) wrote :

Marking as fixed released for oracular since 8.4.1-1 built there.

I agree with Nick to cherry-pick the needed patches to make puppetdb build on noble. Have you tried bisecting upstream to see which commit fixes the test failure?

I am unsubscribing ~ubuntu-sponsors for now. Please re-subscribe once you have a debdiff to sponsor.

Changed in puppetdb (Ubuntu):
importance: Undecided → High
Changed in puppetdb (Ubuntu Noble):
importance: Undecided → High
Changed in puppetdb (Ubuntu):
status: New → Fix Released
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Thanks for the reviews and sincere apologies for my delayed response.

I was able to cherry-pick a patch (see attached debdiff) and get puppetdb building [1]. However, the autopkgtests failed:

=====

autopkgtest [00:30:07]: @@@@@@@@@@@@@@@@@@@@ summary
standalone FAIL stderr: warn: JDK 21.0.3 is neither tested nor supported. Please use JDK 11
with-puppetserver FAIL non-zero exit status 1

====

Whilst fixing test 'standalone' is straightforward (allow-stderr), the failure of test 'with-puppetserver'[2] might be related to incompatibility with puppetdb (7.*) and puppetserver(8.*) in noble. Howerver, contrary to what I initially assumed, puppetdb 7.* must work with puppetserver 8.*as per [3].

[1] https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-retest/+build/28627960
[2] https://paste.ubuntu.com/p/tsSxDp6ydh/
[3] https://www.puppet.com/docs/puppetdb/7/overview.html

I am investigating the autopkgtest failure.

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

I have managed to fix the autopkgtest failures by back-porting one more upstream patch along with some necessary changes to debian/test/*.

The final debdiff is attached here.

Test build: https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-retest/+build/28638064
Local autokpgtest run: https://paste.ubuntu.com/p/2SgC3YcJGY/

Changed in puppetdb (Ubuntu Noble):
status: Incomplete → In Progress
Revision history for this message
Nick Rosbrook (enr0n) wrote (last edit ):

Thanks for finding the minimal patches required for this. A few organizational things:

1. 0008-Resolve-ftbfs-with-java-21.patch: It would be good to have an Origin: field in the patch showing where you got this. It's good you have the Author: for credit, but links are easier to follow. I also prefer to have Bug-Ubuntu: fields in the patch headers.

2. 0009-Replace-use-of-to-pson.patch: This patch needs dep3 headers in general.

3. Are both patches, and the d/control change, directly related to the FTBFS? If so, the changelog would be more readable with an entry like:

* Fix FTBFS on noble (LP: XXXXXXX)
  - first patch summary
  - second patch summary
  - d/control change summary
* [...the rest...]

4. Finally, from a quick glance, it seems these same autopkgtest failures exist in oracular. Can you prepare a patch to fix those in oracular too?

Revision history for this message
Nick Rosbrook (enr0n) wrote :

LP is eating my indentation in the changelog entry example, but hopefully you get the idea.

Changed in puppetdb (Ubuntu Noble):
status: In Progress → Incomplete
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Thanks again, for the review!

> Points 1, 2, 3 above

  I've addressed them in the newly attached diff. Test build in PPA [1].

> Point 4

  Yes, I do have an MP created [2].

[1] https://launchpad.net/~pushkarnk/+archive/ubuntu/puppetdb-retest/+build/28646990
[2] https://code.launchpad.net/~pushkarnk/ubuntu/+source/puppetdb/+git/puppetdb/+merge/468942

Revision history for this message
Nick Rosbrook (enr0n) wrote :

Thanks! I have gone ahead and uploaded.

I did make one minor adjustment because I forgot to mention something before. Generally, it is a good idea to follow [1] when selecting a version number for SRUs. In this case, it might not technically matter because oracular already has a new upstream version in -release, but still.

> Yes, I do have an MP created [2].

I left a quick comment there. To make the SRU team's job easier, it would be good to also fill out the SRU template on bug 2072516 (even though it's trivial since it's about making autopkgtest pass).

[1] https://wiki.ubuntu.com/SecurityTeam/UpdatePreparation#Update_the_packaging

Changed in puppetdb (Ubuntu Noble):
status: Incomplete → In Progress
Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

Thanks! I added the SRU template on bug 2072516. And also addressed your comment on the oracular MP.

Revision history for this message
Dave Jones (waveform) wrote :

Reviewed the current state and it seems there's a feel bits of paperwork that still need a little bit of work before this can be sponsored:

* The "Where problems could occur" and "Other Info" sections in this bug haven't been updated to indicate this is now a minimal patch. The SRU team need this to be up to date when they come to review it (they're not going to read through the entire bug history to see it's no longer correct).

* An update to clj-http-clojure is (presumably?) no longer required; if it isn't, it's worth closing LP: #2069390 as invalid too

* The "Where problems could occur" section in this bug don't really give a sense of potential regressions. In fact, some of the bits in "Other Info" would probably be relevant here (e.g. the first point "I haven't attempted running the 7.12.1-3 binaries with the default-jdk/openjdk-21 because FTBFS in itself is an indicator of incompatibility and needs to be addressed").

* These same comments could be made regarding the related LP: #2072516 bug -- it needs updating to the fact this is now a minimal patch, and the "Where problems could occur" section needs a bit of work to suggest where things could go wrong operationally for users.

* The Origin: field in patch 0009-Replace-use-of-to-pson.patch (https://git.launchpad.net/ubuntu/+source/puppetdb/diff/puppet/lib/puppet/util/puppetdb/command.rb) doesn't seem to lead anywhere useful? Just gives me a blank patch. I'm presuming there should be some branch/commit identifiers in there to indicate what should be diff'd?

Revision history for this message
Dave Jones (waveform) wrote :

Unsubscribing ubuntu-sponsors; please re-subscribe once these points are addressed, and thank you for coming up with the minimal patch!

Revision history for this message
Timo Aaltonen (tjaalton) wrote :

please update the description to say that we're not using a full version backport

Changed in puppetdb (Ubuntu Noble):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-noble
Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Pushkar, or anyone else affected,

Accepted puppetdb into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/puppetdb/7.12.1-3ubuntu0.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Revision history for this message
Pushkar Kulkarni (pushkarnk) wrote :

TEST CASE:
1. Install and upgrade test.
    - try installing and removing puppetdb 7.12.1-3ubuntu0.1
      - apt install puppetdb=7.12.1-3ubuntu0.1
    - try upgrading puppetdb from 7.12.1-3 to 7.12.1-3ubuntu0.1 from noble-proposed
      - apt upgrade puppetdb=7.12.1-3ubuntu0.1
2. Run autopkgtests for puppetdb on noble using 7.12.1-3ubuntu0.1 from noble-proposed
   - autopkgtest puppetdb --apt-pocket=proposed=src:puppetdb -U -- lxd autopkgtest/ubuntu/noble/amd64

VERIFICATION DONE
1. Installation and upgrade from noble-proposed works as expected.
2. Autopkgtests pass with 7.12.1-3ubuntu0.1

tags: added: verification-done verification-done-noble
removed: verification-needed verification-needed-noble
Revision history for this message
Andreas Hasenack (ahasenack) wrote :

a) The "Where problems could occur" section still says this SRU is also updating libclj-yaml-clojure:

> * This SRU proposes upgrading puppetdb to 8.4.1-1 (which is currently uploaded to oracular). This version
> is compatible with openjdk-21.

That's no longer the case, correct?

b) do we still need the new build-dependency libclj-yaml-clojure? Wasn't that only for when it was thought that that package also needed updating?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.