[Starlingx-discuss] Script to check mirror health
Hu, Yong
yong.hu at intel.com
Thu Jul 26 01:36:09 UTC 2018
Hi Erich,
This script is helpful, thank you!
2 cents:
1). A tiny comment in the patch that we probably need to distinguish ".noarch" and ".src" inside function "get_repoquery_info"?
2). Whenever StaringX.repo is updated by a new patch, we might need a way to refresh the yum cache. Isn't it?
Regards,
Yong
On 26/07/2018, 3:41 AM, "Cordoba Malibran, Erich" <erich.cordoba.malibran at intel.com> wrote:
Hi all,
I create a script to help with the mirror monitoring. Currently we need
to download the entire mirror to know if something has failed, in
particular if a package has been updated in the CentOS repositories.
However, it is possible to know if something has changed using the
yum cache, in specific the primary_db files with all the package
information. So, this script iterates over all the content of the
'rpms_from_centos_repos.lst' and uses repoquery to retrieve the
information of that specific package and version. If results are not
found, then it tries to get the information only using the package
name.
For example, doing :
repoquery --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}' epel-rpm-macros-7-18.noarch
returns no output, however:
repoquery --qf '%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}' epel-rpm-macros
returns:
epel-rpm-macros-7-19.noarch
In this case, epel-rpm-macros needs to be upgraded.
So, for today's execution, this script shows:
... list of packages...
2018-07-25 19-20-29 ==> INFO: Checking zlib-1.2.7-17.el7.x86_64... OK
2018-07-25 19-20-30 ==> INFO: Checking zlib-devel-1.2.7-7.el7.x86_64... OK
2018-07-25 19-20-30 ==> INFO: Checking zziplib-0.13.62-5.el7.x86_64... OK
2018-07-25 19-20-31 ==> ERROR: Failures found, error log:
2018-07-25 19-20-31 ==> ERROR: ==========================
Package epel-rpm-macros-7-18.noarch not found, available epel-rpm-macros-7-19.noarch
Package python2-rpm-macros-3-18.el7.noarch not found, available python2-rpm-macros-3-21.el7.noarch
Package python-rpm-macros-3-18.el7.noarch not found, available python-rpm-macros-3-21.el7.noarch
Package python-srpm-macros-3-18.el7.noarch not found, available python-srpm-macros-3-21.el7.noarch
I send a review with this script, please let me know any feedback or comments.
Review: https://review.openstack.org/#/c/585858/
Thanks
-Erich
_______________________________________________
Starlingx-discuss mailing list
Starlingx-discuss at lists.starlingx.io
http://lists.starlingx.io/cgi-bin/mailman/listinfo/starlingx-discuss
More information about the Starlingx-discuss
mailing list