Custom registry: Problem creating workspace

I’ve set up self-hosted on Oracle OCI managed K8s. All pods seem to be up and running. Configured custom private registry fra.ocir.io. Pushed workspace-full to this registry.

But I receive this on workspace creation:

Error: Request createWorkspace failed with message: 13 INTERNAL: cannot resolve workspace image: Error response from daemon: unknown: Tenant with namespace workspace-images not found

Additionally find this in image-builder log:

level=error msg=“Handler for GET /v1.38/distribution/fra.ocir.io/workspace-images:06ce0ce700a46467e0eb40cbc83578243b4cd56fc8ac4429f89e088f5d76e7d0/json returned error: unknown: Tenant with namespace workspace-images not found”

What is this tenant, where is it configured and how is the URL built?

How do I have to provide the image name in .gitpod.yml?
image: fra.ocir.io/oraseemeadesandbox/gitpod/workspace-full:latest

Is it possible to use dockerhub and private registry for different prebuilt/custom base images in parallel?

thanks…

Hi,
Gitpod automatically loads the workspace-full image, there is no need to push it to the registry. But it seems that you have misconfigured the registry in the values.yaml. Which registry are you using?

Best regards,
Wulf

Private Oracle OCI registry in Frankfurt: fra.ocir.io

This is my registry.yaml:

gitpod:
  components:
    imageBuilder:
      registryCerts: []
      registry:
        # name must not end with a "/"
        name: fra.ocir.io
        secretName: image-builder-registry-secret
        path: secrets/registry-auth.json

    # server:
    #   defaultBaseImageRegistryWhitelist:
    #   - ...

    workspace:
      pullSecret:
        secretName: image-builder-registry-secret

  docker-registry:
    enabled: false

gitpod_selfhosted:
  variants:
    customRegistry: true

I have a similar message (Repository Name Unknown), also using a gitpod external docker registry configuration in helm’s values/registry.yaml like this (please note that I am using registry-domain-name below, since as a new user I am not allowed to have more then 2 links in the post - very ridiculous :grinning:):


gitpod:
components:
imageBuilder:
registryCerts: []
registry:
# name must not end with a “/”
name: registry-domain-name/oraseemeadesandbox/gitpod
secretName: image-builder-registry-secret
path: secrets/registry-auth.json

# server:
#   defaultBaseImageRegistryWhitelist:
#   - some.registry.domain.com

workspace:
  pullSecret:
    secretName: image-builder-registry-secret

docker-registry:
enabled: false

gitpod_selfhosted:
variants:
customRegistry: true

Trying to open my gitlab project, I get following error message:


Sorry, something went wrong 😓
Error: Request createWorkspace failed with message: 13 INTERNAL: cannot resolve workspace image: Error response from daemon: name unknown: Repository Name Unknown

The log of the image-builder pod says:

level=error msg=“Handler for GET /v1.38/distribution/lhr.ocir.io/oraseemeadesandbox/gitpod/workspace-images:ab8b098da3d912306fe1359286f5959160ea422800294c4d39962a7fb1fb5986/json returned error: name unknown: Repository Name Unknown”

The configmap of the image-builder looks like this:

apiVersion: v1
data:
image-builder.json: |-
{
“builder”: {“dockerCfgFile”: “/config/pull-secret.json”,“gitpodLayerLoc”: “/app/workspace-image-layer.tar.gz”,
“baseImageRepository”: “lhr.ocir.io/oraseemeadesandbox/gitpod/base-images”,
“workspaceImageRepository”: “lhr.ocir.io/oraseemeadesandbox/gitpod/workspace-images”,
“imageBuildSalt”: “”
},
“refCache”: {
“interval”: “6h”,
“refs”: [“gitpod/workspace-full:latest”]
},

so I have pushed the standard gitpod/workspace-full:latest from docker hub to where, I suppose, the images are expected , so the registry looks like this:

Hi,
please remove /gitpod at the end of the registry URL.

# name must not end with a “/”
name: registry-domain-name/oraseemeadesandbox

And try it again.

Solved
The problem was that our custom Oracle OCI Registry responded differently that e.g. docker hub, when a repository was not available. This was fixed by Chris a couple of days ago in the master branch. To use the fix, we need now to add the following “imageBuilder:” section under “components:” after the “proxy:” section in values.yaml

components:
    proxy:
      loadBalancerIP: null
    imageBuilder: 
      imagePrefix: eu.gcr.io/gitpod-core-dev/build/
      imageName: image-builder
      version: cw-imagebuilder-errnotfound.1

Hope this will be solved in a more elegant way in the next release :grinning:

1 Like