Bug 984288 - [abrt] fedup-0.7.3-4.fc18: util.py:48:rm_f:NameError: global name 'log' is not defined
[abrt] fedup-0.7.3-4.fc18: util.py:48:rm_f:NameError: global name 'log' is no...
Status: CLOSED DUPLICATE of bug 966841
Product: Fedora
Classification: Fedora
Component: fedup (Show other bugs)
19
i686 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Will Woods
Fedora Extras Quality Assurance
abrt_hash:6f8ba3b1361d200e7dc3cae1de1...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-14 09:55 EDT by alberto
Modified: 2013-10-03 21:02 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-03 21:02:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (834 bytes, text/plain)
2013-07-14 09:55 EDT, alberto
no flags Details
File: core_backtrace (565 bytes, text/plain)
2013-07-14 09:55 EDT, alberto
no flags Details
File: environ (3.12 KB, text/plain)
2013-07-14 09:55 EDT, alberto
no flags Details

  None (edit)
Description alberto 2013-07-14 09:55:00 EDT
Version-Release number of selected component:
fedup-0.7.3-4.fc18

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python /usr/bin/fedup --clean
executable:     /usr/bin/fedup
kernel:         3.9.5-301.fc19.i686
runlevel:       N 5
uid:            0

Truncated backtrace:
util.py:48:rm_f:NameError: global name 'log' is not defined

Traceback (most recent call last):
  File "/usr/bin/fedup", line 181, in <module>
    main(args)
  File "/usr/bin/fedup", line 82, in main
    do_cleanup(args)
  File "/usr/lib/python2.7/site-packages/fedup/commandline.py", line 185, in do_cleanup
    misc_cleanup()
  File "/usr/lib/python2.7/site-packages/fedup/sysprep.py", line 202, in misc_cleanup
    rm_rf(d)
  File "/usr/lib/python2.7/site-packages/fedup/util.py", line 51, in rm_rf
    rm_f(d, rm=rmtree)
  File "/usr/lib/python2.7/site-packages/fedup/util.py", line 48, in rm_f
    log.warn("failed to remove %s: %s", f, str(e))
NameError: global name 'log' is not defined

Local variables in innermost frame:
rm: <function rmtree at 0xa0b0bc4>
e: OSError(16, 'Device or resource busy')
f: '/system-upgrade-root'
Comment 1 alberto 2013-07-14 09:55:10 EDT
Created attachment 773321 [details]
File: backtrace
Comment 2 alberto 2013-07-14 09:55:18 EDT
Created attachment 773322 [details]
File: core_backtrace
Comment 3 alberto 2013-07-14 09:55:25 EDT
Created attachment 773323 [details]
File: environ
Comment 4 Sergio Monteiro Basto 2013-07-23 00:24:11 EDT
Description of problem:
fedup --clean
after upgrade to F19

Version-Release number of selected component:
fedup-0.7.3-4.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        /usr/bin/python /bin/fedup --clean
executable:     /bin/fedup
kernel:         3.9.9-302.fc19.x86_64
runlevel:       N 5
uid:            0

Truncated backtrace:
util.py:48:rm_f:NameError: global name 'log' is not defined

Traceback (most recent call last):
  File "/bin/fedup", line 181, in <module>
    main(args)
  File "/bin/fedup", line 82, in main
    do_cleanup(args)
  File "/usr/lib/python2.7/site-packages/fedup/commandline.py", line 183, in do_cleanup
    remove_cache()
  File "/usr/lib/python2.7/site-packages/fedup/sysprep.py", line 195, in remove_cache
    rm_rf(d)
  File "/usr/lib/python2.7/site-packages/fedup/util.py", line 51, in rm_rf
    rm_f(d, rm=rmtree)
  File "/usr/lib/python2.7/site-packages/fedup/util.py", line 48, in rm_f
    log.warn("failed to remove %s: %s", f, str(e))
NameError: global name 'log' is not defined

Local variables in innermost frame:
rm: <function rmtree at 0x101e500>
e: OSError('Cannot call rmtree on a symbolic link',)
f: '/var/tmp/fedora-upgrade'
Comment 5 Dmitry S. Makovey 2013-08-13 15:47:03 EDT
same issue here: F18 -> F19 via fedup ends up with:

[     1.051] (II) fedup.sysprep:misc_cleanup() removing symlink /system-upgrade
[     1.051] (II) fedup:<module>() Exception:
Traceback (most recent call last):
  File "/usr/bin/fedup-cli", line 181, in <module>
    main(args)
  File "/usr/bin/fedup-cli", line 82, in main
    do_cleanup(args)
  File "/usr/lib/python2.7/site-packages/fedup/commandline.py", line 185, in do_cleanup
    misc_cleanup()
  File "/usr/lib/python2.7/site-packages/fedup/sysprep.py", line 199, in misc_cleanup
    rm_f(upgradelink)
  File "/usr/lib/python2.7/site-packages/fedup/util.py", line 48, in rm_f
    log.warn("failed to remove %s: %s", f, str(e))
NameError: global name 'log' is not defined
[     1.053] (II) fedup:<module>() /usr/bin/fedup-cli exiting at Tue Aug 13 13:28:46 2013

# rpm -q fedup             
fedup-0.7.3-4.fc18.noarch
Comment 6 Dmitry S. Makovey 2013-08-13 17:03:16 EDT
fixing fedup (/usr/lib/python2.7/site-packages/fedup/util.py) a bit with :
...
import logging
log = logging.getLogger(__package__+".util")
...

I got more meaningful errors:

# grep -F '(WW)' /var/log/fedup.log
[     0.930] (WW) fedup.util:rm_f() failed to remove /system-upgrade: [Errno 30] Read-only file system: '/system-upgrade'
[     0.930] (WW) fedup.util:rm_f() failed to remove /system-upgrade-root: [Errno 30] Read-only file system: '/system-upgrade-root'


system is running with LVM over Crypt-LUKS: /dev/sda1 - /boot /dev/sda2 - LUKS/PV 

it may have been related to bug #968540 except my system was fresh-installed F18 and all the rd.luks.uuid and rd.lvm.lv are present for the fedup image. Mine complains about Read-only filesystem.
Comment 7 Sergio Monteiro Basto 2013-10-03 21:02:11 EDT

*** This bug has been marked as a duplicate of bug 966841 ***

Note You need to log in before you can comment on or make changes to this bug.