Skip to content
This repository has been archived by the owner on Oct 7, 2021. It is now read-only.

server panic when subdirectory exists in testlet directory #149

Open
namachieli opened this issue May 1, 2017 · 0 comments
Open

server panic when subdirectory exists in testlet directory #149

namachieli opened this issue May 1, 2017 · 0 comments

Comments

@namachieli
Copy link

Looks like the discovery logic doesn't account for subdirectories. todd-server is trying to generate a hash for them. If this is a conscious decision to not allow subdirectories, it might not be a bad idea to update the docs, or add logic to ignore non-executables in /opt/todd/server/assets/testlets/

Easy to workaround, just don't have subdirs. :)

ERRO[0000] Error generating hash for file /opt/todd/server/assets/testlets/arm 
panic: Error generating hash for file /opt/todd/server/assets/testlets/arm

goroutine 18 [running]:
panic(0xa1f5a0, 0xc42000d7e0)
        /usr/local/go/src/runtime/panic.go:500 +0x1a1
github.com/toddproject/todd/hostresources.GetFileSHA256(0xc4201ac4b0, 0x24, 0x2, 0xc4201ac4b0)
        /home/toddserver/work/src/github.com/toddproject/todd/hostresources/crypto.go:25 +0x2ab
main.hashFiles(0xc4200c35a0, 0x20, 0x2, 0xc4200c35a0, 0x20)
        /home/toddserver/work/src/github.com/toddproject/todd/cmd/todd-server/assets.go:158 +0x197
main.(*assetConfig).update(0xc42013ec00)
        /home/toddserver/work/src/github.com/toddproject/todd/cmd/todd-server/assets.go:89 +0x3aa
main.newAssetConfig.func1(0xc42013ec00)
        /home/toddserver/work/src/github.com/toddproject/todd/cmd/todd-server/assets.go:53 +0x2b
created by main.newAssetConfig
        /home/toddserver/work/src/github.com/toddproject/todd/cmd/todd-server/assets.go:56 +0x12c

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant