Skip to content

[BUG] Error when connecting to provider.. for intent brokering when running chariott in a container #218

@ladatz

Description

@ladatz

Expected Behavior

Intent brokering when running Chariott in a container should work

Current Behavior

Trying to call an intent on (i.e. discover) returns an error:
ERROR:
Code: Unknown
Message: Failed to connect to provider: Error when connecting to provider..

Steps to Reproduce

  1. Run Chariott with intent brokering in a container:
    podman build -t chariott:latest -f Dockerfile
    podman run -p 4243:4243 chariott:latest
  2. Start the simple-provider in another terminal window (cargo run -p simple-provider)
  3. Try to discover the provider in a grpcurl command in another terminal window (
    grpcurl -import-path {path}/chariott/proto -proto chariott/runtime/v1/runtime.proto -plaintext -d @ 0.0.0.0:4243 chariott.runtime.v1.ChariottService/Fulfill <<EOF
    {
    "namespace": "sdv.simple.provider",
    "intent": {
    "discover": {}
    }
    }
    EOF

The result is:

ERROR:
Code: Unknown
Message: Failed to connect to provider: Error when connecting to provider..

Context (Environment)

amd64 Ubuntu 20.04 WSL2

Additional Information

I suspect this is related to changes in container runtimes in the past year or so that require using domain names instead of 0.0.0.0 in some circumstances but needs more investigation. Discovered while testing #217 , but confirmed the issue was there before that PR.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions