openshift / console-plugin-template

Minimal template for writing OpenShift console plugins
Apache License 2.0
41 stars 54 forks source link

`yarn run start-console` doesn't work with docker #60

Open gaohoward opened 9 months ago

gaohoward commented 9 months ago

When I start the console using podman the plugin are loaded and works. However if I force it to use docker the console gets 'no such host' error. The following shows the output of yarn run start-console:

$ yarn run start-console
yarn run v1.22.19
$ ./start-console.sh
Starting local OpenShift console...
API Server: https://api.crc.testing:6443
Console Image: quay.io/openshift/origin-console:latest
Console URL: http://localhost:9000
============docker
latest: Pulling from openshift/origin-console
Digest: sha256:bcdfadf39f45ea2f35bdff6e6db92b4ea2bd9237a67fc4d96be08b6855641255
Status: Image is up to date for quay.io/openshift/origin-console:latest
I0219 12:02:57.784894       1 main.go:204] The following console plugins are enabled:
I0219 12:02:57.784908       1 main.go:206]  - console-plugin-template
W0219 12:02:57.784913       1 authoptions.go:85] Flag inactivity-timeout is set to less then 300 seconds and will be ignored!
W0219 12:02:57.784937       1 authoptions.go:205] running with AUTHENTICATION DISABLED!
I0219 12:02:57.785915       1 main.go:625] Binding to 0.0.0.0:9000...
I0219 12:02:57.785931       1 main.go:630] not using TLS
I0219 12:03:00.786050       1 metrics.go:138] serverconfig.Metrics: Update ConsolePlugin metrics...
E0219 12:03:00.841627       1 metrics.go:143] serverconfig.Metrics: Failed to get all installed ConsolePlugins: Get "https://api.crc.testing:6443/apis/console.openshift.io/v1/consoleplugins": dial tcp: lookup api.crc.testing on 10.72.17.5:53: no such host
I0219 12:03:00.841656       1 metrics.go:148] serverconfig.Metrics: Update ConsolePlugin metrics: &map[demo:map[notfound:1]] (took 55.585986ms)
2024/02/19 12:03:02 Failed to dial backend: 'Internal Server Error'
I0219 12:03:02.786252       1 metrics.go:88] usage.Metrics: Count console users...
E0219 12:03:02.805072       1 metrics.go:105] usage.Metrics: Failed to get user-settings RoleBindings: Get "https://api.crc.testing:6443/apis/rbac.authorization.k8s.io/v1/namespaces/openshift-console-user-settings/rolebindings": dial tcp: lookup api.crc.testing on 10.72.17.5:53: no such host
E0219 12:03:03.406491       1 handlers.go:164] failed to send GET request for "console-plugin-template" plugin: Get "http://host.docker.internal:9001/plugin-manifest.json": dial tcp: lookup host.docker.internal on 10.72.17.5:53: no such host
^C

Looks like it has problems accessing api.crc.testing and host.docker.internal from inside the container?

openshift-bot commented 6 months ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

spadgett commented 6 months ago

/remove-lifecycle stale

@gaohoward What OS are you running? Is it Linux? It looks like host.docker.internal only works on Windows and Mac.

I haven't tried to run the plugin template with OpenShift Local. We'll need to investigate.

cc @jhadvig

openshift-bot commented 3 months ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale

spadgett commented 3 months ago

/remove-lifecycle stale

/assign @jhadvig

openshift-bot commented 1 week ago

Issues go stale after 90d of inactivity.

Mark the issue as fresh by commenting /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. Exclude this issue from closing by commenting /lifecycle frozen.

If this issue is safe to close now please do so with /close.

/lifecycle stale