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

Bootstrap may failed with a nil pointer error if download of a component fails #634

Closed
loicalbertin opened this issue Apr 20, 2020 · 0 comments · Fixed by #635
Closed

Bootstrap may failed with a nil pointer error if download of a component fails #634

loicalbertin opened this issue Apr 20, 2020 · 0 comments · Fixed by #635
Assignees
Labels
bug Something isn't working
Milestone

Comments

@loicalbertin
Copy link
Member

loicalbertin commented Apr 20, 2020

Bug Report

Description

Expected behavior

In case of download error a clear error message should be returned.
Like bellow.

Starting a local Yorc server to bootstrap a remote Yorc server...
...local Yorc server started

Downloading https://fastconnect.org/maven/content/repositories/opensource/alien4cloud/alien4cloud-dist/2.2.0/alien4cloud-dist-2.2.0-dist.tar.gz to work/alien4cloud-dist.tar.gz
Bootstrap error Get https://fastconnect.org/maven/content/repositories/opensource/alien4cloud/alien4cloud-dist/2.2.0/alien4cloud-dist-2.2.0-dist.tar.gz: x509: certificate has expired or is not yet valid

Actual behavior

Starting Consul (logs: work/consul.log)..... Consul started!
Starting a local Yorc server to bootstrap a remote Yorc server...
...local Yorc server started
Downloading https://fastconnect.org/maven/content/repositories/opensource/alien4cloud/alien4cloud-dist/2.2.0/alien4cloud-dist-2.2.0-dist.tar.gz to work/alien4cloud-dist.tar.gz

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x50 pc=0x14dda2a]

goroutine 1 [running]:
github.com/ystia/yorc/v4/commands/bootstrap.download(0xc00001e240, 0x83, 0x18c80a8, 0x17, 0x18ac9cf, 0x4, 0x1, 0x0, 0x0, 0x0, ...)
	/home/jenkins/agent/workspace/yorc-ci-oss-it-light_develop/commands/bootstrap/setup.go:492 +0x2fa
github.com/ystia/yorc/v4/commands/bootstrap.deployTopology(0x18ac9cf, 0x4, 0xc0002d2a60, 0x20, 0x0, 0x0)
	/home/jenkins/agent/workspace/yorc-ci-oss-it-light_develop/commands/bootstrap/deployment.go:37 +0xac
github.com/ystia/yorc/v4/commands/bootstrap.bootstrap(0xc0004dbd28, 0x5679e4)
	/home/jenkins/agent/workspace/yorc-ci-oss-it-light_develop/commands/bootstrap/bootstrap.go:183 +0x3e3
github.com/ystia/yorc/v4/commands/bootstrap.init.0.func1(0xc000394840, 0xc0002ebb20, 0x0, 0x2)
	/home/jenkins/agent/workspace/yorc-ci-oss-it-light_develop/commands/bootstrap/bootstrap.go:51 +0x26
github.com/spf13/cobra.(*Command).execute(0xc000394840, 0xc0002ebac0, 0x2, 0x2, 0xc000394840, 0xc0002ebac0)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:844 +0x2aa
github.com/spf13/cobra.(*Command).ExecuteC(0x26b89c0, 0xc0004dbf20, 0x43c4ea, 0x264da80)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:945 +0x317
github.com/spf13/cobra.(*Command).Execute(...)
	/go/pkg/mod/github.com/spf13/[email protected]/command.go:885
main.main()
	/home/jenkins/agent/workspace/yorc-ci-oss-it-light_develop/main.go:29 +0x31
script returned exit code 2

Steps to reproduce the issue

  1. Start a bootstrap
  2. Simulate a network error when downloading
@loicalbertin loicalbertin added the bug Something isn't working label Apr 20, 2020
@loicalbertin loicalbertin self-assigned this Apr 20, 2020
@loicalbertin loicalbertin added this to the 20.05 milestone Apr 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant