Communities

Writing
Writing
Codidact Meta
Codidact Meta
The Great Outdoors
The Great Outdoors
Photography & Video
Photography & Video
Scientific Speculation
Scientific Speculation
Cooking
Cooking
Electrical Engineering
Electrical Engineering
Judaism
Judaism
Languages & Linguistics
Languages & Linguistics
Software Development
Software Development
Mathematics
Mathematics
Christianity
Christianity
Code Golf
Code Golf
Music
Music
Physics
Physics
Linux Systems
Linux Systems
Power Users
Power Users
Tabletop RPGs
Tabletop RPGs
Community Proposals
Community Proposals
tag:snake search within a tag
answers:0 unanswered questions
user:xxxx search by author id
score:0.5 posts with 0.5+ score
"snake oil" exact phrase
votes:4 posts with 4+ votes
created:<1w created < 1 week ago
post_type:xxxx type of post
Search help
Notifications
Mark all as read See all your notifications »
Q&A

Post History

60%
+1 −0
Q&A Reducing Noise from yum-cron when repos are out of date

I have a few CentOS servers that I want to stay automatically up to date with yum-cron, and I want to get emails when there are problems but I do not want to get so many emails about repos being ou...

0 answers  ·  posted 2y ago by re89j‭  ·  edited 2y ago by Canina‭

Question yum-cron yum repo noise
#2: Post edited by user avatar Canina‭ · 2022-02-16T12:44:10Z (about 2 years ago)
RFC 2606 specifically reserves `example.com` and others for examples; `mydomain.com` actually belongs to someone
  • I have a few CentOS servers that I want to stay automatically up to date with yum-cron, and I want to get emails when there are problems but I do not want to get so many emails about repos being out of date.
  • Basically, the repos are run by volunteers and sometimes their index files fall behind. Yum picks one at random when it runs, and if it gets an old one, then yum-cron throws an error. Cron faithfully emits this error to the local mailer which sends it to me like the example below:
  • ```
  • From: "(Cron Daemon)" <root@mydomain.com>
  • To: root@mydomain.com
  • Subject: Cron <root@mydomain> run-parts /etc/cron.hourly
  • Content-Type: text/plain; charset=UTF-8
  • Auto-Submitted: auto-generated
  • Precedence: bulk
  • X-Cron-Env: <XDG_SESSION_ID=235865>
  • X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
  • X-Cron-Env: <LANG=en_US.UTF-8>
  • X-Cron-Env: <SHELL=/bin/bash>
  • X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
  • X-Cron-Env: <MAILTO=root>
  • X-Cron-Env: <HOME=/root>
  • X-Cron-Env: <LOGNAME=root>
  • X-Cron-Env: <USER=root>
  • Message-Id: <20220215200809.6D07E413EF@mdomain.com>
  • Date: Tue, 15 Feb 2022 14:08:09 -0600 (CST)
  • /etc/cron.hourly/0yum-hourly.cron:
  • Not using downloaded updates/repomd.xml because it is older than what we have:
  • Current : Mon Feb 14 13:39:31 2022
  • Downloaded: Tue Feb 8 14:02:02 2022
  • ```
  • The most ideal resolution I think, would be able to set a threshold of how many days old I want to ignore. i.e. I could put in 14 and as long as a repo was no more than 2 weeks old it wouldn't bother me about it.
  • But I'm 100% sure there's no setting anywhere for that.
  • I thought maybe adding a yum clean all to the yum-cron script might help if it makes my local yum db unaware of the latest change, so it would recognize all repos as new but that seems a little crude.
  • I'd also be fine just not hearing about out of date repos at all. So maybe I add a filter to gmail to match "/etc/cron.hourly/0yum-hourly.cron" "Not using downloaded" "because it is older than what we" and call it a day. Anyone have a better suggestion?
  • I have a few CentOS servers that I want to stay automatically up to date with yum-cron, and I want to get emails when there are problems but I do not want to get so many emails about repos being out of date.
  • Basically, the repos are run by volunteers and sometimes their index files fall behind. Yum picks one at random when it runs, and if it gets an old one, then yum-cron throws an error. Cron faithfully emits this error to the local mailer which sends it to me like the example below:
  • ```
  • From: "(Cron Daemon)" <root@example.com>
  • To: root@example.com
  • Subject: Cron <root@example> run-parts /etc/cron.hourly
  • Content-Type: text/plain; charset=UTF-8
  • Auto-Submitted: auto-generated
  • Precedence: bulk
  • X-Cron-Env: <XDG_SESSION_ID=235865>
  • X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
  • X-Cron-Env: <LANG=en_US.UTF-8>
  • X-Cron-Env: <SHELL=/bin/bash>
  • X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
  • X-Cron-Env: <MAILTO=root>
  • X-Cron-Env: <HOME=/root>
  • X-Cron-Env: <LOGNAME=root>
  • X-Cron-Env: <USER=root>
  • Message-Id: <20220215200809.6D07E413EF@mdomain.com>
  • Date: Tue, 15 Feb 2022 14:08:09 -0600 (CST)
  • /etc/cron.hourly/0yum-hourly.cron:
  • Not using downloaded updates/repomd.xml because it is older than what we have:
  • Current : Mon Feb 14 13:39:31 2022
  • Downloaded: Tue Feb 8 14:02:02 2022
  • ```
  • The most ideal resolution I think, would be able to set a threshold of how many days old I want to ignore. i.e. I could put in 14 and as long as a repo was no more than 2 weeks old it wouldn't bother me about it.
  • But I'm 100% sure there's no setting anywhere for that.
  • I thought maybe adding a yum clean all to the yum-cron script might help if it makes my local yum db unaware of the latest change, so it would recognize all repos as new but that seems a little crude.
  • I'd also be fine just not hearing about out of date repos at all. So maybe I add a filter to gmail to match "/etc/cron.hourly/0yum-hourly.cron" "Not using downloaded" "because it is older than what we" and call it a day. Anyone have a better suggestion?
#1: Initial revision by user avatar re89j‭ · 2022-02-15T20:31:53Z (about 2 years ago)
Reducing Noise from yum-cron when repos are out of date
I have a few CentOS servers that I want to stay automatically up to date with yum-cron, and I want to get emails when there are problems but I do not want to get so many emails about repos being out of date.

Basically, the repos are run by volunteers and sometimes their index files fall behind.  Yum picks one at random when it runs, and if it gets an old one, then yum-cron throws an error.  Cron faithfully emits this error to the local mailer which sends it to me like the example below:


```
From: "(Cron Daemon)" <root@mydomain.com>
To: root@mydomain.com
Subject: Cron <root@mydomain> run-parts /etc/cron.hourly
Content-Type: text/plain; charset=UTF-8
Auto-Submitted: auto-generated
Precedence: bulk
X-Cron-Env: <XDG_SESSION_ID=235865>
X-Cron-Env: <XDG_RUNTIME_DIR=/run/user/0>
X-Cron-Env: <LANG=en_US.UTF-8>
X-Cron-Env: <SHELL=/bin/bash>
X-Cron-Env: <PATH=/sbin:/bin:/usr/sbin:/usr/bin>
X-Cron-Env: <MAILTO=root>
X-Cron-Env: <HOME=/root>
X-Cron-Env: <LOGNAME=root>
X-Cron-Env: <USER=root>
Message-Id: <20220215200809.6D07E413EF@mdomain.com>
Date: Tue, 15 Feb 2022 14:08:09 -0600 (CST)

/etc/cron.hourly/0yum-hourly.cron:

Not using downloaded updates/repomd.xml because it is older than what we have:
  Current   : Mon Feb 14 13:39:31 2022
  Downloaded: Tue Feb  8 14:02:02 2022
```

The most ideal resolution I think, would be able to set a threshold of how many days old I want to ignore.  i.e. I could put in 14 and as long as a repo was no more than 2 weeks old it wouldn't bother me about it.

But I'm 100% sure there's no setting anywhere for that.

I thought maybe adding a yum clean all to the yum-cron script might help if it makes my local yum db unaware of the latest change, so it would recognize all repos as new but that seems a little crude.

I'd also be fine just not hearing about out of date repos at all.  So maybe I add a filter to gmail to match "/etc/cron.hourly/0yum-hourly.cron" "Not using downloaded" "because it is older than what we" and call it a day.  Anyone have a better suggestion?