7 Replies Latest reply: Jan 30, 2013 9:48 PM by User512658 -Oracle RSS

    Repo Mirror script errors

    964667
      Setting up a local repo of the non-public yum server. When I first ran the script provide at http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/167283.sh I don't recall any errors however I can not say this with certainty.

      Afterwards I tried to do a yum update of my repo server and that looked like it attempted to hit every channel the server is subscribed to incuding el4.X el5.X and el6.X. To get around this I created a Base-ULN.repo file in /etc/yum.repos.d to point at my local mirror (itself) I then reran yum update without any errors. However subsequent runs of the mirror script now throws errors for each channels as below. If anyone can shed some light on this I would appreciate it.

      Writing header.info file
      ## END PROCESSING el5_i386_addons ##
      ## BEGIN PROCESSING el5_x86_64_addons ##
      Channel Dir: /var/www/html/yum/EnterpriseLinux/EL5/addons/x86_64
      Loaded plugins: refresh-packagekit
      Traceback (most recent call last):
      File "/usr/bin/reposync", line 352, in <module>
      main()
      File "/usr/bin/reposync", line 349, in main
      sys.exit(exit_code)
      UnboundLocalError: local variable 'exit_code' referenced before assignment
      117/117 - getPackage/VirtualBox-4.1-4.1.22_80657_el5-1.x86_64.rpm
      Saving Primary metadata
      Saving file lists metadata
      Saving other metadata
      Generating sqlite DBs
      Sqlite DBs complete
      Digesting rpms 100 % complete: VirtualBox-4.1-4.1.22_80657_el5-1.x86_64.rpm
      Total: 117
      Used: 117
      Src: 0

      Edited by: 961664 on Oct 3, 2012 10:41 AM
        • 1. Re: Repo Mirror script errors
          Avi Miller-Oracle
          961664 wrote:
          Afterwards I tried to do a yum update of my repo server and that looked like it attempted to hit every channel the server is subscribed to incuding el4.X el5.X and el6.X. To get around this I created a Base-ULN.repo file in /etc/yum.repos.d to point at my local mirror (itself)
          You need to disable and enable channels when you update the local yum system. On mine, I have the same setup, but all of my local repos are set to enabled=0 (so that the mirror script doesn't try to mirror itself). Then, when I want to upgrade the yum server itself, I run:
          # yum upgrade --disablerepo=* --enablerepo=local-ol6_x86_64_latest 
          That disables all the repositories that are connected via ULN, but re-enables the local OL6 copy. Note that you must have different repo names for the local repositories to the ones that come from ULN.

          See if that helps you out.
          • 2. Re: Repo Mirror script errors
            964667
            That works as far as updating the local system but I'm still getting the error above when running the mirror script to download all of my subscribed channels for local systems to update from.
            • 3. Re: Repo Mirror script errors
              Avi Miller-Oracle
              961664 wrote:
              That works as far as updating the local system but I'm still getting the error above when running the mirror script to download all of my subscribed channels for local systems to update from.
              I suspect that given your previous run with the wrong repos installed, you've managed to get the wrong packages installed, i.e. an ol4, ol6 or ovm package on ol5. Can you do an rpm -qa and look for packages with a version that doesn't match your base distro? You may have to manually clean this up, unfortunately.
              • 4. Re: Repo Mirror script errors
                964667
                I'm not seeing anything that looks out of place

                [root@localhsot ~]# rpm -qa | grep el5
                [root@localhost ~]# rpm -qa | grep el4
                [root@ocalhost ~]# rpm -qa | grep ol4
                [root@ocalhost ~]# rpm -qa | grep ol5

                I never actually installed any updates from the other repos the yum command failed long before that phase.

                Edited by: 961664 on Oct 3, 2012 2:36 PM
                • 5. Re: Repo Mirror script errors
                  Avi Miller-Oracle
                  Brian Bray wrote:
                  I'm not seeing anything that looks out of place
                  Ok, that's exhausted my ideas. :) If you have Oracle Linux support, please open an SR for this. If not, please email uln-info_us@oracle.com with your error so that the guys that manage ULN and the mirror script can take a look?
                  • 6. Re: Repo Mirror script errors
                    User512658 -Oracle
                    Hi Brian,

                    I just saw your post. I bet you already opened a SR, but if you didn't I had the same problem.

                    Anyway, a long time ago, I went into /etc/yum/pluginconf.d/
                    I edited rhnplugin.conf

                    This is the original
                    [main]
                    enabled = 1
                    gpgcheck = 1

                    This is mine
                    [main]
                    enabled = 0
                    gpgcheck = 1

                    The reason was I wanted to update the yum repo box with the latest patches against the local repo that I had used the script to create.
                    I never wrote the file back to turn on the plugin after I updated the box.

                    I hope this helps someone.
                    • 7. Re: Repo Mirror script errors
                      User512658 -Oracle
                      Hi,

                      Should be a little more clear.
                      The original is the one you want to use.
                      Make sure enabled = 1
                      is in there.

                      Sorry if I confused anybody.