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

CDS API start with non initialized artiffact directory segfaults #7199

Open
gsalingu opened this issue Oct 30, 2024 · 0 comments
Open

CDS API start with non initialized artiffact directory segfaults #7199

gsalingu opened this issue Oct 30, 2024 · 0 comments

Comments

@gsalingu
Copy link
Contributor

I am facing this issue while booting a new instance of cds

gsalingu@cds:~/cds$ ./cds-engine start api --config conf.toml
Reading configuration file @ conf.toml
Starting service api
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0xe3c96d]

goroutine 1 [running]:
github.com/ovh/cds/sdk.DirectoryExists({0xc000ed6400?, 0x15?})
	/home/gsalingu/github/ovh/cds/sdk/common.go:199 +0x6d
github.com/ovh/cds/engine/api.(*API).CheckConfiguration(0x0?, {0x3bc1dc0?, 0xc0012adb08?})
	/home/gsalingu/github/ovh/cds/engine/api/api.go:408 +0x345
github.com/ovh/cds/engine/api.(*API).ApplyConfiguration(0xc0012b2008, {0x3bc1dc0, 0xc0012adb08})
	/home/gsalingu/github/ovh/cds/engine/api/api.go:349 +0x3a
main.init.func11(0xc000395a00?, {0xc000c61200?, 0x4?, 0x3c80366?})
	/home/gsalingu/github/ovh/cds/engine/cmd_start.go:279 +0x3be2
github.com/spf13/cobra.(*Command).execute(0x653a920, {0xc000c61170, 0x3, 0x3})
	/home/gsalingu/go/pkg/mod/github.com/spf13/[email protected]/command.go:987 +0xa91
github.com/spf13/cobra.(*Command).ExecuteC(0x653ac00)
	/home/gsalingu/go/pkg/mod/github.com/spf13/[email protected]/command.go:1115 +0x3ff
github.com/spf13/cobra.(*Command).Execute(...)
	/home/gsalingu/go/pkg/mod/github.com/spf13/[email protected]/command.go:1039
main.main()
	/home/gsalingu/github/ovh/cds/engine/main.go:26 +0x1a

Here is the associated conf

        [cdn.storageUnits.storages.local.local]
          path = "/var/lib/cds-engine/cdn"

The directory does not exist but my current user does not have permission to create it

gsalingu@cds:~/github/ovh/cds$ ls -lai /var/lib/cds-engine/cdn
ls: cannot access '/var/lib/cds-engine/cdn': Permission denied

The binary should exit and prompt an intelligible error message

A PR to address this will be following this issue's creation

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

No branches or pull requests

1 participant