cortex: fails to run without passing a config file

Bug #1903860 reported by Lucas Kanashiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu Docker Images
Fix Released
High
Sergio Durigan Junior

Bug Description

The squeakywheel/cortex:edge image seems to not work out-of-the-box (without passing a config file):

$ docker run squeakywheel/cortex:edge
Unable to find image 'squeakywheel/cortex:edge' locally
edge: Pulling from squeakywheel/cortex
47dde53750b4: Already exists
0c2689e3f920: Already exists
cc9d18e90faa: Already exists
b028d7b99220: Pull complete
bbbcbdc649f5: Pull complete
fb867d662114: Pull complete
0a37092cb156: Pull complete
Digest: sha256:a27afd67aa8c158271b9da452951900dbeadf5abaa6a5f97fd67da2a07eab826
Status: Downloaded newer image for squeakywheel/cortex:edge
level=info ts=2020-11-11T13:16:39.278531612Z caller=main.go:178 msg="Starting Cortex" version="(version=1.4.0, branch=oci-image, revision=bdb2a5f2)"
level=info ts=2020-11-11T13:16:39.279417269Z caller=modules.go:513 msg="RulerStorage is not configured in single binary mode and will not be started."
level=info ts=2020-11-11T13:16:39.280154716Z caller=server.go:225 http=[::]:80 grpc=[::]:9095 msg="server listening on addresses"
level=error ts=2020-11-11T13:16:39.286918286Z caller=log.go:149 msg="error running cortex" err="schema config file needs to be set\nerror initialising module: store\ngithub.com/cortexproject/cortex/pkg/util/modules.(*Manager).InitModuleServices\n\t/src/cortex/pkg/util/modules/modules.go:89\ngithub.com/cortexproject/cortex/pkg/cortex.(*Cortex).Run\n\t/src/cortex/pkg/cortex/cortex.go:316\nmain.main\n\t/src/cortex/cmd/cortex/main.go:180\nruntime.main\n\t/usr/lib/go-1.14/src/runtime/proc.go:203\nruntime.goexit\n\t/usr/lib/go-1.14/src/runtime/asm_amd64.s:1373"

To make it work I need to run the following command:

$ docker run -v $(PWD)/cortex.yaml:/etc/cortex/cortex.yaml squeakywheel/cortex:edge "--config.file=/etc/cortex/cortex.yaml"

In this case I used this config file:

https://github.com/canonical/server-test-scripts/blob/master/lma-integration/config/cortex.yaml

I believe we should have a better default config for this. Even if the default config does not represent a realistic scenario, we should not let our image fail to run when no config file is passed.

Tags: usability
Changed in ubuntu-server-oci:
status: New → Triaged
importance: Undecided → High
tags: added: usability
Revision history for this message
Sergio Durigan Junior (sergiodj) wrote :

Fixed in b898cbacdc603bcf46d065b494a86542d127f673.

Changed in ubuntu-server-oci:
status: Triaged → In Progress
assignee: nobody → Sergio Durigan Junior (sergiodj)
status: In Progress → Fix Committed
Changed in ubuntu-docker-images:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.