weaveworks / weave-gitops

Weave GitOps provides insights into your application deployments, and makes continuous delivery with GitOps easier to adopt and scale across your teams.
https://docs.gitops.weave.works/
Apache License 2.0
933 stars 154 forks source link

wrongly reported status of sources in webui #4168

Open fenio opened 11 months ago

fenio commented 11 months ago

incosistency between what flux reports and what webui shows

Environment

[☸ lab:network]
❯ ~ flux get sources all
NAME                            REVISION                SUSPENDED   READY   MESSAGE
ocirepository/flux-manifests    v2.2.0@sha256:c3f0cc42  False       True    stored artifact for digest 'v2.2.0@sha256:c3f0cc42'

NAME                                    REVISION                SUSPENDED   READY   MESSAGE
gitrepository/homelab                   main@sha1:41c5be94      False       True    stored artifact for revision 'main@sha1:41c5be94'
gitrepository/local-path-provisioner    v0.0.24@sha1:97e05014   False       True    stored artifact for revision 'v0.0.24@sha1:97e05014'

NAME                            REVISION        SUSPENDED   READY   MESSAGE
helmrepository/bitnami                          False       True    Helm repository is Ready
helmrepository/bjw-s                            False       True    Helm repository is Ready
helmrepository/cloudnative-pg   sha256:20dde634 False       True    stored artifact: revision 'sha256:20dde634'
helmrepository/democratic-csi   sha256:79d41290 False       True    stored artifact: revision 'sha256:79d41290'
helmrepository/external-dns     sha256:8aa1d029 False       True    stored artifact: revision 'sha256:8aa1d029'
helmrepository/hajimari         sha256:ba9498af False       True    stored artifact: revision 'sha256:ba9498af'
helmrepository/ingress-nginx    sha256:39523cd8 False       True    stored artifact: revision 'sha256:39523cd8'
helmrepository/jetstack         sha256:c3d766f6 False       True    stored artifact: revision 'sha256:c3d766f6'
helmrepository/metallb          sha256:bd1fd831 False       True    stored artifact: revision 'sha256:bd1fd831'
helmrepository/netdata          sha256:7391a6f1 False       True    stored artifact: revision 'sha256:7391a6f1'
helmrepository/prometheus       sha256:c8a450e6 False       True    stored artifact: revision 'sha256:c8a450e6'
helmrepository/reloader         sha256:5960a836 False       True    stored artifact: revision 'sha256:5960a836'
helmrepository/traefik          sha256:5b4d0ae3 False       True    stored artifact: revision 'sha256:5b4d0ae3'
helmrepository/weaveworks                       False       True    Helm repository is Ready

NAME                                        REVISION    SUSPENDED   READY   MESSAGE
helmchart/database-cloudnative-pg           0.19.1      False       True    pulled 'cloudnative-pg' chart with version '0.19.1'
helmchart/default-hajimari                  2.0.2       False       True    pulled 'hajimari' chart with version '2.0.2'
helmchart/flux-system-weave-gitops          4.0.36      False       True    pulled 'weave-gitops' chart with version '4.0.36'
helmchart/kube-system-reloader              1.0.52      False       True    pulled 'reloader' chart with version '1.0.52'
helmchart/media-prowlarr                    2.3.0       False       True    pulled 'app-template' chart with version '2.3.0'
helmchart/media-radarr                      2.3.0       False       True    pulled 'app-template' chart with version '2.3.0'
helmchart/media-sonarr                      2.3.0       False       True    pulled 'app-template' chart with version '2.3.0'
helmchart/media-transmission                2.3.0       False       True    pulled 'app-template' chart with version '2.3.0'
helmchart/monitoring-kube-prometheus-stack  54.2.1      False       True    pulled 'kube-prometheus-stack' chart with version '54.2.1'
helmchart/monitoring-netdata                3.7.76      False       True    pulled 'netdata' chart with version '3.7.76'
helmchart/network-cert-manager              v1.13.2     False       True    pulled 'cert-manager' chart with version 'v1.13.2'
helmchart/network-external-dns              1.13.0      False       True    pulled 'external-dns' chart with version '1.13.0'
helmchart/network-ingress-nginx             4.8.4       False       True    pulled 'ingress-nginx' chart with version '4.8.4'
helmchart/network-metallb                   0.13.12     False       True    pulled 'metallb' chart with version '0.13.12'
helmchart/storage-iscsi                     0.14.2      False       True    pulled 'democratic-csi' chart with version '0.14.2'
helmchart/storage-nfs                       0.14.2      False       True    pulled 'democratic-csi' chart with version '0.14.2'

To Reproduce

No idea. Flux seems to be happy after upgrade to 2.2.0. Webui still complains about some weird errors.

Expected behavior

I'd expect it to be in sync.

fenio commented 11 months ago

WebUI shows not ready but I really can't find a reason to show that status. Everything seems to be fine. I'm fine with provide further info but to be honest I don't know how to gather it.

fenio commented 11 months ago

The only thing these repositories have in common is:

[☸ lab:network] ❯ ~ flux get sources all | grep "Helm repository is Ready" helmrepository/bitnami False True Helm repository is Ready helmrepository/bjw-s False True Helm repository is Ready helmrepository/weaveworks False True Helm repository is Ready

But if it's ready then why Webui says it's not ready?

Samra10 commented 11 months ago

Thanks for the ticket @fenio. Checking it

fenio commented 11 months ago

I'm pasting another screenshot as it seems to be related to this issue. Basically when I choose or source and start sync it seems that once the sync is over UI still waits for some time and then it looks like it gaves up and throws the following error:

image
fenio commented 11 months ago

I also removed screenshot from my initial bugreport as it contained my domain name and in fact the new screenshot I've provided contains more info and should be more useful.

Samra10 commented 11 months ago

could you please confirm if the status changes after a while to Ready or remain Not Ready and if not ready, what is the error message you get on the details page?

fenio commented 11 months ago

It stays in "Not ready" forever and except that JSON error there's no really too much errors to show. When I enter to details of one of these failing repositories all I get is this:

image

No data in Events tab and in YAML tab it looks normal to me. If I try to sync it then after exactly one minute of spinning arrows I'm getting that JSON error mentioned in https://github.com/weaveworks/weave-gitops/issues/4168#issuecomment-1857924497 In the meantime flux cli shows all repositories as healthy.

fenio commented 11 months ago

Just some extra info. In the meantime I had some issues with my lab and I had to reinstall everything from scratch. So at this point I wouldn't really connect that issue to upgrade. Apparently the newest flux + the newest webui + oci based sources are simply incompatible.

ksemele commented 11 months ago

same for flux v2.2.*

image

I think is related to OCI type of repo: https://fluxcd.io/flux/components/source/helmrepositories/#helm-oci-repository

Because the OCI Helm repository is a data container, there’s nothing to report for READY and STATUS columns above. The existence of the object can be considered to be ready for use.

on flux v2.0.1 it's OK

image
fenio commented 11 months ago

Yeah it's definitely related only to OCI helm repositories. But flux itself lists them with their status and readiness:

❯ ~ flux get sources helm
NAME            REVISION        SUSPENDED   READY   MESSAGE
bitnami                         False       True    Helm repository is Ready
bjw-s                           False       True    Helm repository is Ready
cloudnative-pg  sha256:c0325874 False       True    stored artifact: revision 'sha256:c0325874'
democratic-csi  sha256:98551e2a False       True    stored artifact: revision 'sha256:98551e2a'
external-dns    sha256:8aa1d029 False       True    stored artifact: revision 'sha256:8aa1d029'
hajimari        sha256:ba9498af False       True    stored artifact: revision 'sha256:ba9498af'
jetstack        sha256:c3d766f6 False       True    stored artifact: revision 'sha256:c3d766f6'
metallb         sha256:bd1fd831 False       True    stored artifact: revision 'sha256:bd1fd831'
netdata         sha256:7391a6f1 False       True    stored artifact: revision 'sha256:7391a6f1'
prometheus      sha256:d8d6263d False       True    stored artifact: revision 'sha256:d8d6263d'
reloader        sha256:e1a81af5 False       True    stored artifact: revision 'sha256:e1a81af5'
traefik         sha256:197ec1f7 False       True    stored artifact: revision 'sha256:197ec1f7'
weaveworks                      False       True    Helm repository is Ready

bitnami, bjw-s and weaveworks are the only three OCI repositories I've got and as you can see flux shows them fine, but in webui:

image
airwalk-mj commented 10 months ago

I have this status error too!

Screenshot 2024-01-15 at 11 23 42