Skip to content

Admiral can't pull images from insecure registry (harbor) when creating a container using VIC-E #4706

@hmahmood

Description

@hmahmood

While creating a container through the Admiral UI with VIC-E as the only docker host, I get the following error:

Service https://10.192.82.84:2376/v1.21/images/create?fromImage=10.192.92.136:443/library/alpine:latest returned error 500 for POST. id 129958; Reason: Head https://10.192.92.136:443/v2/: x509: certificate signed by unknown authority

I created my VCH with --insecure-registry <harbor-ip>, i.e. without specifying the port. Looking at the code path (https://github.com/vmware/vic/blob/master/lib/apiservers/engine/backends/image.go#L372), I see that we are matching the hostname we get from the create image request with the ip/host specified in the --insecure-registry option above; they don't match because the latter has the port missing.

Workaround: specify the port when using --insecure-registry vic-machine option.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions