[PATCH conductor] Fix the regression introduced by the dc:setup rake task fix
by Imre Farkas
From: Imre Farkas <ifarkas(a)redhat.com>
---
src/db/migrate/20120520151500_change_permission_user.rb | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/db/migrate/20120520151500_change_permission_user.rb b/src/db/migrate/20120520151500_change_permission_user.rb
index d9432d3..f71ee33 100644
--- a/src/db/migrate/20120520151500_change_permission_user.rb
+++ b/src/db/migrate/20120520151500_change_permission_user.rb
@@ -19,6 +19,9 @@ class ChangePermissionUser < ActiveRecord::Migration
add_column :permissions, :entity_id, :integer
add_column :derived_permissions, :entity_id, :integer
+ Permission.reset_column_information
+ DerivedPermission.reset_column_information
+
Permission.skip_callback(:save, :after, :update_derived_permissions)
counter = 0
total_perms = Permission.count
@@ -50,6 +53,9 @@ class ChangePermissionUser < ActiveRecord::Migration
add_column :permissions, :user_id, :integer
add_column :derived_permissions, :user_id, :integer
+ Permission.reset_column_information
+ DerivedPermission.reset_column_information
+
Permission.skip_callback(:save, :after, :update_derived_permissions)
Permission.all.each do |p|
entity = Entity.find(p.entity_id)
--
1.7.10.2
11 years, 10 months
[PATCH conductor] v2 RM 3317 - SysV init for conductor-delayed_job service
by Richard Su
We support systems that are not systemd aware. Resurrected the old
SysV init script to support those systems.
Modified conductor spec file to install either the systemd or SysV
init configuration files depending on what the os supports.
v2 - updated spec file to use os version numbers instead of checking
the existence of a directory to determine if systemd is available.
---
aeolus-conductor.spec.in | 31 +++++++++++++++++-
conf/conductor-delayed_job | 77 ++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 107 insertions(+), 1 deletions(-)
create mode 100755 conf/conductor-delayed_job
diff --git a/aeolus-conductor.spec.in b/aeolus-conductor.spec.in
index 4c5aad5..41f7641 100644
--- a/aeolus-conductor.spec.in
+++ b/aeolus-conductor.spec.in
@@ -9,6 +9,12 @@
%global rubyabi 1.8
%endif
+%if 0%{?fedora} > 13 || 0%{?rhel} > 6
+%global systemd 1
+%else
+%global systemd 0
+%endif
+
Name: aeolus-conductor
Version: @VERSION@
Release: 0%{?dist}
@@ -79,10 +85,12 @@ Requires: rubygem(thin) >= 1.2.5
Requires(post): chkconfig
Requires(preun): chkconfig
Requires(preun): initscripts
+%if %{systemd}
Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
BuildRequires: systemd-units
+%endif
%description daemons
The configuration and daemons necessary to run and proxy the Aeolus Conductor.
@@ -157,7 +165,9 @@ getent passwd aeolus >/dev/null || \
%{__mkdir} -p %{buildroot}%{app_root}
%{__mkdir} -p %{buildroot}%{doc_root}
%{__mkdir} -p %{buildroot}%{_initrddir}
+%if %{systemd}
%{__mkdir} -p %{buildroot}%{_unitdir}/systemd/system
+%endif
%{__mkdir} -p %{buildroot}%{_sysconfdir}/sysconfig
%{__mkdir} -p %{buildroot}%{_sysconfdir}/httpd/conf.d
%{__mkdir} -p %{buildroot}%{_sysconfdir}/logrotate.d
@@ -271,7 +281,11 @@ done
# copy over init scripts and various config
%{__cp} conf/aeolus-conductor %{buildroot}%{_initrddir}
%{__cp} conf/conductor-dbomatic %{buildroot}%{_initrddir}
+%if %{systemd}
%{__cp} conf/conductor-delayed_job.systemd %{buildroot}%{_unitdir}/conductor-delayed_job.service
+%else
+%{__cp} conf/conductor-delayed_job %{buildroot}%{_initrddir}
+%endif
%{__cp} conf/aeolus-conductor-httpd.conf %{buildroot}%{_sysconfdir}/httpd/conf.d/aeolus-conductor.conf
%{__cp} conf/aeolus-conductor.logrotate %{buildroot}%{_sysconfdir}/logrotate.d/aeolus-conductor
%{__cp} conf/aeolus-conductor.sysconf %{buildroot}%{_sysconfdir}/sysconfig/aeolus-conductor
@@ -333,19 +347,28 @@ if [ ! -d %{app_root}/app ]; then
fi
%post daemons
+# Register the services
+%if %{systemd}
if [ $1 -eq 1 ] ; then
# Initial installation
/bin/systemctl daemon-reload >/dev/null 2>&1
fi
-# Register the services
+%else
+/sbin/chkconfig --add conductor-delayed_job
+%endif
/sbin/chkconfig --add aeolus-conductor
/sbin/chkconfig --add conductor-dbomatic
%preun daemons
if [ $1 = 0 ]; then
# Package removal, not upgrade
+ %if %{systemd}
/bin/systemctl --no-reload disable conductor-delayed_job.service > /dev/null 2>&1
/bin/systemctl stop conductor-delayed_job.service > /dev/null 2>&1
+ %else
+ /sbin/service conductor-delayed_job stop > /dev/null 2>&1
+ /sbin/chkconfig --del conductor-delayed_job
+ %endif
/sbin/service aeolus-conductor stop > /dev/null 2>&1
/sbin/chkconfig --del aeolus-conductor
/sbin/service conductor-dbomatic stop > /dev/null 2>&1
@@ -353,11 +376,13 @@ if [ $1 = 0 ]; then
fi
%postun daemons
+#%if %{systemd}
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
/bin/systemctl try-restart conductor-delayed_job.service >/dev/null 2>&1
fi
+#%endif
%files
@@ -391,7 +416,11 @@ fi
%files daemons
%{_initrddir}/aeolus-conductor
%{_initrddir}/conductor-dbomatic
+%if %{systemd}
%{_unitdir}/conductor-delayed_job.service
+%else
+%{_initrddir}/conductor-delayed_job
+%endif
%config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/aeolus-conductor
%config(noreplace) %{_sysconfdir}/sysconfig/conductor-rails
diff --git a/conf/conductor-delayed_job b/conf/conductor-delayed_job
new file mode 100755
index 0000000..6d2bdac
--- /dev/null
+++ b/conf/conductor-delayed_job
@@ -0,0 +1,77 @@
+#!/bin/bash
+#
+#
+# conductor-delayed_job startup script for conductor-delayed_job
+#
+# chkconfig: - 99 01
+# description: conductor-delayed_job is service for running conductor
+# background jobs
+
+[ -r /etc/sysconfig/conductor-rails ] && . /etc/sysconfig/conductor-rails
+
+[ -r /etc/sysconfig/aeolus-conductor ] && . /etc/sysconfig/aeolus-conductor
+
+RAILS_ENV="${RAILS_ENV:-production}"
+CONDUCTOR_DIR="${CONDUCTOR_DIR:-/usr/share/aeolus-conductor}"
+AEOLUS_USER="${AEOLUS_USER:-aeolus}"
+DJOB_LOCKFILE="${DJOB_LOCKFILE:-/var/lock/subsys/conductor-delayed_job}"
+DJOB_PIDDIR="${DJOB_PIDDIR:-/var/run/aeolus-conductor/}"
+
+DJOB_PATH=$CONDUCTOR_DIR/script/
+DJOB_PROG=delayed_job
+DJOB_PIDFILE=$DJOB_PIDDIR/$DJOB_PROG.pid
+
+. /etc/init.d/functions
+
+start() {
+ echo -n "Starting conductor-delayed_job: "
+
+ daemon --user=$AEOLUS_USER $DJOB_PATH/$DJOB_PROG start -n 2 --pid-dir=$DJOB_PIDDIR
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] && touch $DJOB_LOCKFILE ; then
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+}
+
+stop() {
+ echo -n "Shutting down conductor-delayed_job: "
+ $DJOB_PATH/$DJOB_PROG stop --pid-dir=$DJOB_PIDDIR
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] && rm -f $DJOB_LOCKFILE ; then
+ echo_success
+ echo
+ else
+ echo_failure
+ echo
+ fi
+}
+
+case "$1" in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+ status)
+ status -p $DJOB_PIDFILE $DJOB_PROG
+ RETVAL=$?
+ ;;
+ force-reload)
+ restart
+ ;;
+ *)
+ echo "Usage: conductor-delayed_job {start|stop|restart|status}"
+ exit 1
+ ;;
+esac
+
+exit $RETVAL
--
1.7.7.6
11 years, 10 months
[PATCH conductor] Fixed SessionEntity migration
by Jan Provazník
From: Jan Provaznik <jprovazn(a)redhat.com>
---
...06200000_fix_session_id_for_session_entities.rb | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/db/migrate/20120606200000_fix_session_id_for_session_entities.rb b/src/db/migrate/20120606200000_fix_session_id_for_session_entities.rb
index 5d8a22a..227fc5e 100644
--- a/src/db/migrate/20120606200000_fix_session_id_for_session_entities.rb
+++ b/src/db/migrate/20120606200000_fix_session_id_for_session_entities.rb
@@ -34,7 +34,7 @@ class FixSessionIdForSessionEntities < ActiveRecord::Migration
def self.down
add_column :session_entities, :session_db_id, :integer
SessionEntity.reset_column_information
- SessionEntity.each do |se|
+ SessionEntity.all.each do |se|
session = ActiveRecord::SessionStore::Session.find_by_session_id(se.session_id)
if session
se.session_db_id = session.id
--
1.7.7.6
11 years, 10 months
Welcome to Alexandra Settle - Content Services Intern
by Dan Macpherson
Hi everyone,
I'd just like to introduce you all to Alexandra Settle. She is studying a Bachelor of Creative Industries degree and has joined Red Hat for a three-month internship.
Under my guidance, she will be working on Aeolus documentation, including revising some of the website and wiki content.
Alex, welcome to the team!
Dan Macpherson
Content Author
Engineering Content Services
Red Hat Asia Pacific Pty Ltd
Brisbane, Australia
e: dmacpher(a)redhat.com
11 years, 10 months
[PATCH] deb: Use dh2_python rather then cdbs to build Debian/Ubuntu packages
by Steven Dake
This patch updates the debian packaging to more appropriately match
what is expected in a multi-python environment. While this only builds
python 2.x binaries, the previous debian oz packages didn't work at all on
modern Debian or Ubuntu systems because of the pyshared usage. This resulted
in an error about TDL.py not being importable.
I also removed cdbs since it is not necessary to get the job done.
Signed-off-by: Steven Dake <sdake(a)redhat.com>
---
debian/changelog | 5 +++++
debian/control | 18 ++++++++----------
debian/rules | 15 +++++++++++----
3 files changed, 24 insertions(+), 14 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 0d269eb..90d5a3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+oz (0.9.0-1) unstable; urgency=low
+ * Updated to match more modern ubuntu packaging standards.
+
+ -- Steven Dake <sdake(a)redhat.com> Mon, 18 Jun 2012 19:14:25 -0700
+
oz (0.7.0-5) unstable; urgency=low
* Initial Release.
diff --git a/debian/control b/debian/control
index 90403ac..6aa5119 100644
--- a/debian/control
+++ b/debian/control
@@ -1,21 +1,19 @@
Source: oz
-Section: utils
-Priority: extra
Maintainer: Richard Jones <rjones(a)redhat.com>
-Build-Depends: debhelper (>= 7.0.50~), cdbs,
- python (>= 2.5)
-Standards-Version: 3.8.4
+Section: python
+Priority: optional
+Build-Depends: debhelper (>= 7.4.3), python-all (>= 2.6.6-3)
+Standards-Version: 3.9.3
Homepage: http://aeolusproject.org/oz.html
Vcs-Git: git://github.com/clalancette/oz.git
-#Vcs-Browser: http://git.debian.org/?p=collab-maint/oz.git;a=summary
-XS-Python-Version: ${python:Versions}
+X-Python-Version: >= 2.6
Package: oz
Architecture: all
Depends: ${misc:Depends}, ${python:Depends},
- python (>= 2.5),
-# for gvnccapture, but only packaged in Sid:
+ python (>= 2.6.6-3),
genisoimage,
+# for gvnccapture, but only packaged in Sid:
gvncviewer,
libvirt-dev,
mtools,
@@ -27,6 +25,6 @@ Depends: ${misc:Depends}, ${python:Depends},
python-numpy,
python-m2crypto,
python-parted
-Description: installing guest OSs with only minimal input the user
+Description: Installing guest OSs with only minimal input the user
Oz is a tool for automatically installing guest OSs with only minimal
up-front input from the user.
diff --git a/debian/rules b/debian/rules
index 1eda7a7..e829d28 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,17 @@
#!/usr/bin/make -f
-DEB_PYTHON_SYSTEM=pysupport
+#DH_VERBOSE=1
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
+PYTHON2=$(shell pyversions -vr)
+
+%:
+ dh $@ --buildsystem=python_distutils --with=python2
+
+override_dh_auto_clean:
+ dh_auto_clean
+ rm -rf build
+ rm -rf *.egg-info
-# Add here any variable or target overrides you need.
install/oz::
mkdir -p debian/oz/var/lib/oz/isocontent/
mkdir -p debian/oz/var/lib/oz/isos/
@@ -16,3 +22,4 @@ install/oz::
mkdir -p debian/oz/var/lib/oz/kernels/
mkdir -p debian/oz/etc/oz
install -m 0644 oz.cfg debian/oz/etc/oz/
+
--
1.7.7.6
11 years, 10 months
Anyone have any RoR Slides available?
by Martyn Taylor
Hi Gents,
I'm giving a talk next months JBug in Newcastle "Intro to Rails and
running on Torque Box".
Does anyone have any Rails slides lying around that I could take a look
at / plagiarise ;) ?
11 years, 10 months
Moving to Rally?
by Dave Johnson
Hey,
So is there a plan to begin moving off of Redmine and onto Rally for
CloudEngine?
When can we anticipate this beginning and/or completed?
Thanks,
-Dave
11 years, 10 months