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 client: nomad fails to deploy zip archives if they contain sub folders #1028

Closed
justenwalker opened this issue Apr 4, 2016 · 6 comments

Comments

@justenwalker
Copy link
Contributor

Nomad version

Nomad v0.3.1
Nomad v0.3.2-dev ('270da7a60ccbf39eeeadc4064a59ca06bf9ac6fc+CHANGES')

Operating system and Environment details

Windows Server 2012 R2 Datacenter

Issue

When running a zip archive on windows, the nomad client fails to unzip the archive properly and fails to start the task. This seems to be triggered by the archive zip folder having sub-folders. It appears (although the logs don't say anything) that the unzip process fails mid-way through unzipping the archive - as there is an incomplete set of files in the alloc folder.

Reproduction steps

  1. Create a nomad windows agent client and connect it to your server
  2. Upload a source archive containing your executable and some sub folders
  3. Create a job containing the source archive - target windows host - use the raw_exec driver
  4. Job is scheduled on the node and you can see logs in the nomad client stdout file
  5. Job fails - and is continuously restarted
  6. Alloc folder may contain some of the files in the zip - but not all of them
@dkong
Copy link
Contributor

dkong commented Apr 4, 2016

This might be the same bug as hashicorp/go-getter#11. It's been fixed in go-getter library but nomad's vendored go-getter is not yet up to date.

@dadgar
Copy link
Contributor

dadgar commented Apr 7, 2016

Just vendored the update in 663b04f. Could you please try on master again?

@justenwalker
Copy link
Contributor Author

@dadgar, This broke the build for me when i do make bin (also TravisCI) - looks like FileGetter interface may have changed in the newer go-getter library - or a bad vendor pull.

-->   windows/amd64: github.com/hashicorp/nomad
-->     linux/amd64: github.com/hashicorp/nomad
-->       linux/386: github.com/hashicorp/nomad
-->    darwin/amd64: github.com/hashicorp/nomad
-->     windows/386: github.com/hashicorp/nomad
5 errors occurred:
--> windows/amd64 error: exit status 2
Stderr: # github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-getter
vendor/github.com/hashicorp/go-getter/get.go:52: cannot use new(FileGetter) (type *FileGetter) as type Getter in map value:
        *FileGetter does not implement Getter (missing Get method)
vendor/github.com/hashicorp/go-getter/get_git.go:86: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
vendor/github.com/hashicorp/go-getter/get_hg.go:93: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
--> linux/amd64 error: exit status 2
Stderr: # github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-getter
vendor/github.com/hashicorp/go-getter/get.go:52: cannot use new(FileGetter) (type *FileGetter) as type Getter in map value:
        *FileGetter does not implement Getter (missing Get method)
vendor/github.com/hashicorp/go-getter/get_git.go:86: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
vendor/github.com/hashicorp/go-getter/get_hg.go:93: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
--> linux/386 error: exit status 2
Stderr: # github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-getter
vendor/github.com/hashicorp/go-getter/get.go:52: cannot use new(FileGetter) (type *FileGetter) as type Getter in map value:
        *FileGetter does not implement Getter (missing Get method)
vendor/github.com/hashicorp/go-getter/get_git.go:86: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
vendor/github.com/hashicorp/go-getter/get_hg.go:93: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
--> darwin/amd64 error: exit status 2
Stderr: # net
could not determine kind of name for C.AI_MASK
# github.com/hashicorp/nomad/vendor/github.com/shirou/gopsutil/cpu
vendor/github.com/shirou/gopsutil/cpu/cpu_darwin_cgo.go:10:28: fatal error: mach/mach_init.h: No such file or directory
 #include <mach/mach_init.h>
                            ^
compilation terminated.
--> windows/386 error: exit status 2
Stderr: # github.com/hashicorp/nomad/vendor/github.com/hashicorp/go-getter
vendor/github.com/hashicorp/go-getter/get.go:52: cannot use new(FileGetter) (type *FileGetter) as type Getter in map value:
        *FileGetter does not implement Getter (missing Get method)
vendor/github.com/hashicorp/go-getter/get_git.go:86: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
vendor/github.com/hashicorp/go-getter/get_hg.go:93: fg.GetFile undefined (type *FileGetter has no field or method GetFile)
make: *** [bin] Error 1

@justenwalker
Copy link
Contributor Author

In Nomad v0.3.2-dev ('e3511b6297bf181cb41336519b451b6feb8c1d62') the build error is fixed.
I'm also able to deploy archives with sub folders!

@dadgar
Copy link
Contributor

dadgar commented Apr 8, 2016

Nice! I am going to close this issue then! Sorry about the build problem!

@dadgar dadgar closed this as completed Apr 8, 2016
@github-actions
Copy link

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 24, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants