satellite server 5.3 upgrade script update-5.3.0-packages, returns python traceback with no such file or directory

Solution Verified - Updated -

Environment

  • Satellite Server 5.3
  • Upgrade
  • Customised symlinks to RPMs

Issue

When issuing the command update-5.3.0-packages sctipt is unable to set permissions due to missing file or directories:

# /usr/bin/update-5.3.0-packages --db=rhnsat/rhnsat@rhnsat --debug
Connecting to rhnsat/rhnsat@rhnsat
   ...
   os.chmod(root + '/' + name, 0644)
OSError:
[Errno 2] No such file or directory:
'/var/satellite/rhn/kickstart/ks-rhel-i386-client-5/VT/Virtualization-as-IN-5.0.0-7.noarch.rpm'

Resolution

  1. To update the symlinks to point to the new location
  2. To rerun the update-5.3.0-packages script to find the packages in the new location

Root Cause

  • After the upgrade the packages are moved to the new path and the script update-5.3.0-packages is following customised symlinks to the old location is run, as the script is following

Diagnostic Steps

  • When issuing the command update-5.3.0-packages a python backtrace is returned with the following:
     # /usr/bin/update-5.3.0-packages --db=rhnsat/rhnsat@rhnsat --debug
     Connecting to rhnsat/rhnsat@rhnsat
        ________________________________________
     standby: ######################################## - Complete!
     Transaction Committed!
     Traceback (most recent call last):
      File "/usr/bin/update-5.3.0-packages", line 101, in ?
        sys.exit(abs(main() or 0))
      File "/usr/bin/update-5.3.0-packages", line 91, in main
        return update530Packages.main()
      File "/usr/share/rhn/satellite_tools/update530Packages.py", line 77, in main
        process_kickstart_trees()
      File "/usr/share/rhn/satellite_tools/update530Packages.py", line 232, in process_kickstart_trees
        os.chmod(root + '/' + name, 0644)
     OSError:
     [Errno 2] No such file or directory:
     '/var/satellite/rhn/kickstart/ks-rhel-i386-client-5/VT/Virtualization-as-IN-5.0.0-7.noarch.rpm'

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments