From: Angus Thomas athomas@redhat.com
aeolus-configure shouldn't deploy these files --- contrib/aeolus-configure.spec | 9 +-- recipes/aeolus_recipe/files/iwhd-conf.js | 7 --- recipes/aeolus_recipe/files/iwhd.init | 76 ------------------------------ recipes/aeolus_recipe/manifests/iwhd.pp | 12 +---- 4 files changed, 4 insertions(+), 100 deletions(-) delete mode 100644 recipes/aeolus_recipe/files/iwhd-conf.js delete mode 100644 recipes/aeolus_recipe/files/iwhd.init
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec index c949c94..c973f57 100644 --- a/contrib/aeolus-configure.spec +++ b/contrib/aeolus-configure.spec @@ -4,7 +4,7 @@ Summary: Aeolus Configure Puppet Recipe Name: aeolus-configure Version: 2.0.0 -Release: 4%{?dist}%{?extra_release} +Release: 5%{?dist}%{?extra_release}
Group: Applications/Internet License: GPLv2+ @@ -52,10 +52,8 @@ rm -rf %{buildroot}
%changelog
-* Wed Mar 02 2011 Mike Orazi <morazi@redhat.com 2.0.0-4 -- additions required for rename -- httpd enabled via chkconfig -- update create_buckets +* Tue Mar 22 2011 Angus Thomas <athomas@redhat.com 2.0.0-5 +- Removed iwhd init script and config file
* Wed Feb 17 2011 Mohammed Morsi mmorsi@redhat.com 2.0.0-3 - renamed deltacloud-configure to aeolus-configure @@ -92,4 +90,3 @@ rm -rf %{buildroot}
* Thu Sep 02 2010 Mohammed Morsi mmorsi@redhat.com 0.0.1-1 - Initial package - diff --git a/recipes/aeolus_recipe/files/iwhd-conf.js b/recipes/aeolus_recipe/files/iwhd-conf.js deleted file mode 100644 index 44516e0..0000000 --- a/recipes/aeolus_recipe/files/iwhd-conf.js +++ /dev/null @@ -1,7 +0,0 @@ -[ - { - "name": "primary", - "type": "fs", - "path": "." - } -] diff --git a/recipes/aeolus_recipe/files/iwhd.init b/recipes/aeolus_recipe/files/iwhd.init deleted file mode 100644 index 4695d73..0000000 --- a/recipes/aeolus_recipe/files/iwhd.init +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# -# iwhd startup script for iwhd server -# -# chkconfig: - 40 60 -# description: iwhd is primary server process for the \ -# IWHD component. -# - -[ -r /etc/sysconfig/iwhd ] && . /etc/sysconfig/iwhd - -LOCKFILE="${LOCKFILE:-/var/lock/subsys/iwhd}" - -PROG=/usr/bin/iwhd -CONF=/etc/iwhd/conf.js - -. /etc/init.d/functions - -start() { - echo -n "Starting iwhd: " - # FIXME: we sleep 2 here to make sure that mongod has really come up. - # Yes, it's a hack - sleep 2 - - $PROG -c $CONF >& /var/log/iwhd.log & - RETVAL=$? - if [ $RETVAL -eq 0 ] && touch $LOCKFILE ; then - echo_success - echo - else - echo_failure - echo - fi -} - -stop() { - echo -n "Shutting down iwhd: " - RETVAL=$? - killall $PROG - if [ $RETVAL -eq 0 ] && rm -f $LOCKFILE ; then - echo_success - echo - else - echo_failure - echo - fi -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - stop - start - ;; - reload) - ;; - force-reload) - restart - ;; - status) - status $PROG - RETVAL=$? - ;; - *) - echo "Usage: iwhd {start|stop|restart|status}" - exit 1 - ;; -esac - -exit $RETVAL diff --git a/recipes/aeolus_recipe/manifests/iwhd.pp b/recipes/aeolus_recipe/manifests/iwhd.pp index 2db8e14..8a953b0 100644 --- a/recipes/aeolus_recipe/manifests/iwhd.pp +++ b/recipes/aeolus_recipe/manifests/iwhd.pp @@ -15,14 +15,6 @@ class aeolus::iwhd inherits aeolus { file { "/data": ensure => 'directory' } file { "/data/db": ensure => 'directory' } file { "/etc/iwhd": ensure => 'directory'} - file { "/etc/iwhd/conf.js": - source => "puppet:///modules/aeolus_recipe/iwhd-conf.js", - mode => 755, require => File['/etc/iwhd'] } - - #TODO The service wrapper should probably be in the rpm itself - file { "/etc/rc.d/init.d/iwhd": - source => "puppet:///modules/aeolus_recipe/iwhd.init", - mode => 755 }
service { 'mongod': ensure => 'running', @@ -33,8 +25,7 @@ class aeolus::iwhd inherits aeolus { ensure => 'running', enable => true, hasstatus => true, - require => [File['/etc/rc.d/init.d/iwhd', '/etc/iwhd/conf.js'], - return_if($enable_packages, Package['iwhd']), + require => [return_if($enable_packages, Package['iwhd']), Service[mongod]]}
# XXX ugly hack but iwhd might take some time to come up @@ -73,4 +64,3 @@ define aeolus::create_bucket(){ logoutput => true, require => [Exec['iwhd_startup_pause'], Package[curl]] } } -
ACK. Looks good and works. Pushed as well.
Did send this one out a while back, NBD though.
https://fedorahosted.org/pipermail/aeolus-devel/2011-March/000527.html
I did remove the /etc/iwhd directory that is created here (right before iwhd/conf.js) in my patch. Feel free to push a follow up patch removing this if it works for you afterwards as well.
-Mo
On 03/23/2011 09:05 AM, athomas@redhat.com wrote:
From: Angus Thomasathomas@redhat.com
aeolus-configure shouldn't deploy these files
contrib/aeolus-configure.spec | 9 +-- recipes/aeolus_recipe/files/iwhd-conf.js | 7 --- recipes/aeolus_recipe/files/iwhd.init | 76 ------------------------------ recipes/aeolus_recipe/manifests/iwhd.pp | 12 +---- 4 files changed, 4 insertions(+), 100 deletions(-) delete mode 100644 recipes/aeolus_recipe/files/iwhd-conf.js delete mode 100644 recipes/aeolus_recipe/files/iwhd.init
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec index c949c94..c973f57 100644 --- a/contrib/aeolus-configure.spec +++ b/contrib/aeolus-configure.spec @@ -4,7 +4,7 @@ Summary: Aeolus Configure Puppet Recipe Name: aeolus-configure Version: 2.0.0 -Release: 4%{?dist}%{?extra_release} +Release: 5%{?dist}%{?extra_release}
Group: Applications/Internet License: GPLv2+ @@ -52,10 +52,8 @@ rm -rf %{buildroot}
%changelog
-* Wed Mar 02 2011 Mike Orazi<morazi@redhat.com 2.0.0-4 -- additions required for rename -- httpd enabled via chkconfig -- update create_buckets +* Tue Mar 22 2011 Angus Thomas<athomas@redhat.com 2.0.0-5 +- Removed iwhd init script and config file
- Wed Feb 17 2011 Mohammed Morsimmorsi@redhat.com 2.0.0-3
- renamed deltacloud-configure to aeolus-configure
@@ -92,4 +90,3 @@ rm -rf %{buildroot}
- Thu Sep 02 2010 Mohammed Morsimmorsi@redhat.com 0.0.1-1
- Initial package
diff --git a/recipes/aeolus_recipe/files/iwhd-conf.js b/recipes/aeolus_recipe/files/iwhd-conf.js deleted file mode 100644 index 44516e0..0000000 --- a/recipes/aeolus_recipe/files/iwhd-conf.js +++ /dev/null @@ -1,7 +0,0 @@ -[
- {
- "name": "primary",
- "type": "fs",
- "path": "."
- }
-] diff --git a/recipes/aeolus_recipe/files/iwhd.init b/recipes/aeolus_recipe/files/iwhd.init deleted file mode 100644 index 4695d73..0000000 --- a/recipes/aeolus_recipe/files/iwhd.init +++ /dev/null @@ -1,76 +0,0 @@ -#!/bin/bash -# -# -# iwhd startup script for iwhd server -# -# chkconfig: - 40 60 -# description: iwhd is primary server process for the \ -# IWHD component. -#
-[ -r /etc/sysconfig/iwhd ]&& . /etc/sysconfig/iwhd
-LOCKFILE="${LOCKFILE:-/var/lock/subsys/iwhd}"
-PROG=/usr/bin/iwhd -CONF=/etc/iwhd/conf.js
-. /etc/init.d/functions
-start() {
- echo -n "Starting iwhd: "
- # FIXME: we sleep 2 here to make sure that mongod has really come up.
- # Yes, it's a hack
- sleep 2
- $PROG -c $CONF>& /var/log/iwhd.log&
- RETVAL=$?
- if [ $RETVAL -eq 0 ]&& touch $LOCKFILE ; then
echo_success
echo
- else
echo_failure
echo
- fi
-}
-stop() {
- echo -n "Shutting down iwhd: "
- RETVAL=$?
- killall $PROG
- if [ $RETVAL -eq 0 ]&& rm -f $LOCKFILE ; then
echo_success
echo
- else
echo_failure
echo
- fi
-}
-case "$1" in
- start)
start
;;
- stop)
stop
;;
- restart)
stop
start
;;
- reload)
;;
- force-reload)
restart
;;
- status)
status $PROG
RETVAL=$?
;;
- *)
echo "Usage: iwhd {start|stop|restart|status}"
exit 1
- ;;
-esac
-exit $RETVAL diff --git a/recipes/aeolus_recipe/manifests/iwhd.pp b/recipes/aeolus_recipe/manifests/iwhd.pp index 2db8e14..8a953b0 100644 --- a/recipes/aeolus_recipe/manifests/iwhd.pp +++ b/recipes/aeolus_recipe/manifests/iwhd.pp @@ -15,14 +15,6 @@ class aeolus::iwhd inherits aeolus { file { "/data": ensure => 'directory' } file { "/data/db": ensure => 'directory' } file { "/etc/iwhd": ensure => 'directory'}
file { "/etc/iwhd/conf.js":
source => "puppet:///modules/aeolus_recipe/iwhd-conf.js",
mode => 755, require => File['/etc/iwhd'] }
#TODO The service wrapper should probably be in the rpm itself
file { "/etc/rc.d/init.d/iwhd":
source => "puppet:///modules/aeolus_recipe/iwhd.init",
mode => 755 } service { 'mongod': ensure => 'running',
@@ -33,8 +25,7 @@ class aeolus::iwhd inherits aeolus { ensure => 'running', enable => true, hasstatus => true,
require => [File['/etc/rc.d/init.d/iwhd', '/etc/iwhd/conf.js'],
return_if($enable_packages, Package['iwhd']),
require => [return_if($enable_packages, Package['iwhd']), Service[mongod]]} # XXX ugly hack but iwhd might take some time to come up
@@ -73,4 +64,3 @@ define aeolus::create_bucket(){ logoutput => true, require => [Exec['iwhd_startup_pause'], Package[curl]] } }
aeolus-devel@lists.fedorahosted.org