[Spacewalk-list] RHEL 6.x repository not syncing from parentchannel

Daryl Rose darylrose at outlook.com
Mon Dec 19 15:00:06 UTC 2016


Robert,


The URL came from the /etc/yum.repos.d/redhat.repo. redhat.repo, which is created when registering to Red Hat.   The path in question is created when I run the spacewalk-repo-sync command.  I've removed that particular path several times, modified the URL and every time I run the spacewalk-repo-sync command, the directory in question get recreated.


I do know that there is a difference between the original reposync directory and the new reposync directory.


This is the content of the reposync directory on the original server:


[root]# cd /var/cache/rhn/reposync

[root reposync]# ls -l
total 104
drwxr-xr-x. 3 root root 4096 Oct 12 11:18 centos-7-extra
drwxr-xr-x. 3 root root 4096 Nov  8 21:00 centos-7-updae
drwxr-xr-x. 3 root root 4096 Aug 24 12:10 centos_7_channel
drwxr-xr-x. 3 root root 4096 Aug 29 13:10 centos_7_plus
drwxr-xr-x. 3 root root 4096 Dec  9 14:03 rhel-6-server-rpms
drwxr-xr-x. 3 root root 4096 Aug 23 18:00 sles11-sp3-pool
drwxr-xr-x. 3 root root 4096 Aug 23 19:00 sles11-sp3-pool-x86
drwxr-xr-x. 3 root root 4096 Nov  8 18:01 sles11-sp3-update
drwxr-xr-x. 3 root root 4096 Dec  8 19:00 sles11-sp3-update-pool-x86
drwxr-xr-x. 3 root root 4096 Aug 23 20:00 sles11-sp4-pool
drwxr-xr-x. 3 root root 4096 Nov  8 20:00 sles11-sp4-update



This is the contents of the reposync directory on the new server:


[root]# cd /var/cache/rhn/reposync

[root reposync]# ls -l
total 71328
drwxr-xr-x. 3 root root     4096 Dec 18 17:00 centos_7_centosplus_x86_64_
drwxr-xr-x. 3 root root     4096 Dec 18 18:00 centos_7_extras_x86_64_
drwxr-xr-x. 3 root root     4096 Dec 18 17:30 centos_7_os_x86_64_
drwxr-xr-x. 3 root root     4096 Dec 18 18:30 centos_7_updates_x86_64_
drwxr-xr-x. 3 root root     4096 Dec 15 15:38 content_dist_rhel_server_6_$releasever_$basearch_os
drwxr-xr-x. 3 root root     4096 Dec 18 20:30 repo_$RCE_SLES11-SP3-Pool_sle-11-i586
drwxr-xr-x. 3 root root     4096 Dec 18 19:30 repo_$RCE_SLES11-SP3-Pool_sle-11-x86_64
drwxr-xr-x. 3 root root     4096 Dec 18 21:00 repo_$RCE_SLES11-SP3-Updates_sle-11-i586
drwxr-xr-x. 3 root root     4096 Dec 18 20:00 repo_$RCE_SLES11-SP3-Updates_sle-11-x86_64
drwxr-xr-x. 3 root root     4096 Dec 18 21:30 repo_$RCE_SLES11-SP4-Pool_sle-11-x86_64
drwxr-xr-x. 3 root root     4096 Dec 18 22:00 repo_$RCE_SLES11-SP4-Updates_sle-11-x86_64


Notice the difference in the sub-directories?  The original server was SW v2.5, the new server is SW v2.6.  I'm assuming that the spacewalk-repo-sync command changed the way the sub-directories were created.  However these are created shouldn't make any difference, because they all work, except the Red Hat repo.


The path is correct.  The issue is that repomd.xml and additional content is not created when the sub-directory "content_dist_rhel_server_6_$releasever_$basearch_os" is created, and I have no idea how the contents is created.


The error message saying to check the path is not correct. The path is correct, its just the contents is not there.


Daryl


________________________________
From: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> on behalf of Robert Paschedag <robert.paschedag at web.de>
Sent: Friday, December 16, 2016 9:37 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel

It says... The path is wrong. So what did you put into the URL line?????



Am 16.12.2016 15:50 schrieb Daryl Rose <darylrose at outlook.com>:

So, today I decided to create a new RHEL 6 channel and repo and then run the "spacewalk-repo-sync" command and see if I can't get this repo to populate with packages from Red Hat.  The same error occurred.


ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: content_dist_rhel_server_6_6Server_x86_64_os_. Please verify its path and try again


This tells me that there isn't anything corrupt.  I'm really think that I missed something in the configuration or setup of the new server.


When I setup the original server, v2.3, I'm thinking there were some additional steps that I had to do once I registered the server to Red Hat.  I've been reviewing the installation instructions, but I don't see anything extra that I missed. In the SW, v2.6, installation instructions, all I see is to make sure that the server is properly registered to the appropriate channel:



Red Hat Optional Server (Red Hat Enterprise Linux)

When using Red Hat Enterprise Linux 6 or 7, make sure you are subscribed to the appropriate Red Hat Optional Server channel:

Red Hat Optional Server 6 , OR
Red Hat Optional Server 7



The server is properly registered and entitled.  I can run a yum repolist and see the repository.  I can issue the subscription-manager command and see that the server is subscribed and I can see what repos are enabled.  But for some reason, that is not getting passed onto the Spacewalk repo.


I tried opening a ticket with Red Hat just so I could verify that everything was registered correctly, but since I don't have a satellite subscription, they closed the ticket without even answering my question.


I've run out of idea's.  If someone can give me more suggestions, I'm willing to listen.


Thanks


Daryl



________________________________
From: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> on behalf of Robert Paschedag <robert.paschedag at web.de>
Sent: Friday, December 16, 2016 12:44 AM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel

Oh... Just saw that the checksum error occurs when run on a "client"..



Am 15.12.2016 22:48 schrieb Daryl Rose <darylrose at outlook.com>:

One more thought....


What would happen if I were to delete the current RHEL channel and repository and recreate them?  What will happen to all of the packages and clients currently registered to the channel/repo?  I know that the packages will become orphan, but can I put them back into the new repo, or do I just have to remove them and re-download them from Red Hat?  How about the registered clients?   Do I have to re-register them, or if I keep the same activation key, the same channel/repo names, will they just pickup the change?


Thanks


Daryl


________________________________
From: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> on behalf of Daryl Rose <darylrose at outlook.com>
Sent: Thursday, December 15, 2016 2:59 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel


Hello Chris,


Thank you for the following steps.  I think this resolved this immanent issue, but the issue of not being able to sync from the parent Red Hat repository is still an issue.


Do you know how the contents of ./cache/rhn/reposync are created?  As a work around, I copied the contents of reposync from the original server to the new server, and I'm able to sync from the Red Hat repository, but that is not a long term solution.


I thought that perhaps I had found a solution.  Yum can access the repository just fine so I copied the contents from /var/cache/yum/x86_64/6Server/rhel-6-server-rpms to the reposync directory.  It started off just fine, but eventually failing due to not being able to find some keys.  Actually the keys were generated, but they were of zero length and that won't work.


It seems to be obvious that there is something else wrong with my installation, I just don't know what it is. If you, or anyone else have any thoughts are suggestion, I'm willing to take a look and give it a try.


Thank you.


Daryl

________________________________
From: spacewalk-list-bounces at redhat.com <spacewalk-list-bounces at redhat.com> on behalf of Snyder, Chris <Chris.Snyder at csra.com>
Sent: Wednesday, December 14, 2016 7:07 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel


The “metadata ….” Error indicates that your yum cache (provided by the Spacewalk server) is out of with what is actually available through the Spacewalk package database.  This can be because taskomatic isn’t running or there’s a problem somewhere.  Check your logs under /var/log/rhn/ for any issues with taskomatic or any other components.



However, I’ve run into this before and I do the following to get around it (NOTE: your paths will probably be different than mine):



# Blow away all cached metadata

rm -fr /data/pkg/cache/rhn/repodata/



# restart spacewalk so empty repodata cache directory is recreated.

spacewalk-service stop

spacewalk-service start



# If not already, cache credentials for spacecmd (This assumes you have configured ~/.spacecmd/config previously)

spacecmd softwarechannel_list



# Regenerate repo data for all channels

for i in `spacecmd softwarechannel_list`; do spacecmd softwarechannel_regenerateyumcache $i; done



# Waited a few minutes for data to regenerate



Once that’s done and the metadata caches are updated (you’ll see updated directories under the cache dir and you should see info in the taskomatic logs), go to each registered spacewalk client and run



yum clean all



If this doesn’t work, I would have to say that you’ve got something else wrong somewhere else.



Good luck.



From: spacewalk-list-bounces at redhat.com [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Daryl Rose
Sent: Wednesday, December 14, 2016 5:58 PM
To: spacewalk-list at redhat.com
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel



Hello everyone,



I have not received any replies from my previous posting, so I thought that I would post an update hoping someone would see it and reply.



This error seems to go deeper than just syncing from Red Hat.  Server that are currently registered to the Spacewalk server are not able to access the RHEL repository on SW.  If issuing the "yum update" command, we receive the error:



Error: failed to retrieve repodata/primary.xml.gz from rhel-6-server-rpms

error was [Errno -1] Metadata file does not match checksum



If I issue the "yum repolist" command, I only see "0" for packages.



So, this issue is larger that what I initially thought. Anyone have any thoughts or idea's?



Daryl

________________________________

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> <spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>> on behalf of Daryl Rose <darylrose at outlook.com<mailto:darylrose at outlook.com>>
Sent: Friday, December 9, 2016 2:56 PM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel



So,  I resurrected the old server from the grave and copied the contents of "/var/cach/rhn/reposync/rhel-6-server-rpms" to "/var/cach/rhn/reposync/content_dist_rhel_server_6_$releasever_$basearch_os" and ran a sync.  The sync worked.



The sync worked, but it caused a new error.  A team member registered a Red Hat server just after I made these changes.  The server registered, but  with the following error:



Bad id for repo: logstash 5.x, byte =   8



I'm guessing that something within the data that I copied over does not align with the repository on SW?



Another thing that I noticed is that the directory structure in the old reposync directory is different than the new server.  For example:



OLD:

/var/cache/rhn/reposync/centos-7-extra

/centos-7-server-rpms

/centos-7-updae

/centos_7_channel

/centos_7_plus



NEW:

/var/cache/rhn/reposync/centos_7_centosplus_x86_64_

/centos_7_extras_x86_64_

/centos_7_os_x86_64_

/centos_7_updates_x86_64_



Is that a SW v2.3 vs. v2.6 change?



Thanks



Daryl



________________________________

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> <spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>> on behalf of Daryl Rose <darylrose at outlook.com<mailto:darylrose at outlook.com>>
Sent: Thursday, December 8, 2016 10:32 AM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel



More questions:



When I run "spacewalk-repo-sync --channel=rhel-6-server-rpms",  I get the error:



ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: content_dist_rhel_server_6_$releasever_$basearch_os. Please verify its path and try again

What creates the content in "/var/cache/rhn/reposync/content_dist_rhel_server_6_$releasever_$basearch_os"?



All of the other channels that I created all have "cachecookie, packages, primary.xml.gz, primary.xml.gz.sqlite, repomd.xml and updateinfo.xml.gz".



There must be a process that creates this content, but what, I'm not sure.  How can I manually create this content?



Thanks



Daryl



________________________________

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> <spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>> on behalf of Daryl Rose <darylrose at outlook.com<mailto:darylrose at outlook.com>>
Sent: Thursday, December 8, 2016 9:26 AM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel



Quick update.



Poking around on Red Hat I found a doc that suggested that I look at the  name in /etc/sysconfig/network and ensure that the hostname is FQDN and then run "spacewalk-hostname-rename".   Host name was not FQDN, so I renamed it, but because I use a signed cert, will running spacewalk-hostname-rename cause a problem with that cert?



Thanks



Daryl



________________________________

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> <spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>> on behalf of Daryl Rose <darylrose at outlook.com<mailto:darylrose at outlook.com>>
Sent: Thursday, December 8, 2016 8:55 AM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel



Robert,



Yes, the server is registered and has an active subscription with Red Hat.  As a matter of fact, I just now re-registered to make sure that all is good.   I can see from the command line subscription manager that the server is subscribed, and I confirmed that it is entitled.



I use a "signed" cert so I'm wondering if the signed cert has something to do with this?  However, I found a troubleshooting document on Red Hat that verifies that I am entitled and using the certificate provided by Red Hat to communicate back to them.



Thank you



Daryl

________________________________

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> <spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>> on behalf of Robert Paschedag <robert.paschedag at web.de<mailto:robert.paschedag at web.de>>
Sent: Wednesday, December 7, 2016 11:48 PM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel



I think you should check your entitlements. But I also don't know, how you could "manually" connect to the repo (with username/password or token inline in URL).

Is your server listed as entitled within your RedHat account?

________________________________

Von: Daryl Rose<mailto:darylrose at outlook.com>
Gesendet: ‎06.‎12.‎2016 17:26
An: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Betreff: Re: [Spacewalk-list] RHEL 6.x repository not syncing from parentchannel

I decided to try the sync from the command line.  This time I received an error:



ERROR: Cannot retrieve repository metadata (repomd.xml) for repository: content_dist_rhel_server_6_6Server_x86_64_os_. Please verify its path and try again



The path came out of the redhat.repo file that came from Red Hat when I registered the server.  Its the same path that was used on the previous server.



Any suggestions?



Thank you.



Daryl



________________________________

From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> <spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com>> on behalf of Daryl Rose <darylrose at outlook.com<mailto:darylrose at outlook.com>>
Sent: Monday, December 5, 2016 3:00 PM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: [Spacewalk-list] RHEL 6.x repository not syncing from parent channel



I just realized that the last Red Hat errata for RHEL 6.x is from August.  I looked at the sync logs and it doesn't appear that anything is syncing at all from the RHEL channel.



I just recently migrated to a physical server.  I successfully registered the server and attached an entitlement to the server.  If I run "yum update" on the server, it lists latest updates from the RHEL channel.



This is what I see in the reposync log:



2016/12/05 14:49:42 -05:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'rhel-6-server-rpms', '--type', 'yum']

2016/12/05 14:49:42 -05:00 Sync of channel started.

2016/12/05 14:49:42 -05:00 Repo URL: https:<rhel 6 rpm channel>

2016/12/05 14:49:42 -05:00 Sync of channel completed in 0:00:00.



If I haven't received any syncs since August, then this broke long before I migrated to the physical server.



Any thoughts?



Daryl




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20161219/05167030/attachment.htm>


More information about the Spacewalk-list mailing list