+++ This bug was initially created as a clone of Bug #784139 +++ Description of problem: rhn-satellite does not offer a way to disable some services, like taskomatic when setting Redundant Satellites with Stand-Alone DB According with documentation available at RHN docs [1], taskomatic must be disabled into redundant environments. [1] - http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/5.4/html-single/Installation_Guide/index.html#sect-Installation_Guide-Maintenance-Establishing_Redundant_Satellites_with_Stand_Alone_DB Version-Release number of selected component (if applicable): RHN Satellite 5.4.1 How reproducible: 100% Steps to Reproduce: 1. restart rhn-satellite # rhn-satellite restart Actual results: # rhn-satellite restart all services Expected results: rhn-satellite should read a config file to determine which service will be started --- Additional comment from mmello on 2012-01-23 21:03:19 BRST --- Hello team, Reading the code it seems that rhn-satellite script already have the capability to ignore some services, look below: 151 OPTS=$(getopt --longoptions=exclude:,level: -n ${0##*/} -- e:l: "$@") 152 153 if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi 154 155 eval set -- "$OPTS" 156 157 while true ; do 158 case "$1" in 159 -e|--exclude) 160 EXCLUDE=$2 161 shift 162 # the space in "$SERVICE " is intentional, don't remove it. 163 SERVICES=$(while read -d " " service ; do echo ${service/$EXCLUDE}; done <<<"$SERVICES ") 164 ;; 165 -l|--level) 166 LEVEL="--level $2" 167 shift 168 ;; 169 --) 170 shift 171 break 172 ;; 173 *) 174 echo "Internal error!" >&2 175 exit 1 176 ;; 177 esac 178 shift 179 done [root@dhcp85 ~]# rhn-satellite --exclude taskomatic restart Shutting down spacewalk services... Stopping cobbler daemon: [ OK ] Stopping rhn-search... Stopped rhn-search. Stopping MonitoringScout ... [ OK ] Stopping Monitoring ... [ OK ] Stopping httpd: [ OK ] Stopping tomcat6: [ OK ] Shutting down osa-dispatcher: [ OK ] Shutting down Oracle Net Listener ... [ OK ] Shutting down Oracle DB instance "rhnsat" ... [ OK ] Terminating jabberd processes ... Stopping router: [ OK ] Stopping sm: [ OK ] Stopping c2s: [ OK ] Stopping s2s: [ OK ] Done. Starting spacewalk services... Initializing jabberd processes ... Starting router: [ OK ] Starting sm: [ OK ] Starting c2s: [ OK ] Starting s2s: [ OK ] Starting Oracle Net Listener ... [ OK ] Starting Oracle DB instance "rhnsat" ... [ OK ] Starting osa-dispatcher: [ OK ] Starting tomcat6: [ OK ] Starting httpd: [ OK ] Starting Monitoring ... [ OK ] Starting MonitoringScout ... [ OK ] Starting rhn-search... Starting cobbler daemon: SERVING! [ OK ] Done. +++++++++++++++++++++++++++++++ We can use this to create a tunable flag to automate the service Best, mmello
Taking..
Created attachment 557109 [details] patch [1/3] Hello, Here follow 3 patches which includes a capability to Spacewalk ignore to start some services when running the /usr/sbin/spacewalk-service script. Below is an example after applied the patch excluding the Taskomatic service to be started: # cat /etc/rhn/disabled-services DISABLED_SERVICES="taskomatic" # spacewalk-service start Starting spacewalk services... Initializing jabberd processes ... Starting router: [ OK ] Starting sm: [ OK ] Starting c2s: [ OK ] Starting s2s: [ OK ] Starting Oracle Net Listener ... [ OK ] Starting Oracle DB instance "rhnsat" ... [ OK ] Starting osa-dispatcher: [ OK ] Starting tomcat6: [ OK ] Starting httpd: [ OK ] Starting Monitoring ... [ OK ] Starting MonitoringScout ... [ OK ] Starting rhn-search... Starting cobbler daemon: SERVING! [ OK ] Done. # spacewalk-service status router (pid 20117) is running... sm (pid 20124) is running... c2s (pid 20131) is running... s2s (pid 20138) is running... Oracle Net Listener (pid 20189) is running... Oracle DB instance rhnsat (pid 20201) is running... osa-dispatcher (pid 20245) is running... tomcat6 (pid 20316) is running... [ OK ] httpd (pid 20339) is running... rhn-search is running (20386). cobblerd (pid 20421) is running... # /etc/init.d/taskomatic status RHN Taskomatic is not running. Patch already sent to approval at spacewalk-devel mailing list at https://www.redhat.com/archives/spacewalk-devel/2012-January/msg00056.html Best, Marcelo Moreira de Mello
Created attachment 557110 [details] patch [2/3]
Created attachment 557111 [details] patch [3/3]
I've ended up adding support for file /etc/rhn/service-list where you can manipulate the $SERVICES list in any way, or override it completely. In Spacewalk master, 5ed8779d0e1e4b8e4b73c4f273bdbd934a08472b.
Spacewalk 1.7 has been released: https://fedorahosted.org/spacewalk/wiki/ReleaseNotes17