-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHEL 7 support #27
Comments
The weird thing are the last 2 lines: INFO: Detected architecture 'x86_64' for channel 'rhel7-x86_64' As you can see (and configured), the channel name is rhel7-x86_64 (and that is found on spacewalk, since the architecture is detected), but then it says "Listing all packages in rhel7-x86", which is another channel name (and a wrong one ...). But: your error is in channel.software.listErrata, meaning lower in the code (but I don't see the line "Listing all errata in ..." in your logs here) |
Sorry I didn´t show the whole log messages. See below or the attached logfile with the debug option. /opt/spacewalk_scripts-master/ya-errata-import.pl --server 127.0.0.1 --channel rhel7-x86_64 --os-version 7 --publish --redhat --redhat-channel=rhel-x86_64-server-7 --startfromprevious month INFO: No errata found, nothing will happen I changed nothing on the code, so I use your original version. Regards & Thanks for you help |
Do you have a EL7 subscription with redhat? |
I have a few RHEL subscriptions. Are there spezial subscriptions for EL7 ? Where can i check that ? Does the errata import for RHEL7 work for you ? |
Sorry i didn´t want to close the issue. Here my remarks again. |
I'm still on EL6 so I can't tell you the EL7 name (and no EL7 subscriptions yet). |
Do you plan to test the scripts with EL7 in the furture ? I still didn´t find a possiblity to import the errata for EL7 in spacewalk |
Guys, good morning. Just one comment, the subscription is the same, when you buy a subscription, you can use EL5, EL6 or EL7. About script, I'm really without time to test, but asap I'll try. Take Care |
I am running into the same error when trying to clone red hat errata. Yes I have red hat subscriptions and have registered rhel 5, rhel 6, and rhel 7 hosts. No such error occurs with the CentOS channels. INFO: Architecture is not specified, will try to determine it based on the channel properties of 'rhel-7-base-x86_64' INFO: No errata found, nothing will happen INFO: Setting the OS variant to Redhat, if this is wrong please remove the --redhat option INFO: No errata found, nothing will happen |
Hello everyone, are there news reagarding my issue ? Regards, |
@obsti, I got this from @jjperry69:
This API call does not return any suitable channel for RHEL7. I guess this is because redhat is moving away from RHN and starts using the RHSM with the introduction of RHEL7. According to this article click there is no real API for RHSM available yet... |
I just tried it, and the perl script can return redhat channels just fine for xmlrpc.rhn.redhat.com too, so I'll add the list of redhat channels found in the debug output (is on github now, script version 20160401).
should be sufficient to connect to the newer rhsm and get the erratas ... |
Hello everyone, I tested the new version with the rhn server option --rhn-server=xmlrpc.rhn.redhat.com /opt/spacewalk_scripts-master/ya-errata-import.pl --server 127.0.0.1 --channel rhel7-x86_64 --rhn-server=xmlrpc.rhn.redhat.com --os-version 7 --publish --redhat --rhn-proxy=XXXXX --redhat-channel=rhel-x86_64-server-7 --startfromprevious month --debug INFO: Getting erratas from date 2016-03-25 09:11:27 till now Regards, |
We've got the same issue, with the RHEL7 channels not being displayed, even when using xmlrpc.rhn.redhat.com authenticating with an account that does have live EL7 subscriptions. Is this just because the xmlrpc API for RHEL7 is deprecated? |
Any solution to this? |
Just found this script. This looked like it would solve my errata issue with RHEL6 and RHEL7 and Spacewalk but I also am receiving the "No such channel" error when attempting to obtain RHEL7 errata. Any word on if the XMLRPC API for RHEL6 will continue to function after July 2017 when RHN Classic is retired? |
I have been using reposync to create a local mirror of RHEL 6&7 on a RHEL 7 machine. |
I've used that method before as well. I don't have any issues creating a local mirror (actually using dtmrepo) but I'd like the get the errata too. |
I'm able to get Erratas using the above method. Reposync gets the updateinfo file which has all the Erratas. |
The process I have been using now works quite well and pulls the errata as
well. It depends on having those directories created in $BASE. The
directory names match the Red Hat repo names. It is based on a process I
found after doing a lot of reading on various sites.
It doesn't address the my original post on pulling the channel names from
Red Hat, though. If you know the names then the script runs quite nicely
including pulling in the errata.
What you do need to have to pull for other RHEL versions is a repo made in
/etc/yum.repos.d that defines all of the channels. The channels shouldn't
be enabled if you are not running that OS version and reposync doesn't need
them enabled either to do its' work. I pulled mine from installed the
target version from the RH DVD on their site, registering the host and
pulling the repo file.
The key here is taking getting the updateinfo.xml.gz file into the repodata
directory in the repo created from the reposync pull. Then it is linked
into the repo so the errata data is available.
#!/bin/bash
#
# Sync Script to handle replicating Red Hat repos locally with errata
# This is designed to replace the manual steps of rhnpush and running an
errata
# sync script for Red Hat repos since that meta data can be pulled
# Variables
BASE="/iso_in" # Base for staging rhel repos
export PATH=$PATH:/usr/bin
GLOB="rhel-*"
DEBUG=1
REPOSYNC="/usr/bin/reposync"
REPOSYNC_OPTS="-l -m "
SPREPOSYNC="/usr/bin/spacewalk-repo-sync"
CREATEREPO="/usr/bin/createrepo --workers=6"
MODREPO="/usr/bin/modifyrepo"
GZIP="/bin/gzip"
# Loop through repos to get set to do spacealk-repo-sync
# The spacewalk-repo-sync will be a separate loop
for each in $repo_path
do
repo=`basename $each`
dwnpath=`echo ${each%$repo}`
echo ""
echo "Syncing Repo: $repo"
if [ $DEBUG -gt 1 ]; then
echo "Removing any $each/*xml.gz $each/comps.xml" files
fi
rm $each/*xml.gz $each/*comps*.xml 2>/dev/null
if [ $DEBUG -gt 1 ]; then
echo $REPOSYNC $REPOSYNC_OPTS -r $repo
--download_path=$dwnpath
fi
# Check for i386/IA-32
if [ `echo $each | grep -i ia-32 >/dev/null 2>&1` -eq 0 ]; then
#need to set the arch of the files
$REPOSYNC $REPOSYNC_OPTS -q -r $repo
--download_path=$dwnpath --download-metadata --arch=i386 2>&1
else
# There is issue if updates.xml isn't present it will fail
on
# --download-metadata. So re-run to get updates.xml if
available
$REPOSYNC $REPOSYNC_OPTS -q -r $repo
--download_path=$dwnpath --download-metadata 2>/dev/null
fi
# Change to repo directory to build repo from comps.xml in that
directory
cd $each
# Create repo
if [ $DEBUG -gt 1 ]; then
echo "Running $CREATEREPO -v $each -g comps.xml in $PWD"
fi
# If the comps.xml exists, feed it to createrepo.
temp=`ls $each/comps.xml `
if [ $? -eq 0 ]; then
# have comps.xml
$CREATEREPO -v $each -g comps.xml
else
$CREATEREPO -v $each
fi
# Find the *updateinfo.xml.gz file. If none exists it will skip
temp=`ls -rt $each/*updateinfo.xml.gz 2>/dev/null`
retval=$?
if [ $retval -eq 0 ]; then
# Fix to only have a single file if there were multiple
updatexml=`ls -rt $each/*updateinfo.xml.gz 2>/dev/null |
tail -1`
# Have an update xml file with errata data
if [ $DEBUG -gt 1 ]; then
echo "Linking $updatexml to "
echo " $each/repodata/updateinfo.xml.gz"
fi
# Copy file to $each/repodata/updateinfo.xml.gz
cp $updatexml $each/repodata/updateinfo.xml.gz
# Decompress updateinfo.xml.gz
if [ $DEBUG -gt 1 ]; then
echo "Running $GZIP -f -d
$each/repodata/updateinfo.xml.gz"
fi
$GZIP -f -d $each/repodata/updateinfo.xml.gz
# Update the repo to know that it has the updateinfo.xml.gz
if [ $DEBUG -gt 0 ]; then
echo "Running $MODREPO
$each/repodata/updateinfo.xml $each/repodata"
fi
$MODREPO $each/repodata/updateinfo.xml $each/repodata
else
if [ $DEBUG -gt 0 ]; then
echo "No updateinfo.xml.gz file found for repo at
$each"
fi
fi
# Now the repo will have any errata avaiable ready for
spacewalk-repo-sync
done
# Now ensure SELinux context is set properly
chcon -v -R -t httpd_sys_content_t /iso_in/redhat* >/dev/null 2>&1
…On Tue, Nov 29, 2016 at 1:55 PM, ahmedsajid ***@***.***> wrote:
I'm able to get Erratas using the above method. Reposync gets the
updateinfo file which has all the Erratas.
You will need to patch the file because of a bug.
https://bugzilla.redhat.com/show_bug.cgi?id=1354496
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACtCJ7FB3095N8Ck1K6dhmsyTnQxN8Ieks5rDHUQgaJpZM4FxrPz>
.
|
Thanks @jjperry69. Tweaked this for my own configuration and is working. |
Glad I could give back to the community.
…On Nov 30, 2016 09:46, "nyromaniac" ***@***.***> wrote:
Thanks @jjperry69 <https://github.com/jjperry69>. Tweaked this for my own
configuration and is working.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACtCJw-zViNinbMKilrOoGdEeJb9WxEKks5rDYw2gaJpZM4FxrPz>
.
|
+jjperry69
I have used "reposync --gpgcheck -l --repoid=channel-id --download-metadata --downloadcomps " of channels and sub channels to generate several rpm repositories. Channel-id are in the format "rhel-7-server-rpms" "rhel-7-server-optional-rpms" etc. It creates separate folder repositories for each channel. Each folder contains *1(rhnpush -v --channel=my-custom-channel --server=http://localhost/APP --dir=dir_of_packages) |
Hi all, sorry my script is doing it not ok for EL7, but redhat doesn't make life easier. |
I have written script which syncs CentOS7, RHEL6 & RHEL7 including erratas. https://github.com/ahmedsajid/spacewalk/blob/master/nightly_sync.sh |
Actually I have something working (based on jjperry69 script). Just need to thoroughly test it. |
Just to quickly address your two questions, for those that may have them
but didn't ask.
1. I seem to have excluded the lines below in the script I posted above.
It should have these lines under the GZIP variable definition.
# Find the list of Red Hat repo names
repo_path=`find $BASE -type d -name $GLOB`
2. The BASE="/iso_in" setup refers to the mount point / directory where I
have setup the directories (redhat5, redhat5-ia32, redhat6 and redhat7).
Under this directory structure I have the channel names (such
as rhel-5-server-rpms).
So in my setup there are directories like
/iso_in/redhat7/rhel-7-server-rpms and
/iso_in/redhat7/rhel-7-server-optional-rpms.
In summary the $BASE is where you are putting the repos you are mirroring
from Red Hat.
…On Tue, Jan 3, 2017 at 6:36 AM, SallyJohnson ***@***.***> wrote:
+jjperry69
What a refreshing change to read a thread about spacewalk rhel7 errata
that is based on someone using it on rhel7 and getting it to work.
However now is where I *demonstrate my ignorance* by asking stupid
questions. (I guess the questions are related)
1. Your script has "for each in $repo_path" what is $repo_path, it
does not appear to be defined in the script.
2. You refer to BASE="/iso_in". Perhaps the "iso" bit is what is
confusing me, but what exactly is "iso_in"
I have used "reposync --gpgcheck -l --repoid=channel-id
--download-metadata --downloadcomps " of channels and sub channels to
generate several rpm repositories. Channel-id are in the format
"rhel-7-server-rpms" "rhel-7-server-optional-rpms" etc. It creates separate
folder repositories for each channel. Each folder contains
A directory called "Packages" containing just RPMS (which I can "rhnpush"
into spacewalk" *1)
A "comps.xml" file
A "productid" file
A "XXXXX-updateinfo.xml.gz" file. where XXXXX is a 64(?) hexadecimal
number. I have not read anything online about this file.
*1(rhnpush -v --channel=my-custom-channel --server=http://localhost/APP
--dir=dir_of_packages)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#27 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACtCJ13_-vDvEg0oZWJdYEb6FXRBrGZOks5rOjKlgaJpZM4FxrPz>
.
|
Hello,
i have a question regarding the errata import script. I use the script and it is working great.
Thanks for that.
But now i added RHEL 7 to our spacewalk server and now the errata import for RHEL7 is not working (see error message below ). Do you know this failure or are the errata import scripts with RHEL 7 not working ?
/opt/spacewalk_scripts-master/ya-errata-import.pl --server 127.0.0.1 --channel rhel7-x86_64 --os-version 7 --publish --redhat --redhat-channel=rhel-x86_64-server-7 --startfromprevious month
INFO: Architecture is not specified, will try to determine it based on the channel properties of 'rhel7-x86_64'
INFO: Setting the OS variant to Redhat, if this is wrong please remove the --redhat option
DEBUG: Version is 20140918
INFO: Server 127.0.0.1 is running API version 15
INFO: Your API version is supported
INFO: Authentication on 127.0.0.1 successful
Please enter RHN username: XXXXX
Please enter RHN password:XXXXX
INFO: Authentication on rhn.redhat.com successful
DEBUG: User is assigned these roles: system_group_admin channel_admin activation_key_admin config_admin monitoring_admin org_admin
INFO: User has administrator access to this server
INFO: Checking if channel rhel7-x86_64 exists on 127.0.0.1
INFO: Determining architecture for channel rhel7-x86_64
INFO: Detected architecture 'x86_64' for channel 'rhel7-x86_64'
INFO: Listing all packages in rhel7-x86
WARNING: channel.software.listErrata returned an error: Fault returned from XML RPC Server, fault code -210: No such channel
INFO: No errata found, nothing will happen
Regards,
Markus
The text was updated successfully, but these errors were encountered: