Skip to content
This repository has been archived by the owner on Aug 29, 2023. It is now read-only.

'failed to inspect container error' while trying to ssh into containers using ignite #228

Closed
ghost opened this issue Nov 8, 2019 · 2 comments · Fixed by #247
Closed

Comments

@ghost
Copy link

ghost commented Nov 8, 2019

So, while trying to set up the source code and try out footloose, I came across an error while trying to ssh into the container machine while using ignite as the back end.

The command,
sudo ./footloose ssh node0
would result in,
FATA[0000] hostport: failed to inspect container: [ Error: No such object: cluster-node0]: exit status 1
with this config file,

cluster:
  name: cluster
  privateKey: cluster-key
machines:
- count: 1
  spec:
    backend: ignite
    image: weaveworks/ignite-ubuntu
    name: node%d
    portMappings:
    - containerPort: 22
      hostPort: 2222

So looking through the source code, I found that to get the host port, a call to docker.Inspect() was called, and this was the function that was returning the error.

As a quick test I just hard coded the host port that the function was trying to retrieve, and I was able to successfully ssh in to the VM.

Although I am new to this code base, I think I can come up with a way to fix this problem generally. I just created this issue in case someone already has a quick fix, and to inform others in case they are having the same issue I was.

Tomorrow I should be able to fix this issue, and then make a PR. I hope this is the right place to post this information.

@rugwirobaker
Copy link

Same thing happened to me. Could you help me with a work around?

@ghost
Copy link
Author

ghost commented Jan 25, 2020

Yeah sure I can try.

What ended up working for me was checking which backend was being used, then executing the correct function calls according.

This commit here solved the issue for me.

There is only one file changed, and only one added function.

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

Successfully merging a pull request may close this issue.

1 participant