Skip to content

Cloud Statistics cannot track Nodes provisioned by FastNodeProvisionerStrategy #1206

Description

@datGryphon

Jenkins and plugins versions report

Environment
Jenkins: 2.504.3
OS: Mac OS X - 15.7.4
Java: 21.0.10 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)
---
antisamy-markup-formatter:173.v680e3a_b_69ff3
apache-httpcomponents-client-4-api:4.5.14-269.vfa_2321039a_83
apache-httpcomponents-client-5-api:5.6-183.ve5a_8a_b_e71e59
asm-api:9.9.1-189.vb_5ef2964da_91
authentication-tokens:1.144.v5ff4a_5ec5c33
bootstrap5-api:5.3.8-890.v1c5cf4fa_178e
bouncycastle-api:2.30.1.82-277.v70ca_0b_877184
branch-api:2.1268.v044a_87612da_8
caffeine-api:3.2.3-194.v31a_b_f7a_b_5a_81
cloud-stats:377.vd8a_6c953e98e
cloudbees-folder:6.1053.vd62fb_b_f7367b_
commons-compress-api:1.28.0-2
commons-lang3-api:3.20.0-109.ve43756e2d2b_4
commons-text-api:1.15.0-210.v7480a_da_70b_9e
configuration-as-code:2031.veb_a_fdda_b_3ffd
credentials:1480.v2246fd131e83
credentials-binding:702.vfe613e537e88
display-url-api:2.217.va_6b_de84cc74b_
docker-commons:457.v0f62a_94f11a_3
docker-java-api:3.7.0-133.v93b_8fb_c17a_77
docker-plugin:999999-SNAPSHOT (private-19dbdcf8-calebwastler)
durable-task:651.v1f5e074fc83f
eddsa-api:0.3.0.1-29.v67e9a_1c969b_b_
font-awesome-api:7.0.1-859.v128d3a_efb_6e5
gson-api:2.13.2-173.va_a_092315913c
instance-identity:203.v15e81a_1b_7a_38
ionicons-api:94.vcc3065403257
jackson2-api:2.20.1-423.v13951f6b_6532
jakarta-activation-api:2.1.4-1
jakarta-mail-api:2.1.5-1
jakarta-xml-bind-api:4.0.6-12.vb_1833c1231d3
javax-activation-api:1.2.0-8
jaxb:2.3.9-143.v5979df3304e6
joda-time-api:2.14.0-177.vd7e9347b_e7d5
json-api:20251224-185.v0cc18490c62c
json-path-api:2.10.0-202.va_9cc16c1e476
mailer:525.v2458b_d8a_1a_71
pipeline-groovy-lib:787.ve2fef0efdca_6
pipeline-input-step:540.v14b_100d754dd
pipeline-model-api:2.2277.v00573e73ddf1
pipeline-model-definition:2.2277.v00573e73ddf1
pipeline-model-extensions:2.2277.v00573e73ddf1
pipeline-stage-step:322.vecffa_99f371c
pipeline-stage-tags-metadata:2.2277.v00573e73ddf1
plain-credentials:199.v9f8e1f741799
plugin-util-api:6.1167.v022176c7e0ca_
prism-api:1.30.0-609.vf0a_df102d9a_f
scm-api:724.v7d839074eb_5c
script-security:1385.v7d2d9ec4d909
snakeyaml-api:2.5-143.v93b_c004f89de
ssh-credentials:361.vb_f6760818e8c
ssh-slaves:3.1096.v0b_cc466e4323
structs:362.va_b_695ef4fdf9
token-macro:477.vd4f0dc3cb_cf1
trilead-api:2.284.v1974ea_324382
variant:70.va_d9f17f859e0
workflow-api:1384.vdc05a_48f535f
workflow-basic-steps:1098.v808b_fd7f8cf4
workflow-cps:4254.v0c8e228524ea_
workflow-durable-task-step:1464.v2d3f5c68f84c
workflow-job:1571.vb_423c255d6d9
workflow-multibranch:821.vc3b_4ea_780798
workflow-scm-step:466.va_d69e602552b_
workflow-step-api:710.v3e456cc85233
workflow-support:1010.vb_b_39488a_9841

What Operating System are you using (both controller, and any agents involved in the problem)?

Production controller/agents are running Ubuntu 22.04 LTS x86_64. Reproducible locally on OSX arm.

Reproduction steps

These are the steps to reproduce the error using the project development tools.

  1. Start the Jenkins controller with mvn hpi:run
  2. Docker engine is running locally and accessible on unix:///var/run/docker.sock
  3. Navigate to /jenkins/manage/script and run reproduction.groovy.

Expected Results

No exceptions are raised and both / all nodes created by the script become visible in the cloudstats UI.

Image

Actual Results

The Node(s) provisioned by FastNodeProvisioningStrategy is not visible in the cloudstats UI and there are IllegalStateException errors in the log from when cloudstats tries to track the lifecycle stages for the nodes provisioned by docker-plugin.

Image

Anything else?

There are two recently closed issues that mention No Activity Tracked:

But they are not directly related to this issue. I could not find an issue directly related the error.

The error itself it related to FastNodeProvisionerStrategy#apply not calling CloudProvisioningListener#onStarted. Normally this is handled by the NodeProvisioner's StandardImplStrategy#apply method which calls to NodeProvisioner#fireOnStarted. Without that call, no ProvisioningActivity is created for the planned node's ID and the cascading errors fallout.

Are you interested in contributing a fix?

Yes. I have a patch which I am preparing to submit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Fields

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions