Skip to content

Conversation

sxa
Copy link
Member

@sxa sxa commented Aug 28, 2025

Implementing the solution I described in #5883 (comment) which avoids the need for labels.

Fixes adoptium/infrastructure#3851

Signed-off-by: Stewart X Addison <[email protected]>
@sxa
Copy link
Member Author

sxa commented Aug 28, 2025

Both of these run through correctly running jdk_beans_0 which uses the display using this PR branch and without using sw.os.rhel.10 in the LABEL field:

UBI10 (Wayland)

https://ci.adoptium.net/job/Grinder/14201/console:

17:39:34  + which Xvfb
17:39:34  which: no Xvfb in (/home/jenkins/.local/bin:/home/jenkins/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin)
[Pipeline] sh
17:39:37  + weston --no-config --socket=wayland-vfb --backend=headless-backend.so --xwayland
17:39:37  Date: 2025-08-28 UTC
17:39:37  [15:39:37.086] weston 14.0.1
17:39:37                 https://wayland.freedesktop.org/
17:39:37                 Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
17:39:37                 Build: 14.0.1
17:39:37  [15:39:37.086] Command line: weston --no-config --socket=wayland-vfb --backend=headless-backend.so --xwayland
17:39:37  [15:39:37.086] OS: Linux, 6.8.0-1018-azure, #21~22.04.1-Ubuntu SMP Fri Nov  8 00:21:25 UTC 2024, x86_64
17:39:37  [15:39:37.086] Flight recorder: enabled
17:39:37  [15:39:37.086] Starting with no config file.
17:39:37  [15:39:37.651] Output repaint window is 7 ms maximum.
17:39:37  [15:39:37.651] Loading module '/usr/lib64/libweston-14/headless-backend.so'
17:39:37  [15:39:37.657] Registered plugin API 'weston_windowed_output_api_headless_v2' of size 16
17:39:37  [15:39:37.657] Color manager: no-op
17:39:37                   protocol support: no
17:39:37  [15:39:37.657] Output 'headless' attempts EOTF mode SDR and colorimetry mode default.
17:39:37  [15:39:37.658] Output 'headless' using color profile: stock sRGB color profile
17:39:37  [15:39:37.658] Output 'headless' enabled with head(s) headless
17:39:37  [15:39:37.658] Compositor capabilities:
17:39:37                 arbitrary surface rotation: no
17:39:37                 screen capture uses y-flip: no
17:39:37                 cursor planes: no
17:39:37                 arbitrary resolutions: no
17:39:37                 view mask clipping: no
17:39:37                 explicit sync: no
17:39:37                 color operations: no
17:39:37                 presentation clock: CLOCK_MONOTONIC_RAW, id 4
17:39:37                 presentation clock resolution: 0.000000001 s
17:39:37  [15:39:37.658] Loading module '/usr/lib64/weston/desktop-shell.so'
17:39:37  [15:39:37.658] Loading module '/usr/lib64/libweston-14/xwayland.so'
17:39:37  [15:39:37.659] Registered plugin API 'weston_xwayland_v3' of size 32
17:39:37  [15:39:37.659] Registered plugin API 'weston_xwayland_surface_v2' of size 24
17:39:37  [15:39:37.659] xserver listening on display :0
17:39:37  [15:39:37.659] launching '/usr/libexec/weston-keyboard'
17:39:37  [15:39:37.660] launching '/usr/libexec/weston-desktop-shell'
[Pipeline] echo
17:39:38  env.DISPLAY is :0

Noting that there was one test which failed in 1/10 iterations in that run: https://ci.adoptium.net/job/Grinder/14202/testReport/java_beans_XMLEncoder_Test4822050/java/Test4822050/ although the stderr output reported STATUS:Passed. The console log showed 20:34:02 java.awt.AWTError: Can't connect to X11 window server using ':0' as the value of the DISPLAY variable. when that occurred (iteration 9/10) but since this is using the original Xvfb startup I believe this is an intermittent glitch and not related to the PR.

UBI9 (X11)

https://ci.adoptium.net/job/Grinder/14202/console:

17:53:50  + which Xvfb
17:53:50  + /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot Xvfb
17:53:50  + alias
17:53:50  + eval declare -f
17:53:50  ++ declare -f
17:53:50  /usr/bin/Xvfb
[Pipeline] wrap
17:53:50  $ Xvfb -displayfd 2 -screen 0 1024x768x24 -fbdir /home/jenkins/workspace/Grinder/.xvfb-14202-..fbdir17001837949309922997
[Pipeline] {
[Pipeline] sh
17:54:29  + grep '[X]vfb'
17:54:29  + ps -f
17:54:29  + awk '{print $9}'
[Pipeline] echo
17:54:29  env.DISPLAY is :0

RHEL10: https://ci.adoptium.net/job/Grinder/14204/

@sxa
Copy link
Member Author

sxa commented Aug 29, 2025

@smlambert if you're ok with this it would be good to have your approval today since I believe Canada is not around on Monday and we're very close to being able to make UBI10 containers live in jenkins.

@sxa sxa requested review from smlambert and llxia August 29, 2025 15:04
@sxa sxa self-assigned this Aug 29, 2025
// TODO: once proper label is added on the machine, NODE_NAME check should be removed.
if (LABEL.contains("sw.os.rhel.10") || "${NODE_NAME}".toLowerCase().contains("rhel10")) {
// Detect if Xvfb is on the machine, and if not use the wayland startup code (Initially for EL10)
if ( sh(script:"which Xvfb 2>&1", returnStatus:true) ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

I would suggest explicitly checking the return code:
if (sh(script: "which Xvfb 2>&1", returnStatus: true) != 0) {

Copy link
Member Author

Choose a reason for hiding this comment

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

My preference would be to leave it as-is for now as it's been fully tested and I want to try and get this live, but I'm happy to change it in in a future PR if you're prefer. Let me know if you're ok with that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Understand whether weston on Wayland can replace Xvfb
2 participants