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

Can't create a grafana container #3988

Closed
nvpnathan opened this issue Feb 17, 2017 · 5 comments
Closed

Can't create a grafana container #3988

nvpnathan opened this issue Feb 17, 2017 · 5 comments
Labels
area/storage Storage-related functionality kind/defect Behavior that is inconsistent with what's intended priority/p0 resolution/duplicate Another issue exists for this issue

Comments

@nvpnathan
Copy link

nvpnathan commented Feb 17, 2017

#For bug reports, please include the information below:

VIC version:
vic-machine-darwin version v0.8.0-7315-c8ac999

Deployment details:

What was the vic-machine create command used to deploy the VCH?
./vic-machine-darwin create --target 192.168.110.10 --user 'Administrator@corp.local' --password 'VMware1!' --bridge-network vic-net --image-store vLab-NFS-DS-SSD --volume-store vLab-NFS-DS-SSD:default --public-network vic-ext --name vlab-vch-01 --no-tls --force

Steps to reproduce:
Create the VCH with the command above.
docker run -i -p 3000:3000 -e "GF_SERVER_ROOT_URL=http://grafana.corp.local" -e "GF_SECURITY_ADMIN_PASSWORD=admin" grafana/grafana

Actual behavior:
t=2017-02-17T16:51:28+0000 lvl=crit msg="Failed to parse /etc/grafana/grafana.ini, open /etc/grafana/grafana.ini: no such file or directory%!(EXTRA []interface {}=[])"

Expected behavior:
The container should be powered on successfully.

Additional details as necessary:
You can also easily reproduce by running
docker run -i -p 3000:3000 grafana/grafana

@hmahmood hmahmood added priority/p0 area/storage Storage-related functionality kind/defect Behavior that is inconsistent with what's intended labels Feb 17, 2017
@chengwang86
Copy link
Contributor

chengwang86 commented Feb 17, 2017

On regular docker, if you do "docker inspect", you will find this

"Mounts": [
            {
                "Name": "4dd6704bf636c31cc792cc79d0d8931a9324db30acfc1a23d10abea01f4ee679",
                "Source": "/var/lib/docker/volumes/4dd6704bf636c31cc792cc79d0d8931a9324db30acfc1a23d10abea01f4ee679/_data",
                "Destination": "/etc/grafana",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Name": "dbd397f76fb9e119c0e1e99cdb1af807d9d5596346d46f451a9f1e1b9c671302",
                "Source": "/var/lib/docker/volumes/dbd397f76fb9e119c0e1e99cdb1af807d9d5596346d46f451a9f1e1b9c671302/_data",
                "Destination": "/var/lib/grafana",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            },
            {
                "Name": "5ce36843120eef6ae055e8bbe0a30d5f739a2ec6cf440e1ec63b833e943cac5c",
                "Source": "/var/lib/docker/volumes/5ce36843120eef6ae055e8bbe0a30d5f739a2ec6cf440e1ec63b833e943cac5c/_data",
                "Destination": "/var/log/grafana",
                "Driver": "local",
                "Mode": "",
                "RW": true,
                "Propagation": ""
            }
        ],

However, on vic, the "name", "source" and "destination" are all empty.

@matthewavery
Copy link
Contributor

Hmm that is odd, I will take a look. I suspect that part of this is the presence of volumes in the grafana image metadata. We might have a slight bug there. I will inspect this more when I have some free time to triage this issue. I will also include this as a good integration test in the future, thanks!

@anchal-agrawal
Copy link
Contributor

anchal-agrawal commented Feb 18, 2017

What's happening here is similar to #3909 (comment).

The file /etc/grafana/grafana.ini isn't found because it's put in place while installing grafana at this step in the Dockerfile (http://docs.grafana.org/installation/configuration/#config-file-locations). We don't copy underlying files while mounting volumes from Dockerfiles (#3482) and the grafana image mounts a volume at /etc/grafana, so /etc/grafana/grafana.ini is not there when this step in the grafana image's run script is executed.

I propose that we close this issue and tackle #3482.

@anchal-agrawal anchal-agrawal added the resolution/duplicate Another issue exists for this issue label Feb 18, 2017
@anchal-agrawal
Copy link
Contributor

@nvpnathan One workaround is to build a custom grafana image by removing the /etc/grafana volume from its Dockerfile. It is inconvenient, though.

I'm closing this as we're tracking creating empty volumes in #3482.

@corrieb
Copy link
Contributor

corrieb commented May 17, 2017

Confirmed that this issue is fixed in build 10656 and beyond

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/storage Storage-related functionality kind/defect Behavior that is inconsistent with what's intended priority/p0 resolution/duplicate Another issue exists for this issue
Projects
None yet
Development

No branches or pull requests

6 participants