commit d3f8af4f4c6df5eede6f83d67bff8970d4bd1ed7
Author: Don Penney <email address hidden>
Date: Mon Jun 22 21:16:35 2020 -0400
Protect against stale repo data in DNF cache
When the patch-agent is notified by the patch-controller of a new
patching operation (patch_op_counter in HELLO is incremented), it will
run a new software query consisting first of running "dnf makecache",
then checking the software repositories for changes. In rare cases,
the metadata returned to dnf when it makes the query could be stale,
resulting in the patch-agent believing the current software is
up-to-date.
In order to protect against this, the patch-agent will now verify the
repository revision id for the updates repo. If the revision id has
not changed when it is reasonable to expect it could have (ie. the
patch_op_counter has increased, indicating the repository may have
been updated), the patch-agent will retry once to allow for any
potential caching to have cleared.
Change-Id: I3a44ed86e16cd9fe67f0b0e763c95a5a7e126cf8
Closes-Bug: 1884094
Signed-off-by: Don Penney <email address hidden>
Reviewed: https:/ /review. opendev. org/737403 /git.openstack. org/cgit/ starlingx/ update/ commit/ ?id=d3f8af4f4c6 df5eede6f83d67b ff8970d4bd1ed7
Committed: https:/
Submitter: Zuul
Branch: master
commit d3f8af4f4c6df5e ede6f83d67bff89 70d4bd1ed7
Author: Don Penney <email address hidden>
Date: Mon Jun 22 21:16:35 2020 -0400
Protect against stale repo data in DNF cache
When the patch-agent is notified by the patch-controller of a new
patching operation (patch_op_counter in HELLO is incremented), it will
run a new software query consisting first of running "dnf makecache",
then checking the software repositories for changes. In rare cases,
the metadata returned to dnf when it makes the query could be stale,
resulting in the patch-agent believing the current software is
up-to-date.
In order to protect against this, the patch-agent will now verify the op_counter has increased, indicating the repository may have
repository revision id for the updates repo. If the revision id has
not changed when it is reasonable to expect it could have (ie. the
patch_
been updated), the patch-agent will retry once to allow for any
potential caching to have cleared.
Change-Id: I3a44ed86e16cd9 fe67f0b0e763c95 a5a7e126cf8
Closes-Bug: 1884094
Signed-off-by: Don Penney <email address hidden>