KostyaSha / yet-another-docker-plugin

Jenkins Yet Another Docker Plugin
https://plugins.jenkins.io/yet-another-docker-plugin
MIT License
83 stars 48 forks source link

Will be there support for random load in case of DockerCloudRetentionStrategy #281

Open 33man opened 4 years ago

33man commented 4 years ago

https://github.com/KostyaSha/yet-another-docker-plugin/blob/e559f3d8fd78089e96f58e64d633a6e8885289cf/yet-another-docker-plugin/src/main/java/com/github/kostyasha/yad/DockerProvisioningStrategy.java#L148

Currently i have N slaves with same templates to spread the load. If i use DockerOnce retention strategy with RandomLeastLoadedDockerCloudOrder then the load is randomly spread accross two slaves.

But using DockerCloudRetentionStrategy (to keep slave alive for n minutes in order avoiding provisioning again), the RandomLeastLoadedDockerCloudOrder strategy is not used.

All the jobs get scheduled on slave1 until this one get full.

Can we add this DockerCloudRetentionStrategy to the list of supported randomleastloadedcloudorder ?

KostyaSha commented 4 years ago

You can try... If it just uncomment then you can build .hpi and upload into your jenkins.