[Spacewalk-list] SOLVED:configuration channel challenges
Reneau, Wes W [HDS]
Wes.Reneau at hdsupply.com
Tue Jan 20 20:53:42 UTC 2015
I solved this with a bit of a hack. They key was installing the rhncfg-actions, my servers already have an internal yum repo configured to the media installation. The other key was to touch & chmod 660 the /var/log/rhncfg-actions prior to the registration. Previously the file had perms of 600, although root was the owner and group it still failed.
#!/bin/bash -x
# This script performs the following tasks:
# 1. wget's the spacewalk client repo file
# 2. Installs the spacewalk client
# 3. Moves all *.repo files to /etc/yum.repos.d/old_repo/
# 5. Enables the rhn-actions-control --enable-all so config files can be pushed.
# 6. Touch and Modify /var/log/rhncfg-actions so configuration channel pushes will occur.
#wget the spacewalk client file
wget -O /etc/yum.repos.d/spacewalk20-client.repo http://URL_OF_YOUR_CHOICE
#install spacewalk client
yum install rhn-client-tools rhn-check rhn-setup rhnsd m2crypto yum-rhn-plugin rhncfg-actions -y
#move all repo files to diff directory
mkdir -p /etc/yum.repos.d/old_repo
for i in `find /etc/yum.repos.d/*.repo` ; do mv $i /etc/yum.repos.d/old_repo/; done
#enabled actions
/usr/bin/rhn-actions-control --enable-all
#solve for the python error when pushing config files
touch /var/log/rhncfg-actions
chmod 660 /var/log/rhncfg-actions
#Register with spacewalk
rhnreg_ks --serverUrl=http://FQDN_OF_SWALK/XMLRPC --activationkey=1-KEY_NAME
From: spacewalk-list-bounces at redhat.com<mailto:spacewalk-list-bounces at redhat.com> [mailto:spacewalk-list-bounces at redhat.com] On Behalf Of Reneau, Wes W [HDS]
Sent: Tuesday, January 20, 2015 12:16 PM
To: spacewalk-list at redhat.com<mailto:spacewalk-list at redhat.com>
Subject: [Spacewalk-list] configuration channel challenges
Hello all,
Experimenting with configuration channels and having difficulty with RHEL 6 clients. I am unable to push a config file due to the following error.
Summary:
Deploy config files to system scheduled by (none)
Details:
This action will be executed after 01/20/15 11:37:53 AM EST.
This action's status is: Failed.
The client picked up this action on 01/20/15 11:37:53 AM EST.
The client completed this action on 01/20/15 11:37:53 AM EST.
Client execution returned "Local permission not set for action type configfiles.deploy" (code 42)
Config Files:
FILENAME REMOVED (rev. 2)
I can solve this problem by running rhn-actions-control –enable-all and reschedule the job. Is there a way to eliminate that manual step? I’m adding several hundred server to my swalk server and doing that step manually is time consuming.
Also, once I enable all the actions and reschedule the job it will complete however I get another error as follows:
Summary:
Deploy config files to system scheduled by (none)
Details:
This action will be executed after 01/20/15 11:37:53 AM EST.
This action's status is: Failed.
The client picked up this action on 01/20/15 11:43:27 AM EST.
The client completed this action on 01/20/15 11:43:27 AM EST.
Client execution returned "Fatal error in Python code occurred [[6]]" (code -1)
Config Files:
FILENAME REMOVED(rev. 2)
Despite the failed status the config file is getting placed on the server and working as expected.
I’m using a VM to test this with so I’ve rolled back to the previous snapshot and tested a few things, one thing of interest is that I touched /var/log/rhncfg-actions and chmod the file to 666. After rescheduling the action the job is completed w/ no errors. An obvious security risk but interesting just the same.
Would appreciate your help.
Thanks
Wes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/spacewalk-list/attachments/20150120/554f2f61/attachment.htm>
More information about the Spacewalk-list
mailing list