Skip to content

Add support for disconnectedOnStartup node property with launch prevention#2812

Open
somiljain2006 wants to merge 5 commits intojenkinsci:masterfrom
somiljain2006:Node-offline-state-management
Open

Add support for disconnectedOnStartup node property with launch prevention#2812
somiljain2006 wants to merge 5 commits intojenkinsci:masterfrom
somiljain2006:Node-offline-state-management

Conversation

@somiljain2006
Copy link
Copy Markdown
Contributor

@somiljain2006 somiljain2006 commented Mar 30, 2026

Fixes #1793

Implement the disconnectedOnStartup node property to enforce the offline state and block agent launch

  • Add DisconnectedOnStartupProperty with JCasC support
  • Mark nodes offline on startup with a custom JCasCOfflineCause
  • Prevent agent launch using ComputerListener (preLaunch)
  • Ensure nodes remain online when the property is disabled or not defined
  • Add tests to verify behavior for enabled, disabled, and default cases

Verified via JenkinsRule tests and manual testing (SSH launcher).

Your checklist for this pull request

🚨 Please review the guidelines for contributing to this repository.

  • Make sure you are requesting to pull a topic/feature/bugfix branch (right side) and not your master branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or in Jenkins JIRA
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Did you provide a test-case? That demonstrates a feature that works or fixes the issue.

@somiljain2006 somiljain2006 requested a review from a team as a code owner March 30, 2026 19:58
@somiljain2006 somiljain2006 marked this pull request as draft March 31, 2026 04:00
@somiljain2006 somiljain2006 marked this pull request as ready for review March 31, 2026 09:27
@somiljain2006
Copy link
Copy Markdown
Contributor Author

@timja Can you review this pr?

@timja timja requested a review from jetersen March 31, 2026 17:33
@timja
Copy link
Copy Markdown
Member

timja commented Mar 31, 2026

not sure on this, we try minimise this sort of thing. Since its core though it might be needed.

@jetersen any thoughts?

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.

Add ability to mark nodes as offline/disconnected.

2 participants