Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-15624

inconsistent metadata expiration times cause patch jobs to return no updates available

XMLWordPrintable

    • Sprint 112, Sprint 113, Sprint 114, Sprint 115, Sprint 116, Sprint 117, Sprint 118
    • Important
    • None

      Description of problem:
      Inconsistency in repo metadata expiration times causes invalid false positives on Satellite when updating hosts.

      Version-Release number of selected component (if applicable):
      candlepin-4.1.15-1.el8sat.noarch
      satellite-6.12.0-4.el8sat.noarch

      How reproducible:

      Steps to Reproduce:
      1.
      2.
      3.

      Actual results:
      Satellite clients are likely to miss updates on patching because of recently updated content views and clients still holding old repodata they still consider to be valid.

      Expected results:
      Satellite client's metadata_expire value should default to "1" and should be a customizable time in seconds on the content page of the Satellite settings for any user that wishes to set the time to anything else.

      Additional info:
      from satellite 6.12 fresh install:
      [root@bombsat612 ~]# sudo -u postgres psql -d candlepin -c "select count(metadataexpire) from cp2_content where metadataexpire != 1;"
      could not change directory to "/root": Permission denied
      count
      -------
      5331
      (1 row)

      [root@bombsat612 ~]# sudo -u postgres psql -d candlepin -c "select count(metadataexpire) from cp2_content where metadataexpire = 1;"
      could not change directory to "/root": Permission denied
      count
      -------
      3512
      (1 row)

      [root@bombsat612 ~]# sudo -u postgres psql -d candlepin -c "select distinct(metadataexpire) from cp2_content;"
      could not change directory to "/root": Permission denied
      metadataexpire
      ----------------
      1
      86400
      (2 rows)

      Here are 2 ruby functions where we set the time (i believe if the product is not set by default):
      /usr/share/gems/gems/katello-4.5.0.20/app/lib/actions/candlepin/product/content_create.rb:24: metadataExpire: 1,
      /usr/share/gems/gems/katello-4.5.0.20/app/lib/actions/candlepin/product/content_update.rb:28: metadataExpire: 1,

      Looking at the manifest on the 6.12 satellite and comparing with another from 2022:
      tasander at xbox in /t/e/products
      ↪ for i in $(ls -1);cat $i | jq | grep metadataExpiration ; end | sort | uniq -c
      8018 "metadataExpiration": 86400,
      8018 "metadataExpiration": 86400,

      [root@bombsat610 products]# for i in $(ls -1); do cat $i | json_reformat | grep metadataExpiration ; done | sort | uniq -c
      1310 "metadataExpiration": 86400,
      4 "metadataExpiration": 86401,
      4 "metadataExpiration": 86402,

        There are no Sub-Tasks for this issue.

            ojanus Ondřej Januš (Inactive)
            jira-bugzilla-migration RH Bugzilla Integration
            Gaurav Talreja Gaurav Talreja
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: