Uploaded image for project: 'Red Hat Advanced Cluster Management'
  1. Red Hat Advanced Cluster Management
  2. ACM-24565

Improve selection of MSA secret on post restore

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Normal Normal
    • ACM 2.15.0
    • ACM 2.15.0
    • Business Continuity
    • None
    • None

       Based on this discussion https://redhat-internal.slack.com/archives/CTZTHFQRH/p1758228470506409

      it seems that the MSA resource doesn't update the token validity right away, if the MSA spec validity changes. 

      It will eventually update the token validity when about 20% of the remaining lifetime threshold is met.

      This means that the token could be backed up and the validity of the backed up token may not reflect the actual token validity.

      This could result in the post restore operation, when the auto-import-secret is created to ignore a token, considered expired based on the expiration annotation. The token may be still be valid.

       

      To avoid this corner cases, this task updates the post restore operation where it looks for a valid MSA token:

      • for a certain managed cluster, finds all MSA token in that namespace
      • if only one found, it will not try to see if it's valid; it will create the auto-import-secret with this token, giving the import component a chance to run the import. If the token is indeed expired, this will be shown in the import
      • if more than one found ( could be the pair MSA created half through the initial MSA ) then it looks for valid token. If both look expired, it picks up the last one created since this has a higher chance to still be valid ( both MSA and MSA pair have the same expiration, set by the BackupSchedule ttl )

              vbirsan@redhat.com Valentina Birsan
              vbirsan@redhat.com Valentina Birsan
              Thuy Nguyen Thuy Nguyen
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Estimated:
                  Original Estimate - 5 minutes
                  5m
                  Remaining:
                  Remaining Estimate - 5 minutes
                  5m
                  Logged:
                  Time Spent - Not Specified
                  Not Specified