Bug 1040109

Summary: yum-cron daily fails with AttributeError: 'StdIOEmitter' object has no attribute 'tsInfo'
Product: [Fedora] Fedora Reporter: Orion Poplawski <orion>
Component: yumAssignee: Packaging Maintenance Team <packaging-team-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: admiller, bill-bugzilla.redhat.com, eero.torri, etienne.champetier, ffesti, firas.alkafri, john, lars, packaging-team-maint, rhel, sly.midnight, watanabe.yu, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: yum-3.4.3-122.fc19 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-16 07:09:39 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Orion Poplawski 2013-12-10 18:19:27 UTC
yum-cron daily jobs outputs:

Traceback (most recent call last):
  File /usr/sbin/yum-cron, line 1154, in <module>
    main()
  File /usr/sbin/yum-cron, line 1151, in main
    base.updatesCheck()
  File /usr/sbin/yum-cron, line 1073, in updatesCheck
    self.installUpdates(self.opts.update_messages)
  File /usr/sbin/yum-cron, line 989, in installUpdates
    self.emitInstalling()
  File /usr/sbin/yum-cron, line 1099, in emitInstalling
    map(lambda x: x.updatesInstalling(self.tsInfo), self.emitters)
  File /usr/sbin/yum-cron, line 1099, in <lambda>
    map(lambda x: x.updatesInstalling(self.tsInfo), self.emitters)
  File /usr/sbin/yum-cron, line 73, in updatesInstalling
    self.output.append(self._formatTransaction(tsInfo))
  File /usr/sbin/yum-cron, line 429, in _formatTransaction
    ninstalled = self.tsInfo.installed
AttributeError: 'StdIOEmitter' object has no attribute 'tsInfo'

yum-cron-3.4.3-120.fc19.noarch

Comment 1 Reilly Hall 2013-12-11 15:16:31 UTC
/etc/cron.daily/0yum-daily.cron:

Traceback (most recent call last):
  File "/usr/sbin/yum-cron", line 1154, in <module>
    main()
  File "/usr/sbin/yum-cron", line 1151, in main
    base.updatesCheck()
  File "/usr/sbin/yum-cron", line 1065, in updatesCheck
    self.downloadUpdates(not self.opts.apply_updates)
  File "/usr/sbin/yum-cron", line 963, in downloadUpdates
    self.emitDownloading()
  File "/usr/sbin/yum-cron", line 1089, in emitDownloading
    map(lambda x: x.updatesDownloading(self.tsInfo), self.emitters)
  File "/usr/sbin/yum-cron", line 1089, in <lambda>
    map(lambda x: x.updatesDownloading(self.tsInfo), self.emitters)
  File "/usr/sbin/yum-cron", line 57, in updatesDownloading
    self.output.append(self._formatTransaction(tsInfo))
  File "/usr/sbin/yum-cron", line 429, in _formatTransaction
    ninstalled = self.tsInfo.installed
AttributeError: 'StdIOEmitter' object has no attribute 'tsInfo'

Same version here: yum-cron-3.4.3-120.fc19.noarch

Downgrading back to -99 works.

Comment 2 GV 2013-12-12 20:23:41 UTC
/etc/cron.hourly/0yum-hourly.cron:

Loaded plugins: fastestmirror, post-transaction-actions, priorities,
              : protectbase, remove-with-leaves, rpm-warm-cache, versionlock
Loading mirror speeds from cached hostfile
 * fedora: ftp.freepark.org
 * rpmfusion-free: ftp-stud.hs-esslingen.de
 * rpmfusion-free-updates: ftp-stud.hs-esslingen.de
 * rpmfusion-nonfree: ftp-stud.hs-esslingen.de
 * rpmfusion-nonfree-updates: ftp-stud.hs-esslingen.de
 * updates: ftp.freepark.org
0 packages excluded due to repository protections
Traceback (most recent call last):
  File "/usr/sbin/yum-cron", line 1154, in <module>
    main()
  File "/usr/sbin/yum-cron", line 1151, in main
    base.updatesCheck()
  File "/usr/sbin/yum-cron", line 1073, in updatesCheck
    self.installUpdates(self.opts.update_messages)
  File "/usr/sbin/yum-cron", line 989, in installUpdates
    self.emitInstalling()
  File "/usr/sbin/yum-cron", line 1099, in emitInstalling
    map(lambda x: x.updatesInstalling(self.tsInfo), self.emitters)
  File "/usr/sbin/yum-cron", line 1099, in <lambda>
    map(lambda x: x.updatesInstalling(self.tsInfo), self.emitters)
  File "/usr/sbin/yum-cron", line 73, in updatesInstalling
    self.output.append(self._formatTransaction(tsInfo))
  File "/usr/sbin/yum-cron", line 429, in _formatTransaction
    ninstalled = self.tsInfo.installed
AttributeError: 'EmailEmitter' object has no attribute 'tsInfo'

yum-cron-3.4.3-120.fc19.noarch

Comment 3 Eero TORRI 2013-12-13 08:26:57 UTC
in /usr/sbin/yum-cron at line 429:

self.tsInfo should perhaps just be tsInfo

later at line 431:

self.conf does not exist. Perhaps it should be self.opts (YumCronConfig) but that again does not have group_command attribute.

Comment 4 Zdeněk Pavlas 2013-12-13 09:35:25 UTC
Thanks for investigating, but it's not a simple typo..  The code is copied from yum and assumes self is a YumBase instance, but here it's UpdateEmitter.  yum-cron should use the code already in yum.

http://lists.baseurl.org/pipermail/yum-devel/2013-December/010454.html

Comment 5 Fedora Update System 2013-12-13 15:48:44 UTC
yum-3.4.3-122.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/yum-3.4.3-122.fc20

Comment 6 Fedora Update System 2013-12-13 17:56:44 UTC
Package yum-3.4.3-122.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing yum-3.4.3-122.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2013-23343/yum-3.4.3-122.fc20
then log in and leave karma (feedback).

Comment 7 Etienne CHAMPETIER 2013-12-14 17:33:12 UTC
Hi,

what about yum-3.4.3-122 for fedora 19?

thanks in advance

Comment 8 Fedora Update System 2013-12-16 07:09:39 UTC
yum-3.4.3-122.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 GV 2013-12-16 07:18:18 UTC
Closed? Really?

Last time I check _F19_ still has this problem and yum-cron does not install anything anymore. I have to run yum update manually each time new packages are available.

Comment 10 Etienne CHAMPETIER 2013-12-16 07:25:01 UTC
The bug report is about fedora 19 and yum-cron-3.4.3-120.fc19.noarch,
please push yum-cron-3.4.3-122.fc19.noarch to fedora 19 repo
(it's great to fix F20 but bug isn't closed)

Comment 11 Fedora Update System 2013-12-16 07:49:50 UTC
yum-3.4.3-122.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/yum-3.4.3-122.fc19

Comment 12 Zdeněk Pavlas 2013-12-16 14:16:09 UTC
*** Bug 1040986 has been marked as a duplicate of this bug. ***

Comment 13 Fedora Update System 2013-12-19 07:19:06 UTC
yum-3.4.3-122.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Bill McGonigle 2013-12-24 20:07:41 UTC
So, yum-cron still fails, with the same error on a machine that uses yum-cron since this update was pushed out.  I don't mean to express surprise, but I left an affected machine as-is just to verify, and yum still can't download the update.  The last 3 lines of this machine's yum.log are:

Dec 11 03:41:53 Updated: yum-cron.noarch 3.4.3-120.fc19
Dec 11 03:41:53 Updated: dosfstools.x86_64 3.0.22-3.fc19
Dec 11 03:41:54 Updated: nspr.x86_64 4.10.2-1.fc19

I believe that anybody who relies on yum-cron for f19 is effectively now without updates without manual intervention.  Is this correct?  If so, we should probably work to notify people, who will otherwise miss security updates they might expect to have working.

I figured I'd ask here, in case I'm missing something, before working up the chain.

Comment 15 Reilly Hall 2013-12-25 16:01:59 UTC
Looks like you still have the old version of yum-cron-3.4.3-120 installed from the last time the 3.4.3-99 updated itself.

To fix things for yourself you will need to do a manual yum update.

I might even go so far as to suggest a:

# yum clean all; yum check-update

to verify a newer version of yum-cron shows up in the list of available updates before attempting to perform the update just to verify.  Unfortunately this isn't a problem that will auto resolve itself with the release of a fixed yum-cron because the bad yum-cron has already been installed and cannot update anything including itself.  So yes, manual intervention is required on all systems where the user/sysadmin has been relying on yum-cron to do the updating.

Looks li(In reply to Bill McGonigle from comment #14)
> So, yum-cron still fails, with the same error on a machine that uses
> yum-cron since this update was pushed out.  I don't mean to express
> surprise, but I left an affected machine as-is just to verify, and yum still
> can't download the update.  The last 3 lines of this machine's yum.log are:
> 
> Dec 11 03:41:53 Updated: yum-cron.noarch 3.4.3-120.fc19
> Dec 11 03:41:53 Updated: dosfstools.x86_64 3.0.22-3.fc19
> Dec 11 03:41:54 Updated: nspr.x86_64 4.10.2-1.fc19
> 
> I believe that anybody who relies on yum-cron for f19 is effectively now
> without updates without manual intervention.  Is this correct?  If so, we
> should probably work to notify people, who will otherwise miss security
> updates they might expect to have working.
> 
> I figured I'd ask here, in case I'm missing something, before working up the
> chain.

Comment 16 Zdeněk Pavlas 2014-01-08 16:25:17 UTC
Yes, it's bad, and some kind of warning or announcement is due... But yum-cron is (AFAIK) not installed by default.  I'd assume that people that have installed yum-cron (with yum, dnf or packagekit) will use the same tool more than just once, and therefore will install an update.