SV: Error while deploying virtual service using the Jenkins SV Plugin in a Jenkins Master-Slave configuration
search cancel

SV: Error while deploying virtual service using the Jenkins SV Plugin in a Jenkins Master-Slave configuration

book

Article ID: 194245

calendar_today

Updated On:

Products

Service Virtualization

Issue/Introduction

Environment Background:

We have Service Virtualization 10.x installed on an Enterprise RedHat system. We have another set of Enterprise Redhat systems for Jenkins. One is our Jenkins Master installed, and the other is our Jenkins agent (Slave). The Service Virtualization Jenkins Plugin (release 1.0.1) is installed on the Jenkins Master. The mar file we want to deploy is available in GitLab. We cloned the Git project on the Jenkins agent (Slave), but not the Jenkins Master. The mar file is located on the Jenkins Slave in the /opt/jenkins/workspace/... directory. When we try to deploy the virtual service, we are seeing the following error:

Deploying MAR file: /opt/jenkins/workspace/DASG-CONSOLIDATED/DASG-ARCH-AND-DEVOPS/quality-engineering/SV_CICD/Digitial_SecurityProfile.mar To DevTest API located on hostname.domain.com:1505 Deployment of virtual service failed!

ERROR: Status code is 500 Response body from DevTest is: {"id":1003,"message":"A malformed file URI is provided, please check again.","addInfo":"\r\ncom.itko.lisa.invoke.api.exception.BadRequestException: A malformed file URI is provided, please check again.\n\tat com.itko.lisa.invoke.ParamterUtils.getInputStream(ParamterUtils.java:82)\n\tat 

Environment

Release : 10.x

Component : CA Application Test

Cause

 

This error indicates that the SV Jenkins Plugin is unable to locate the mar file. In a Jenkins Master-Slave setup, the Jenkins plugin is always executed for the Jenkins Master. Therefore, the Jenkins Master node must always have visibility to the DevTest Registry. Therefore, you should always first verify the Jenkins Plugin configuration and verify the Master has the Registry. Also, in a Jenkins Master-Slave setup, the file uploading from the Agent (Slave) needs to be treated as a remote upload. The upload logic in the Jenkins Plugin release 1.0.1 has a known defect, which causes the file upload from the remote agent to fail, thus the error.

Resolution

If you are running a Jenkins Master-Slave setup, you need to install the CA Service Virtualization Plugin release 1.0.2. You can do this from the Jenkins Plugin Manager.

Note: Use the Pipeline script to specifically set the Salve node on which the Pipeline should run.