Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] [2.10.2] Fleet bundles are missing the status.summary field #13134

Open
mantis-toboggan-md opened this issue Jan 14, 2025 · 9 comments · Fixed by #13135
Open

[BUG] [2.10.2] Fleet bundles are missing the status.summary field #13134

mantis-toboggan-md opened this issue Jan 14, 2025 · 9 comments · Fixed by #13135
Assignees
Labels
area/fleet kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this status/release-blocker team/fleet Belongs to Team Fleet
Milestone

Comments

@mantis-toboggan-md
Copy link
Member

mantis-toboggan-md commented Jan 14, 2025

Rancher Server Setup

  • Rancher version:
  • Installation option (Docker install/Helm Chart): docker
  • Proxy/Cert Details:

Information about the Cluster

  • Kubernetes version:
  • Cluster Type (Local/Downstream): local

User Information
admin

Describe the bug
Fleet bundles are missing the status.summary field. This breaks the gitrepo detail view: the bundle summary table fails to render, with errors thrown in the console.

To Reproduce
1.In the ui navigate to fleet>git repos>create
2. Specify a name, set the url to https://github.com/rancher/fleet-examples.git, add a path 'simple'
3. Create the gitrepo
4. Once the gitrepo is created, navigate to its detail view (click its name in the repo table)

Result
The bundles tab is empty and there are console errors

Expected Result
A table with details about associated fleet bundles should render and no errors should be shown in the console.

Screenshots

Image

It looks like this in 2.11:
Image

Additional context

@sbulage
Copy link

sbulage commented Jan 15, 2025

Hello @mantis-toboggan-md

I just tried on Rancher --> v2.10-e09c0339f38576b224382a6d3c8bd8e694a1e7f6-head and Fleet --> fleet:v0.11.3-rc.1
I am not able to see the error which mentioned above i.e. The Git Repo is not targeting to any cluster ....
See below video for more information.

Video showing GitRepo resources are populated.
rancher-fleet-repo.mp4

Please let me know if anything is missing there, happy to try that out.
Thanks 😄

@mmartin24
Copy link

I tested as well in v2.10-ee01a8e72c881512d9d2352229a46fcea7c9d8e8-head and 2.11-fc8c1b202f5d7c0699698dc2732cceda20352511-head and I could not reproduce either as @sbulage mentioned.
Reading the description on the ticket I understand the gitrepo was deployed on local cluster, yet the screenshot points to fleet-default. If that is the case the bundle will not appear. @mantis-toboggan-md , could you please re-check if that is the case? (Please see video below of what I mean). Thanks.

2025-01-15_08-20-46.mov

@manno
Copy link
Member

manno commented Jan 15, 2025

The status fields of the involved resources would be helpful: https://fleet.rancher.io/troubleshooting#fetch-detailed-status-from-gitrepos-and-bundles

@mantis-toboggan-md
Copy link
Member Author

I tested as well in v2.10-ee01a8e72c881512d9d2352229a46fcea7c9d8e8-head and 2.11-fc8c1b202f5d7c0699698dc2732cceda20352511-head and I could not reproduce either as @sbulage mentioned. Reading the description on the ticket I understand the gitrepo was deployed on local cluster, yet the screenshot points to fleet-default. If that is the case the bundle will not appear. @mantis-toboggan-md , could you please re-check if that is the case? (Please see video below of what I mean). Thanks.
2025-01-15_08-20-46.mov

This video is not loading for me, but I have confirmed that a fleet.cattle.io.bundle resource is created after creating the gitrepo. The UI attempts to show this in the Bundles tab of the gitrepo detail view and throws errors because it expects bundles to have status.summary defined. If no bundle existed, we would still expect a table to render in that tab, as in the 2.11 screenshot, but with no rows.

I apologize for the lack of clarify in my reproduction steps. Here's the gitrepo I created to reproduce this error on rancher v2.10-ee01a8e72c881512d9d2352229a46fcea7c9d8e8-head

apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
  creationTimestamp: '2025-01-15T16:58:45Z'
  finalizers:
    - fleet.cattle.io/gitrepo-finalizer
  generation: 2
  managedFields:
    - apiVersion: fleet.cattle.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:finalizers:
            .: {}
            v:"fleet.cattle.io/gitrepo-finalizer": {}
        f:spec:
          f:imageScanCommit:
            .: {}
            f:authorEmail: {}
            f:authorName: {}
      manager: fleetcontroller
      operation: Update
      time: '2025-01-15T16:58:45Z'
    - apiVersion: fleet.cattle.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        f:spec:
          .: {}
          f:branch: {}
          f:correctDrift: {}
          f:paths: {}
          f:repo: {}
          f:targets: {}
      manager: rancher
      operation: Update
      time: '2025-01-15T16:58:45Z'
    - apiVersion: fleet.cattle.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          .: {}
          f:commit: {}
          f:conditions: {}
          f:desiredReadyClusters: {}
          f:display:
            .: {}
            f:readyBundleDeployments: {}
          f:gitJobStatus: {}
          f:lastPollingTriggered: {}
          f:observedGeneration: {}
          f:readyClusters: {}
          f:resourceCounts:
            .: {}
            f:desiredReady: {}
            f:missing: {}
            f:modified: {}
            f:notReady: {}
            f:orphaned: {}
            f:ready: {}
            f:unknown: {}
            f:waitApplied: {}
          f:summary:
            .: {}
            f:desiredReady: {}
            f:ready: {}
      manager: fleetcontroller
      operation: Update
      subresource: status
      time: '2025-01-15T20:17:52Z'
  name: test-defaults
  namespace: fleet-default
  resourceVersion: '56463'
  uid: be5aeefe-8f3b-4367-9dc7-84a369438998
spec:
  branch: master
  correctDrift: {}
  imageScanCommit:
    authorEmail: ''
    authorName: ''
  paths:
    - simple
  repo: https://github.com/rancher/fleet-examples.git
  targets:
    - clusterSelector:
        matchExpressions:
          - key: provider.cattle.io
            operator: NotIn
            values:
              - harvester
status:
  commit: dcf4917293ef131f64724d0c03cadc4f5b257168
  conditions:
    - lastUpdateTime: '2025-01-15T16:58:45Z'
      status: 'True'
      type: Ready
    - lastUpdateTime: '2025-01-15T16:58:45Z'
      status: 'True'
      type: GitPolling
    - lastUpdateTime: '2025-01-15T16:58:45Z'
      status: 'False'
      type: Reconciling
    - lastUpdateTime: '2025-01-15T16:58:45Z'
      status: 'False'
      type: Stalled
    - lastUpdateTime: '2025-01-15T16:58:45Z'
      status: 'True'
      type: Accepted
  desiredReadyClusters: 0
  display:
    readyBundleDeployments: 0/0
  gitJobStatus: Current
  lastPollingTriggered: '2025-01-15T20:17:52Z'
  observedGeneration: 2
  readyClusters: 0
  resourceCounts:
    desiredReady: 0
    missing: 0
    modified: 0
    notReady: 0
    orphaned: 0
    ready: 0
    unknown: 0
    waitApplied: 0
  summary:
    desiredReady: 0
    ready: 0

I followed instructions linked above to get the status of the bundle in question:


 {
    "conditions": [
        {
            "lastUpdateTime": "2025-01-15T16:58:49Z",
            "status": "True",
            "type": "Ready"
        }
    ],
    "display": {
        "readyClusters": "0/0"
    },
    "maxNew": 50,
    "maxUnavailable": 1,
    "observedGeneration": 1,
    "partitions": [
        {
            "maxUnavailable": 1,
            "name": "All",
            "summary": {
                "desiredReady": 0,
                "ready": 0
            }
        }
    ],
    "resourcesSha256Sum": "3a6cf24da1bad9584b242a50b6c9bd08db4e5d3c24abdf67141c98bf31a35d6e"
}

@sbulage
Copy link

sbulage commented Jan 16, 2025

With Rancher version: v2.10-969f790e32c71d592e23b9284c8048fd963ac40d-head

I am not able to reproduce it using GitRepo provided above. See below screenshot.

Please let me know if I am missing anything here, happy test that 😄


Image


GitRepo Output
apiVersion: fleet.cattle.io/v1alpha1
kind: GitRepo
metadata:
  creationTimestamp: '2025-01-16T07:30:07Z'
  finalizers:
    - fleet.cattle.io/gitrepo-finalizer
  generation: 2
  managedFields:
    - apiVersion: fleet.cattle.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        f:spec:
          .: {}
          f:branch: {}
          f:correctDrift: {}
          f:paths: {}
          f:repo: {}
          f:targets: {}
      manager: rancher
      operation: Update
      time: '2025-01-16T07:30:07Z'
    - apiVersion: fleet.cattle.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        f:metadata:
          f:finalizers:
            .: {}
            v:"fleet.cattle.io/gitrepo-finalizer": {}
        f:spec:
          f:imageScanCommit:
            .: {}
            f:authorEmail: {}
            f:authorName: {}
      manager: fleetcontroller
      operation: Update
      time: '2025-01-16T07:30:08Z'
    - apiVersion: fleet.cattle.io/v1alpha1
      fieldsType: FieldsV1
      fieldsV1:
        f:status:
          .: {}
          f:commit: {}
          f:conditions: {}
          f:desiredReadyClusters: {}
          f:display:
            .: {}
            f:readyBundleDeployments: {}
          f:gitJobStatus: {}
          f:lastPollingTriggered: {}
          f:observedGeneration: {}
          f:readyClusters: {}
          f:resourceCounts:
            .: {}
            f:desiredReady: {}
            f:missing: {}
            f:modified: {}
            f:notReady: {}
            f:orphaned: {}
            f:ready: {}
            f:unknown: {}
            f:waitApplied: {}
          f:resources: {}
          f:summary:
            .: {}
            f:desiredReady: {}
            f:ready: {}
      manager: fleetcontroller
      operation: Update
      subresource: status
      time: '2025-01-16T08:00:16Z'
  name: test-defaults
  namespace: fleet-default
  resourceVersion: '10309'
  uid: d25ed41f-13a0-47d4-bd35-f6fe4fa0798c
spec:
  branch: master
  correctDrift: {}
  imageScanCommit:
    authorEmail: ''
    authorName: ''
  paths:
    - simple
  repo: https://github.com/rancher/fleet-examples.git
  targets:
    - clusterSelector:
        matchExpressions:
          - key: provider.cattle.io
            operator: NotIn
            values:
              - harvester
status:
  commit: dcf4917293ef131f64724d0c03cadc4f5b257168
  conditions:
    - lastUpdateTime: '2025-01-16T07:30:27Z'
      status: 'True'
      type: Ready
    - lastUpdateTime: '2025-01-16T07:30:08Z'
      status: 'True'
      type: GitPolling
    - lastUpdateTime: '2025-01-16T07:30:08Z'
      status: 'False'
      type: Reconciling
    - lastUpdateTime: '2025-01-16T07:30:08Z'
      status: 'False'
      type: Stalled
    - lastUpdateTime: '2025-01-16T07:30:08Z'
      status: 'True'
      type: Accepted
  desiredReadyClusters: 3
  display:
    readyBundleDeployments: 3/3
  gitJobStatus: Current
  lastPollingTriggered: '2025-01-16T08:00:16Z'
  observedGeneration: 2
  readyClusters: 3
  resourceCounts:
    desiredReady: 18
    missing: 0
    modified: 0
    notReady: 0
    orphaned: 0
    ready: 18
    unknown: 0
    waitApplied: 0
  resources:
    - apiVersion: apps/v1
      id: default/frontend
      kind: Deployment
      name: frontend
      namespace: default
      state: Ready
      type: apps.deployment
    - apiVersion: apps/v1
      id: default/redis-master
      kind: Deployment
      name: redis-master
      namespace: default
      state: Ready
      type: apps.deployment
    - apiVersion: apps/v1
      id: default/redis-slave
      kind: Deployment
      name: redis-slave
      namespace: default
      state: Ready
      type: apps.deployment
    - apiVersion: v1
      id: default/frontend
      kind: Service
      name: frontend
      namespace: default
      state: Ready
      type: service
    - apiVersion: v1
      id: default/redis-master
      kind: Service
      name: redis-master
      namespace: default
      state: Ready
      type: service
    - apiVersion: v1
      id: default/redis-slave
      kind: Service
      name: redis-slave
      namespace: default
      state: Ready
      type: service
  summary:
    desiredReady: 3
    ready: 3

@mmartin24
Copy link

@mantis-toboggan-md , are you able to reproduce this manually?
If not, does it occur as well if you add some delay on your automation?
Not sure why you can't see the video. Maybe you can try to download?
Thanks

@richard-cox
Copy link
Member

I've reproduced it with Nancy's instructions.

For clarrify

  • docker run using v2.10-ee01a8e72c881512d9d2352229a46fcea7c9d8e8-head
  • load ui
  • setup rancher --> wait for fleet to be available (local cluster --> wait for Fleet checkbox to be ticked and green
  • fleet --> gitrepo --> add --> add name, add repo url https://github.com/rancher/fleet-examples.git --> next --> next (should be back at git repo list
  • i paused here for a bit, not long
  • click on git repo. bundles tab selected with no content

There are two git bundles

  • fleet-local/fleet-agent-local - contains status.summary
  • fleet-default/test-defaults-simple (one i created) - does not contain status.summary

I'll try the above with v2.10-969f790e32c71d592e23b9284c8048fd963ac40d-head from #13134

@richard-cox
Copy link
Member

Chatted with the fleet team

  • This is a regression in how fleet reports the gitrepo status.summary when the gitrepo does not target any clusters
  • It's in 2.10 atm but will be in main at some point
  • Given that UX in this area of the UI is going to be updated soon, and given the code (we already cater for a missing status.summary in another close code path), i'm just going to fix it there

@richard-cox richard-cox transferred this issue from rancher/rancher Jan 16, 2025
@github-actions github-actions bot added the QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this label Jan 16, 2025
@richard-cox richard-cox self-assigned this Jan 16, 2025
@richard-cox
Copy link
Member

/forwardport v2.11.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/fleet kind/bug QA/dev-automation Issues that engineers have written automation around so QA doesn't have look at this status/release-blocker team/fleet Belongs to Team Fleet
Projects
None yet
6 participants