operator-framework / operator-lifecycle-manager

A management framework for extending Kubernetes with Operators
https://olm.operatorframework.io
Apache License 2.0
1.7k stars 542 forks source link

packageserver can't update PackageManifest from file based index-image #2599

Open tommaso-borgato opened 2 years ago

tommaso-borgato commented 2 years ago

Steps to reproduce:

Looks like something goes wrong in packageserver when it tries and processes the content of the index-image;

Note the index-image is produced according to the new file format: it contains a file named /configs/operator.yaml (and index-image produced according to the old SQLite format, would have contained a file named /database/index.db)

joelanford commented 2 years ago

Seems like you may be running into the issue solved by this PR: https://github.com/operator-framework/operator-registry/pull/874

It looks like we haven't tagged another operator-registry release since that has been merged, but we do produce images that track the master branch.

Can you retry building the catalog with quay.io/operator-framework/opm:master as the base image and let us know if that resolves the issue?

tommaso-borgato commented 2 years ago

@joelanford sure....

I modified my dockerfile as in the following:

# The base image is expected to contain
# /bin/opm (with a serve subcommand) and /bin/grpc_health_probe
#FROM quay.io/operator-framework/upstream-opm-builder
FROM quay.io/operator-framework/opm:master

# Configure the entrypoint and command
ENTRYPOINT ["/bin/opm"]
CMD ["serve", "/configs"]

# Copy declarative config root into image at /configs
ADD eap-operator-catalog /configs

# Set DC-specific label for the location of the DC root directory
# in the image
LABEL operators.operatorframework.io.index.configs.v1=/configs

but I still see the error:

I0127 09:05:39.637879       1 reflector.go:381] pkg/lib/queueinformer/queueinformer_operator.go:153: forcing resync
time="2022-01-27T09:05:39Z" level=info msg="updating PackageManifest based on CatalogSource changes: {my-eap-operator-catalog issues-53}" action="sync catalogsource" address="my-eap-operator-catalog.issues-53.svc:50051" name=my-eap-operator-catalog namespace=issues-53
time="2022-01-27T09:05:39Z" level=info msg="updating PackageManifest based on CatalogSource changes: {operatorhubio-catalog olm}" action="sync catalogsource" address="operatorhubio-catalog.olm.svc:50051" name=operatorhubio-catalog namespace=olm
time="2022-01-27T09:05:39Z" level=warning msg="error unmarshaling csv, eliding channel" action="refresh cache" channel=eapqetest error="unexpected end of JSON input" source="{my-eap-operator-catalog issues-53}"
time="2022-01-27T09:05:39Z" level=warning msg="eliding package: error converting to packagemanifest" action="refresh cache" err="packagemanifest has no valid channels" source="{my-eap-operator-catalog issues-53}"