Uploaded image for project: 'Red Hat Advanced Cluster Security'
  1. Red Hat Advanced Cluster Security
  2. ROX-29381

Expired_at field is reset if the trial subscription is not yet expired

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • None
    • ACS Cloud Service
    • None
    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • False

      Background / Context

      https://redhat-internal.slack.com/archives/C01R0E7CVMX/p1744672087384859

      Problem

      A customer had a valid trial and asked to extend it for another 60 days. I did it by patching expired_at, and then after some time the instance was deleted.
      Turns out the expired_at value reset shortly after I set it.
      From the source code:

      // if quota entitlement is active, ensure expired_at is set to null.
      if isQuotaEntitlementActive && central.ExpiredAt.Valid {
          return nil, true
      }
      

      Since their trial was still active, isQuotaEntitlementActive was set to true, and the expired_at field was reset.

      Logs

      Change the expiry date

      admin_dinosaur.go:294] Setting expired_at to "2025-06-17 12:20:09 +0000 UTC" for central "cv4034cu2gu2k1lkfeg0": https://redhat-internal.slack.com/archives/C01R0E7CVMX/p1744672087384859
      2025-04-17T12:21:26.916Z 1 dinosaur.go:719] instance state change: id="cv4034cu2gu2k1lkfeg0": fields=map[expired_at:2025-06-17 12:20:09 +0000 UTC]
      

      Expiry date is reset shortly after that

      I0417 15:34:32.783555 1 expiration_date_mgr.go:127] updating expired_at of central "cv4034cu2gu2k1lkfeg0" to {"0001-01-01 00:00:00 +0000 UTC" %!q(bool=false)}
      57
      I0417 15:34:32.783608 1 dinosaur.go:719] instance state change: id="cv4034cu2gu2k1lkfeg0": fields=map[expired_at:{Time:0001-01-01 00:00:00 +0000 UTC Valid:false}]
      

      The trial is expired

      I0504 09:06:20.874913 1 expiration_date_mgr.go:127] updating expired_at of central "cv4034cu2gu2k1lkfeg0" to {"2025-05-04 09:06:20.874912461 +0000 UTC m=+500227.620357403" %!q(bool=true)}
      I0504 09:06:20.874936 1 dinosaur.go:719] instance state change: id="cv4034cu2gu2k1lkfeg0": fields=map[expired_at: {Time:2025-05-04 09:06:20.874912461 +0000 UTC m=+500227.620357403 Valid:true}]
      

              Unassigned Unassigned
              ykovalev@redhat.com Yury Kovalev
              ACS Cloud Service
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: