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

Pin the Jenkins version to the last pre-systemd version. #790

Closed
wants to merge 6 commits into from

Conversation

nuclearsandwich
Copy link
Contributor

Description

This cookbook expects the package install of Jenkins to install with sysvinit style init scripts and configures jenkins with that assumption.

Jenkins packages after 2.335 (weekly) and 2.332.1 (LTS) and on use systemd service units to manage the Jenkins service [1].

This cookbook has not yet been made compatible with these versions.

This pull request is something of a straw man to get CI turning over again so I can start working on a new cookbook version that supports the current Jenkins packages.

Describe what this change achieves

Issues Resolved

In the large this doesn't really resolve anything as it forces cookbook consumers to use an older version of Jenkins, I'm not entirely certain if I would recommend that this PR be merged. It depends on whether being stuck on an older version is worse than being completely non-functional in the eyes of other cookbook maintainers.

#783 and #789 are both related to these upstream changes.

Check List

  • A summary of changes made is included in the CHANGELOG under ## Unreleased
  • New functionality includes testing.
  • New functionality has been documented in the README if applicable.

@nuclearsandwich nuclearsandwich self-assigned this Dec 2, 2022
@nuclearsandwich nuclearsandwich requested a review from a team as a code owner December 2, 2022 16:10
@nuclearsandwich
Copy link
Contributor Author

Depending on the CI results here, I'll be seeking advice from other sous-chefs maintainers on whether this pin, if mergeable at all, merits its own major version bump. My biggest fear is inadvertently downgrading a user's existing Jenkins install. Something Jenkins very much does not like.

A more involved solution would be doing some inspection of a currently installed Jenkins package and aborting if a downgrade would occur.

@Stromweld Stromweld added Release: Major Release to Chef Supermarket as a major change when merged Documentation Improvements or additions to documentation labels Dec 2, 2022
@Stromweld
Copy link
Contributor

Since it's just an attribute change and it can be easily overridden I think this makes sense.

Stromweld
Stromweld previously approved these changes Dec 2, 2022
Copy link
Contributor

@Stromweld Stromweld left a comment

Choose a reason for hiding this comment

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

LGTM

@Stromweld
Copy link
Contributor

Quick look at a few of the integration failures it looks like there may need to be some work around the service management.

@nuclearsandwich
Copy link
Contributor Author

Quick look at a few of the integration failures it looks like there may need to be some work around the service management.

Yeah I haven't had a chance to dig into it yet, I switched gears today to handle this problem in my own open source cookbooks downstream of this one.

I think it may be the fact that I picked an LTS version and the integration tests are using the mainline / weekly repos. We may have to get a bit more sophisticated or switch the default to the LTS repos if the Jenkins project does not provide binaries for the weekly releases from that long ago. Arguably switching and pinning an LTS version is probably better but even the "LTS" release required for this cookbook is not currently supported.

@davidsainty
Copy link
Contributor

One option is to deprecate RPM installations and just prefer .war based installations, which is more portable anyway, and I can confirm works well on RedHat with latest LTS releases.

@xorima
Copy link
Contributor

xorima commented Dec 4, 2022

tag me if you want this admin merged

This cookbook expects the package install of Jenkins to install with
sysvinit style init scripts and configures jenkins with that assumption.

Jenkins packages after 2.335 (weekly) and 2.332.1 (LTS) and on use
systemd service units to manage the Jenkins service [1].

This cookbook has not yet been made compatible with these versions.

This pull request is something of a straw man to get CI turning over
again so I can start working on a new cookbook version that supports the
current Jenkins packages.

[1]: https://www.jenkins.io/blog/2022/03/25/systemd-migration/
@ramereth
Copy link
Contributor

Quick look at a few of the integration failures it looks like there may need to be some work around the service management.

This seems to be related to the CI system as I'm not able to replicate this on my system. I'm looking into this to see what we need to adjust.

This ensures that we enable the service which will install the initrc stubs for
systemd. This apparently is needed when running on an Ubuntu 22.04 host when
testing.

Signed-off-by: Lance Albertson <lance@osuosl.org>
This cookbook needs a major refactor to have it work properly with Chef 18. Most
of the issues are related to the use attributes referencing other attributes.
For now, let's just get a release out with fixes and look into a major refactor
later.

Signed-off-by: Lance Albertson <lance@osuosl.org>
@ramereth
Copy link
Contributor

ramereth commented Dec 28, 2022

@nuclearsandwich so unfortunately I think this will break more things than fix. We have two major issues currently with this cookbook that need to be addressed:

  1. Needs support for the newer systemd packages
  2. Converted to a resource based cookbook and remove attribute issues that we're having with Chef 18

I don't have enough time to tackle both of these above, so for now I'm going to focus on at least getting systemd working in a different PR but mark Chef 18 as incompatible currently. I may or may not try and resolve some of the Chef 18 issues if I need to make systemd work properly or actually go ahead and do both if it's the best option moving forward.

@nuclearsandwich
Copy link
Contributor Author

nuclearsandwich commented Jun 29, 2023

Un-mothballing this one.

so unfortunately I think this will break more things than fix.

Could you elaborate on what breakages there'd be. The cookbook is not functioning in its current state and there's a growing amount of bitrot to contend with (I've started on some with #808).

Here's what I was thinking as a path toward restoring this cookbook (and thus unblocking Jenkins upgrades in my own org). As I wrote up the below, I realized that I am also focusing on the stable rather than current configurations although the end-state should allow us to support both.

  • Pin Jenkins back to before the systemd change, which also means that Java 8 is still supported.
  • Address other bitrot to get CI working on main
  • Get the cookbook working with Jenkins package-installed as a systemd unit instead of a sysvinit script.
  • Move the pin forward to the last Jenkins stable version to support java 8 and java 11.
  • Update this cookbook to support java11, and default to it. This may also require or recommend dropping some older platforms.
  • Remove the version pin entirely allowing the cookbook to default to the latest stable or current version of Jenkins

I am not currently running Chef 18 anywhere so I think that marking it incompatible for now and redoing that work separately would be okay with me.

so for now I'm going to focus on at least getting systemd working in a different PR but mark Chef 18 as incompatible currently

Did you get underway with this work? I couldn't find any related PRs.
My approach to the work is motivated by needing/wanting to provide an upgrade path for my live infrastructure and also trying to change as things at once as possible. Launching right in to supporting the latest stable and current releases would require fixing both systemd and java8 vs java11 compatibility while tests are offline. And that's a huge scope to undertake all at once.

@nuclearsandwich
Copy link
Contributor Author

My persistent hope with this PR is that I'd be able to get at least smoke tests turning over again under the sysvinit scripts so I could trust that any failures when handling the systemd migration were definitely introduced by the migration efforts. But so many of the basic tests now fail on the target Jenkins version that I'm not really certain it makes sense to try.

In my local workspace, I'm moving Jenkins forward to 2.346.1, which is a systemd-based package but is the last one supporting java 8. I'll be going at it somewhat blind, but if I can get at least one set of smoke tests passing again that will be something.

Jenkins boots cleanly from the systemd unit but java and jenkins environment parameters from /etc/default/jenkins aren't respected. In the past I've converted a few /etc/default/* files to cleanly serve as systemd EnvironmentFile values but the more conventional thing to do at this stage is move that entire file's configuration to a systemd override. So I'll start there next.

@damacus
Copy link
Member

damacus commented Aug 1, 2023

@nuclearsandwich this now probably needs a rebase :(

@damacus damacus closed this Oct 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation Release: Major Release to Chef Supermarket as a major change when merged
Projects
None yet
6 participants