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

Windows JNLP slave failing with error #570

Open
emmanuelguerin opened this issue Feb 27, 2017 · 3 comments
Open

Windows JNLP slave failing with error #570

emmanuelguerin opened this issue Feb 27, 2017 · 3 comments

Comments

@emmanuelguerin
Copy link
Contributor

Cookbook version

jenkins 4.2.1

Chef-client version

12.10.24

Platform Details

Windows Server 2012R2

Scenario:

When creating a new JNLP slave, an Chef::Exceptions::EnclosingDirectoryDoesNotExist is raised

Steps to Reproduce:

Just put a resource like this in your cookbook:

jenkins_windows_slave node['hostname'].downcase do
  remote_fs 'D:\Bld'
  user 'azure'
  password 'P2ssw0rd'
  executors 1
  usage_mode 'exclusive'
end

Expected Result:

A new slave running and registered with the master

Actual Result:

================================================================================
Error executing action `create` on resource 'jenkins_windows_slave[vm]'
================================================================================

Chef::Exceptions::EnclosingDirectoryDoesNotExist
------------------------------------------------
remote_file[d:\Bld/jenkins-slave.exe] (dynamically defined) had an error: Chef::Exceptions::EnclosingDirectoryDoesNotExist: Parent directory d:\Bld does not exist.
@iennae
Copy link
Contributor

iennae commented Feb 28, 2017

@emmanuelguerin Does d: exist on your node? Thanks for this added information.

@emmanuelguerin
Copy link
Contributor Author

@iennae Yes, the recipe worked ok with version 2.4.1.

IMHO, the problem comes from this modification 52176e7.

As a result of replacing super with do_create in the action :create of slave_windows, the pieces of code in slave_jnlp are skipped.
Those include the creation of the parent directory for the slave.

emmanuelguerin added a commit to TalentSoft/jenkins that referenced this issue Mar 1, 2017
Since action DSL is now used in the slave providers,
we can’t rely on inheritance anymore.
emmanuelguerin added a commit to TalentSoft/jenkins that referenced this issue Mar 1, 2017
Since action DSL is now used in the slave providers,
we can’t rely on inheritance anymore.
emmanuelguerin added a commit to TalentSoft/jenkins that referenced this issue Mar 1, 2017
Since action DSL is now used in the slave providers,
we can’t rely on inheritance anymore.

Signed-off-by: Emmanuel Guerin <dev@emmanuelguerin.fr>
@emmanuelguerin
Copy link
Contributor Author

Pinging on this. My pull request was rejected because of a pending refactoring. Any news?

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

No branches or pull requests

4 participants