aerokube / moon

Browser automation solution for Kubernetes and Openshift supporting Selenium, Playwright, Puppeteer and Cypress
http://aerokube.com/moon/latest
Apache License 2.0
224 stars 19 forks source link

aerokube/defender:latest Crashes #396

Closed huang-jy closed 1 year ago

huang-jy commented 1 year ago

When installing moon and not overridding the defender image, (e.g. as shown in https://github.com/aerokube/charts/blob/b061bf62c4bd9a8db72df78c47ce6510aa9999dc/moon/values.yaml#L300C1-L300C1) , the image aerokube/defender:latest is used. This does not start up correctly and crashes repeatedly.

When getting the log for the failing container, all I see is:

$ kubectl logs -n moon chrome-113-0-5a0db94f-14bf-4549-8c17-6785ccfefb9e -c defender
flag provided but not defined: -proxy-url
Usage of /defender:
  -driver-startup-timeout duration
        driver startup timeout in time.Duration format (default 5m0s)
  -grace-period duration
        graceful shutdown period (default 30s)
  -listen string
        address to bind (default ":4545")
  -moon-url string
        moon service url (default "http://moon.moon:4444/wd/hub")
  -proxy-path string
        proxy path (default "/")
  -proxy-port string
        proxy port (default "4444")
  -quota string
        quota name
  -retry-count int
        number of retries to delete session (default 5)
  -retry-delay duration
        retry delay (default 30s)
  -session-delete-timeout duration
        session delete timeout in time.Duration format (default 30s)
  -session-timeout duration
        session timeout in time.Duration format (default 1m0s)
  -version
        Show version and exit

Overridding the block using the commented block, does work, since it's specifying a specific tag, that isn't latest

vania-pooh commented 1 year ago

@huang-jy what is your Moon version? Are you upgrading one Moon version to another? In fact defender selection logic is very simple - latest tag is selected for unstable Moon versions (e.g. aerokube/moon:latest). Otherwise defender container image tag should correspond to aerokube/moon image tag.

huang-jy commented 1 year ago

Chart version: moon-1.1.30 App Version: 1.9.10 (Helm install)

I upgraded from 1.1.29/1.9.9 to 1.1.30/1.9.10 this morning. Could this have been the issue?

vania-pooh commented 1 year ago

@huang-jy that's weird. The problem is that aerokube/defender:latest is from Moon 2.x, this is why it crashed. But in stable Moon versions except you explicitly override tag in values.yaml, Moon should never use images with latest tag. If you are sure that you did not override tag, then we will check on our side.

huang-jy commented 1 year ago

100%, I didn't override the defender tag and it pulled in latest which broke. Once I did the override as suggested by the values.yaml comment, it worked.

vania-pooh commented 1 year ago

@huang-jy will then check on our side.

vania-pooh commented 1 year ago

@huang-jy I can confirm this is a bug on our side. We will prepare a new release soon.

vania-pooh commented 1 year ago

@huang-jy this was released as https://github.com/aerokube/moon/releases/tag/1.9.11.

huang-jy commented 1 year ago

can confirm 1.9.11 works. I removed the override and re-ran my tests. The chart pulled aerokube:defender:1.9.11

image