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

Sous Chefs Adoption #757

Merged
merged 33 commits into from
Feb 8, 2021
Merged

Sous Chefs Adoption #757

merged 33 commits into from
Feb 8, 2021

Conversation

ramereth
Copy link
Contributor

@ramereth ramereth commented Nov 4, 2020

This includes a variety of fixes that are needed to get the suites to pass properly.

@ramereth ramereth added the Release: Minor Release to Chef Supermarket as a minor release when merged label Nov 4, 2020
@ramereth ramereth changed the title Sous Chefs Adoption WIP - Sous Chefs Adoption Nov 5, 2020
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Using confluence-publisher is causing integration testing issues.

Signed-off-by: Lance Albertson <[email protected]>
@ramereth ramereth force-pushed the sous-chefs-adoption branch from 95da4c4 to cdc6147 Compare December 7, 2020 19:34
@kitchen-porter
Copy link
Contributor

kitchen-porter commented Dec 7, 2020

1 Warning
⚠️ This is a big Pull Request.

Generated by 🚫 Danger

@nuclearsandwich
Copy link
Contributor

I started working in a side branch. @ramereth did you mention some oddness going on with plugin installation? My local kitchen runner seems to become unable to install plugins. I haven't figured out if this is a new issue uncovered by getting farther in the tests or if I'm hitting a rate limit on the jenkins update center.

I started a side branch https://github.com/sous-chefs/jenkins/tree/smoke-out-the-smoke-tests with two small changes that move us slightly forward.

@ramereth
Copy link
Contributor Author

I started working in a side branch. @ramereth did you mention some oddness going on with plugin installation? My local kitchen runner seems to become unable to install plugins. I haven't figured out if this is a new issue uncovered by getting farther in the tests or if I'm hitting a rate limit on the jenkins update center.

What kind of issues are you running into? I believe 8d6b224 fixed one issue I had with permissions.

@nuclearsandwich
Copy link
Contributor

What kind of issues are you running into?

Trying to install any plugin that isn't already installed (the breaking failure is in the checks-api plugin but if I try to install others via jenkins-cli after a kitchen login I get the same issue times out fetching the plugin from update center.

I've just triggered a fresh build to see if the same problem occurs in the same place (otherwise I'd suspect some kind of rate-limiting).

@nuclearsandwich
Copy link
Contributor

Ran it again and got the same issue fresh so it isn't rate limiting. Now it's no longer Friday evening I'm realizing that it's quite possibly #762

@ramereth
Copy link
Contributor Author

@nuclearsandwich at this point I think this PR should be finished and exclude any suites/tests that aren't currently working and try and fix them in a later PR.

@ramereth ramereth force-pushed the sous-chefs-adoption branch 3 times, most recently from 8c35d08 to c48ab84 Compare February 2, 2021 01:01
ramereth and others added 12 commits February 4, 2021 14:00
Signed-off-by: Lance Albertson <[email protected]>
With the removal of the Remoting-based CLI in Jenkins 2.165 the only
argument to the groovy command that works is the `=` argument for stdin.

We'll need to make larger changes to the cookbook than just this but
this moves our tests forward for now.
To be honest I'm not sure what's _supposed_ to happen when you save the
result of a resource declaration to a variable but the credentials field
normally expects a credential id.

Without this change it seems like the resource name is converted to a
string and finds its way into a groovy script where it is invalid.
We're running into issues with hitting the limit of open files while testing
this cookbook. It seems this fix on Debian-based systems is also needed on RHEL.

Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
Signed-off-by: Lance Albertson <[email protected]>
@ramereth ramereth force-pushed the sous-chefs-adoption branch from 9c671dd to d41c19b Compare February 4, 2021 22:01
@nuclearsandwich
Copy link
Contributor

The remaining failing test is reliably producing a segfault in dokken (on the GitHub Action) and vagrant (for me locally).

The error we see in the cookbook log is a connection refusal when connecting to Jenkins as the process has crashed and is not listening on port 8080.

As a little refresher, Jenkins installed via the package on Ubuntu 20.04 installs an init script rather than a systemd unit. So far I can reproduce the segfault by restarting Jenkins via systemctl restart jenkins but I have not been able to cause it when running the same Jenkins command via kitchen login in the same environment although I just realized I was running it as root not as Jenkins so I'll try to improve my reproduction of the issue and figure out what high level operation is triggering the segfault. I also haven't tried to capture and investigate the core dump which is another avenue to try.

@nuclearsandwich
Copy link
Contributor

I can reproduce it starting Jenkins via /usr/bin/daemon with

/usr/bin/daemon --core -f --name=jenkins --inherit --env=JENKINS_HOME=/var/lib/jenkins -- /bin/java -Djenkins.install.runSetupWizard=false -jar /usr/share/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpListenAddress=0.0.0.0 --httpPort=8080 --ajp13Port=-1 --httpKeepAliveTimeout=300000

and then running

 java -jar /tmp/kitchen/cache/jenkins-cli.jar -s 'http://localhost:8080' -auth vagrant:vagrant who-am-i

The OpenJ9 VM is segfaulting when runnig the Jenkins server in some
tests. As far as I know OpenJ9 is not a supported server for Jenkins
currently.
To allow multiple instances to be converged in parallel (as well as
other local uses of port 8080) comment this port mapping out by default
while preserving the note that it can be uncommented when
troubleshooting.
@nuclearsandwich
Copy link
Contributor

I haven't gotten any further in debugging the segfault but happened upon some information when trying to get more info out of the core dump. The java installation inside the kitchen environment is based on OpenJ9 which as far as I know is not fully tested for running Jenkins.

# java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
Eclipse OpenJ9 VM (build openj9-0.18.1, JRE 1.8.0 Linux amd64-64-Bit Compressed References 20200122_511 (JIT enabled, AOT enabled)
OpenJ9   - 51a5857d2
OMR      - 7a1b0239a
JCL      - 8cf8a30581 based on jdk8u242-b08)

I discovered this when installing openjdk-8-dbg thinking it would get me debug symbols for my /bin/java and instead I got a /bin/java that no longer segfaults.

I've pushed b2f4768 which switches the fixture cookbook JVM installation to hotspot, which I think is the correct approach even though it affects all recipes because I'm not aware of any official stance on OpenJ9 for the Jenkins project and issues with OpenJ9 are best troubleshooted elsewhere.

@nuclearsandwich
Copy link
Contributor

Me watching CI: Hold on to your butts

nuclearsandwich
nuclearsandwich previously approved these changes Feb 7, 2021
Copy link
Contributor

@nuclearsandwich nuclearsandwich left a comment

Choose a reason for hiding this comment

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

I made the most recent commits so extra eyes on b2f4768 and 17af8d6 probably isn't a bad idea.

xorima
xorima previously approved these changes Feb 8, 2021
@xorima
Copy link
Contributor

xorima commented Feb 8, 2021

LGTM

@ramereth ramereth dismissed stale reviews from xorima and nuclearsandwich via 82eaec2 February 8, 2021 19:17
@ramereth ramereth merged commit 593ff13 into master Feb 8, 2021
@ramereth ramereth deleted the sous-chefs-adoption branch February 8, 2021 20:14
@kitchen-porter
Copy link
Contributor

Released as: 8.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Release: Minor Release to Chef Supermarket as a minor release when merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants