简体   繁体   中英

Concourse CI Windows Worker

I'm trying to setup a Concourse CI environment with a Windows 7 worker.

I have one machine under Ubuntu Server (16.04) hosting my TSA server and one worker (for the support of git resources), and a second one under Windows 7 hosting a worker.

Everything seems to work fine as:

  • I can login into the web ui
  • the fly -t my_concourseci workers command returns :

     name containers platform tags team state version ubuntu 1 linux none none running 1.1 windows7 0 windows none none running 1.1 
  • the fly -t my_concourseci execute -c test.yml command returns:

     executing build 146 initializing running echo Hello World! Hello World! 

    with the following content in test.yml file:

     platform: windows run: path: echo args: [ "Hello World!" ] 

Nevertheless when I add an input to my task:

    platform: windows

    > inputs:
    >  - name: concourse

    run:
      path: echo
      args: [ "Hello World!" ]

I get the following error:

executing build 148
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100 5698k    0 5698k    0     0  1948k      0 --:--:--  0:00:02 --:--:-- 1949k
initializing
failed to stream in to volume
errored

If I look at the windows worker log I got this error that comes up:

{"timestamp":"1500642862.643555164",
"source":"baggageclaim",
"message":"baggageclaim.api.volume-server.stream-in.bad-stream-payload",
"log_level":1,
"data":{"error":"tar extract failed (exit status 2). output: \"\\ngzip: stdin: not in gzip format\\n/usr/bin/tar: Child returned status 1\\n/usr/bin/tar: Error is not recoverable: exiting now\\n\"",
"session":"2.1.8730",
 "volume":"15bf1fc6-0727-4962-6c84-18446e54ab96"}
}

Any ideas about what can cause a not in gzip format error ? Knowing that if I run the exact same task on a linux platform every works fine.

platform: linux

image_resource:
  type: docker-image
  source: {repository: busybox}

inputs:
 - name: concourse


run:
  path: echo
  args: [ "Hello World!" ]
----- STDOUT
executing build 149
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                             Dload  Upload   Total   Spent    Left  Speed
100 5699k    0 5699k    0     0  1917k      0 --:--:--  0:00:02 --:--:-- 1918k
initializing
Pulling busybox@sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4...
sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4: Pulling from library/busybox
9e87eff13613: Pulling fs layer
9e87eff13613: Verifying Checksum
9e87eff13613: Download complete
9e87eff13613: Pull complete
Digest: sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4
Status: Downloaded newer image for busybox@sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4

Successfully pulled busybox@sha256:2605a2c4875ce5eb27a9f7403263190cd1af31e48a2044d400320548356251c4.

running echo Hello World!
succeeded

Thanks.

Launch powershell as Administrator, and run the concourse_worker.exe from there. That worked for me.

I am running a Windows Server 2016 Base on AWS based on this AMI ami-e1876a98

Thanks for your answers, it helps me solve my problem.

I were starting my concourse worker within a MSYS 1.0 environment. The thing is that MSYS contains tar and gunzip binaries within the $PATH . When I started concourse worker inside a Power Shell or cmd.exe without any MSYS unix-like binaries in the $PATH it worked like a charm !

Note: Be sure to have no MSYS binaries in the $PATH Windows environment variable for this to work, especially check that Git-Bash environment tools are not added to your windows $PATH environment variable.

Thanks again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM