Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-09 Thread Rob Crittenden

John Dennis wrote:

rebased patch because it wouldn't apply to master



ACK

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-09 Thread Endi Sukma Dewata

On 2/9/2012 12:11 PM, Rob Crittenden wrote:

John Dennis wrote:

rebased patch because it wouldn't apply to master


ACK


Pushed to master and ipa-2-2.

--
Endi S. Dewata

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-06 Thread Rob Crittenden

John Dennis wrote:

On 01/25/2012 09:12 AM, Rob Crittenden wrote:

John Dennis wrote:

This patch supersedes the previous patch, it corrects two issue Rob
raised in a later patch review

The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV
systems.

* Typo in the name of the pid file variable in the ipa_memcached
initscript



NACK, two small things.

ipa-server-install man page needs to be updated with new option.

ipa_memcached is not chkconfig'd on/off when it is installed/uninstalled.

Also, can you update the commit message, it isn't as descriptive as it
usually is :-)


Attached is a modified patch:

Removed the ipa_memcached install option because it's mandatory for
proper operation now. This means there is no need to update the man page.

See previous email concerning the chkconfig behavior. Please review the
earlier reply. If necessary I'll update the patch if you could be more
specific about your concerns but as it stands now I don't see a problem
with it.

I added a much more descriptive commit message.


IIRC I rebooted my box to be sure things came up properly and 
ipa_memcached did not start at boot. I chalked it up to chkconfig out of 
habit, but yeah, this was on F15 so systemd should have handled it.


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-06 Thread Rob Crittenden

John Dennis wrote:

On 02/06/2012 10:26 AM, Rob Crittenden wrote:

John Dennis wrote:

On 01/25/2012 09:12 AM, Rob Crittenden wrote:

John Dennis wrote:

This patch supersedes the previous patch, it corrects two issue Rob
raised in a later patch review

The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV
systems.

* Typo in the name of the pid file variable in the ipa_memcached
initscript



NACK, two small things.

ipa-server-install man page needs to be updated with new option.

ipa_memcached is not chkconfig'd on/off when it is
installed/uninstalled.

Also, can you update the commit message, it isn't as descriptive as it
usually is :-)


Attached is a modified patch:

Removed the ipa_memcached install option because it's mandatory for
proper operation now. This means there is no need to update the man
page.

See previous email concerning the chkconfig behavior. Please review the
earlier reply. If necessary I'll update the patch if you could be more
specific about your concerns but as it stands now I don't see a problem
with it.

I added a much more descriptive commit message.


IIRC I rebooted my box to be sure things came up properly and
ipa_memcached did not start at boot. I chalked it up to chkconfig out of
habit, but yeah, this was on F15 so systemd should have handled it.


It won't start if SELinux is in enforcing mode (at least not until we
get a policy update).



I'm pretty sure I was in permissive by then. I had things working, 
rebooted on a lark.


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-06 Thread John Dennis

rebased patch because it wouldn't apply to master

--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
From c11ca3aaed9dba7c2ac4b2de6b3eba8aeb641f53 Mon Sep 17 00:00:00 2001
From: John Dennis jden...@redhat.com
Date: Mon, 6 Feb 2012 13:15:06 -0500
Subject: [PATCH 59-3] Add ipa_memcached service
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

* Adds ipa_memcached SystemV initscript

* Adds ipa_memcached service file and tmpfiles.d/ipa.conf
  to recreate /var/run/ipa_memcached on reboot.

* Adds ipa_memcached config file

* Adds memcacheinstnace.py to manage ipa_memcaced as
  as SimpleService object.

* Updates the IPA service list to include ipa_memcached,
  at service positon 39, httpd is position 40

* Updates the spec file:
  - requires the memcached daemon and python client
  - installs service or initscripts depending on OS
  - installs config file
  - creates /var/run/ipa_memcached directory

* Modifies ipa-server-install to install ipa_memcached
---
 freeipa.spec.in   |   22 ++
 init/SystemV/ipa_memcached.init   |  120 +
 init/ipa_memcached.conf   |5 ++
 init/systemd/ipa.conf.tmpfiles|1 +
 init/systemd/ipa_memcached.service|   13 
 install/tools/ipa-server-install  |4 +
 ipaserver/install/memcacheinstance.py |   26 +++
 ipaserver/install/service.py  |1 +
 8 files changed, 192 insertions(+), 0 deletions(-)
 create mode 100755 init/SystemV/ipa_memcached.init
 create mode 100644 init/ipa_memcached.conf
 create mode 100644 init/systemd/ipa.conf.tmpfiles
 create mode 100644 init/systemd/ipa_memcached.service
 create mode 100644 ipaserver/install/memcacheinstance.py

diff --git a/freeipa.spec.in b/freeipa.spec.in
index bffeca2..a40368d 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -109,6 +109,8 @@ Requires: python-ldap
 Requires: python-krbV
 Requires: acl
 Requires: python-pyasn1 = 0.0.9a
+Requires: memcached
+Requires: python-memcached
 %if 0%{?fedora} = 16
 Requires: systemd-units = 36-3
 Requires(pre): systemd-units
@@ -356,12 +358,25 @@ mkdir -p %{buildroot}%{_usr}/share/ipa/html/
 /bin/touch %{buildroot}%{_usr}/share/ipa/html/krbrealm.con
 /bin/touch %{buildroot}%{_usr}/share/ipa/html/preferences.html
 mkdir -p %{buildroot}%{_initrddir}
+mkdir %{buildroot}%{_sysconfdir}/sysconfig/
+install -m 644 init/ipa_memcached.conf %{buildroot}%{_sysconfdir}/sysconfig/ipa_memcached
+
+%if 0%{?fedora} = 15
+mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
+install -m 0644 init/systemd/ipa.conf.tmpfiles %{buildroot}%{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
+
+mkdir -p %{buildroot}%{_localstatedir}/run/
+install -d -m 0700 %{buildroot}%{_localstatedir}/run/ipa_memcached/
+
 %if 0%{?fedora} = 16
 # Default to systemd initscripts for F16 and above
 mkdir -p %{buildroot}%{_unitdir}
 install -m 644 init/systemd/ipa.service %{buildroot}%{_unitdir}/ipa.service
+install -m 644 init/systemd/ipa_memcached.service %{buildroot}%{_unitdir}/ipa_memcached.service
 %else
 install -m755 init/SystemV/ipa.init %{buildroot}%{_initrddir}/ipa
+install -m755 init/SystemV/ipa_memcached.init %{buildroot}%{_initrddir}/ipa_memcached
 %endif
 %endif
 
@@ -491,12 +506,19 @@ fi
 %{_sbindir}/ipa-upgradeconfig
 %{_sbindir}/ipa-compliance
 %{_sysconfdir}/cron.d/ipa-compliance
+%config(noreplace) %{_sysconfdir}/sysconfig/ipa_memcached
+%dir %attr(0700,apache,apache) %{_localstatedir}/run/ipa_memcached/
+%if 0%{?fedora} = 15
+%config %{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
 %if 0%{?fedora} = 16
 # Use systemd scheme
 %attr(644,root,root) %{_unitdir}/ipa.service
+%attr(644,root,root) %{_unitdir}/ipa_memcached.service
 %else
 # Use SystemV scheme only before F16
 %attr(755,root,root) %{_initrddir}/ipa
+%attr(755,root,root) %{_initrddir}/ipa_memcached
 %endif
 %dir %{python_sitelib}/ipaserver
 %{python_sitelib}/ipaserver/*
diff --git a/init/SystemV/ipa_memcached.init b/init/SystemV/ipa_memcached.init
new file mode 100755
index 000..b30ea50
--- /dev/null
+++ b/init/SystemV/ipa_memcached.init
@@ -0,0 +1,120 @@
+#! /bin/sh
+#
+# chkconfig: - 55 45
+# description:	The ipa_memcached daemon is a memory cache service for IPA
+# processname: memcached
+# config: /etc/sysconfig/ipa_memcached
+# pidfile: /var/run/ipa_memcached/ipa_memcached.pid
+
+# Standard LSB functions
+#. /lib/lsb/init-functions
+
+# Source function library.
+. /etc/init.d/functions
+
+SOCKET_PATH=/var/run/ipa_memcached/ipa_memcached
+USER=apache
+PIDFILE=/var/run/ipa_memcached/ipa_memcached.pid
+MAXCONN=1024
+CACHESIZE=64
+OPTIONS=
+
+if [ -f /etc/sysconfig/ipa_memcached ];then 
+. /etc/sysconfig/ipa_memcached
+fi
+
+# Check that networking is up.
+. /etc/sysconfig/network
+
+if [ $NETWORKING = no ]
+then
+exit 0
+fi
+
+prog=ipa_memcached
+pidfile=${PIDFILE-/var/run/ipa_memcached/ipa_memcached.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/ipa_memcached}
+
+start () {
+echo -n 

Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-05 Thread John Dennis

On 01/25/2012 09:12 AM, Rob Crittenden wrote:

John Dennis wrote:

This patch supersedes the previous patch, it corrects two issue Rob
raised in a later patch review

The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV systems.

* Typo in the name of the pid file variable in the ipa_memcached initscript



NACK, two small things.

ipa-server-install man page needs to be updated with new option.

ipa_memcached is not chkconfig'd on/off when it is installed/uninstalled.

Also, can you update the commit message, it isn't as descriptive as it
usually is :-)


Attached is a modified patch:

Removed the ipa_memcached install option because it's mandatory for 
proper operation now. This means there is no need to update the man page.


See previous email concerning the chkconfig behavior. Please review the 
earlier reply. If necessary I'll update the patch if you could be more 
specific about your concerns but as it stands now I don't see a problem 
with it.


I added a much more descriptive commit message.


--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
From 5f97a5b53b1149924f1939037d2d74bf8540a89a Mon Sep 17 00:00:00 2001
From: John Dennis jden...@redhat.com
Date: Wed, 14 Dec 2011 15:19:56 -0500
Subject: [PATCH 59-2] Add ipa_memcached service
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

* Adds ipa_memcached SystemV initscript

* Adds ipa_memcached service file and tmpfiles.d/ipa.conf
  to recreate /var/run/ipa_memcached on reboot.

* Adds ipa_memcached config file

* Adds memcacheinstnace.py to manage ipa_memcaced as
  as SimpleService object.

* Updates the IPA service list to include ipa_memcached,
  at service positon 39, httpd is position 40

* Updates the spec file:
  - requires the memcached daemon and python client
  - installs service or initscripts depending on OS
  - installs config file
  - creates /var/run/ipa_memcached directory

* Modifies ipa-server-install to install ipa_memcached
---
 freeipa.spec.in   |   22 ++
 init/SystemV/ipa_memcached.init   |  120 +
 init/ipa_memcached.conf   |5 ++
 init/systemd/ipa.conf.tmpfiles|1 +
 init/systemd/ipa_memcached.service|   13 
 install/tools/ipa-server-install  |4 +
 ipaserver/install/memcacheinstance.py |   26 +++
 ipaserver/install/service.py  |1 +
 8 files changed, 192 insertions(+), 0 deletions(-)
 create mode 100755 init/SystemV/ipa_memcached.init
 create mode 100644 init/ipa_memcached.conf
 create mode 100644 init/systemd/ipa.conf.tmpfiles
 create mode 100644 init/systemd/ipa_memcached.service
 create mode 100644 ipaserver/install/memcacheinstance.py

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 2526a52..7fcbd19 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -109,6 +109,8 @@ Requires: python-ldap
 Requires: python-krbV
 Requires: acl
 Requires: python-pyasn1 = 0.0.9a
+Requires: memcached
+Requires: python-memcached
 %if 0%{?fedora} = 16
 Requires: systemd-units = 36-3
 Requires(pre): systemd-units
@@ -349,12 +351,25 @@ mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
 /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf
 /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf
 mkdir -p %{buildroot}%{_initrddir}
+mkdir %{buildroot}%{_sysconfdir}/sysconfig/
+install -m 644 init/ipa_memcached.conf %{buildroot}%{_sysconfdir}/sysconfig/ipa_memcached
+
+%if 0%{?fedora} = 15
+mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
+install -m 0644 init/systemd/ipa.conf.tmpfiles %{buildroot}%{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
+
+mkdir -p %{buildroot}%{_localstatedir}/run/
+install -d -m 0700 %{buildroot}%{_localstatedir}/run/ipa_memcached/
+
 %if 0%{?fedora} = 16
 # Default to systemd initscripts for F16 and above
 mkdir -p %{buildroot}%{_unitdir}
 install -m 644 init/systemd/ipa.service %{buildroot}%{_unitdir}/ipa.service
+install -m 644 init/systemd/ipa_memcached.service %{buildroot}%{_unitdir}/ipa_memcached.service
 %else
 install -m755 init/SystemV/ipa.init %{buildroot}%{_initrddir}/ipa
+install -m755 init/SystemV/ipa_memcached.init %{buildroot}%{_initrddir}/ipa_memcached
 %endif
 %endif
 
@@ -483,12 +498,19 @@ fi
 %{_sbindir}/ipa-upgradeconfig
 %{_sbindir}/ipa-compliance
 %{_sysconfdir}/cron.d/ipa-compliance
+%config(noreplace) %{_sysconfdir}/sysconfig/ipa_memcached
+%dir %attr(0700,apache,apache) %{_localstatedir}/run/ipa_memcached/
+%if 0%{?fedora} = 15
+%config %{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
 %if 0%{?fedora} = 16
 # Use systemd scheme
 %attr(644,root,root) %{_unitdir}/ipa.service
+%attr(644,root,root) %{_unitdir}/ipa_memcached.service
 %else
 # Use SystemV scheme only before F16
 %attr(755,root,root) %{_initrddir}/ipa
+%attr(755,root,root) %{_initrddir}/ipa_memcached
 %endif
 %dir %{python_sitelib}/ipaserver
 %{python_sitelib}/ipaserver/*
diff --git 

Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-03 Thread John Dennis

On 01/25/2012 09:12 AM, Rob Crittenden wrote:

John Dennis wrote:

This patch supersedes the previous patch, it corrects two issue Rob
raised in a later patch review

The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV systems.

* Typo in the name of the pid file variable in the ipa_memcached initscript



NACK, two small things.

ipa-server-install man page needs to be updated with new option.


I'm going to delete the -M option, things won't run without ipa_memcache_d


ipa_memcached is not chkconfig'd on/off when it is installed/uninstalled.


I'm confused by this, this is handled by the SimpleServiceInstance 
class, it's not chkconfig'd by the spec file, nor should it be.


During install you get this:

Configuring ipa_memcached
  [1/2]: starting ipa_memcached
  [2/2]: configuring ipa_memcached to start on boot
done configuring ipa_memcached.

Which in detail is doing this:

DEBUG Configuring ipa_memcached
DEBUG   [1/2]: starting ipa_memcached
DEBUG args=/bin/systemctl is-active ipa_memcached.service
DEBUG stdout=unknown
DEBUG stderr=
DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
DEBUG args=/bin/systemctl restart ipa_memcached.service
DEBUG stdout=
DEBUG stderr=
DEBUG   duration: 0 seconds
DEBUG   [2/2]: configuring ipa_memcached to start on boot
DEBUG args=/bin/systemctl enable ipa_memcached.service
DEBUG stdout=
DEBUG stderr=ln -s '/lib/systemd/system/ipa_memcached.service' 
'/etc/systemd/system/multi-user.target.wants/ipa_memcached.service'

DEBUG args=/bin/systemctl is-enabled ipa_memcached.service
DEBUG stdout=enabled
DEBUG stderr=
DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
DEBUG args=/bin/systemctl disable ipa_memcached.service
DEBUG stdout=
DEBUG stderr=rm 
'/etc/systemd/system/multi-user.target.wants/ipa_memcached.service'

DEBUG   duration: 0 seconds
DEBUG done configuring ipa_memcached.

As you can see from above on f16 it's not using chkconfig but systemd, 
but it should use chkconfig on other OS's.


So if it's not being chkconfig'd on it's a bug in host installation code.





--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-03 Thread John Dennis

On 02/03/2012 07:58 PM, Simo Sorce wrote:

On Fri, 2012-02-03 at 19:12 -0500, John Dennis wrote:

On 01/25/2012 09:12 AM, Rob Crittenden wrote:

John Dennis wrote:

This patch supersedes the previous patch, it corrects two issue Rob
raised in a later patch review

The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV systems.

* Typo in the name of the pid file variable in the ipa_memcached initscript



NACK, two small things.

ipa-server-install man page needs to be updated with new option.


I'm going to delete the -M option, things won't run without ipa_memcache_d


ipa_memcached is not chkconfig'd on/off when it is installed/uninstalled.


I'm confused by this, this is handled by the SimpleServiceInstance
class, it's not chkconfig'd by the spec file, nor should it be.

During install you get this:

Configuring ipa_memcached
[1/2]: starting ipa_memcached
[2/2]: configuring ipa_memcached to start on boot
done configuring ipa_memcached.

Which in detail is doing this:

DEBUG Configuring ipa_memcached
DEBUG   [1/2]: starting ipa_memcached
DEBUG args=/bin/systemctl is-active ipa_memcached.service
DEBUG stdout=unknown
DEBUG stderr=
DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
DEBUG args=/bin/systemctl restart ipa_memcached.service
DEBUG stdout=
DEBUG stderr=
DEBUG   duration: 0 seconds
DEBUG   [2/2]: configuring ipa_memcached to start on boot
DEBUG args=/bin/systemctl enable ipa_memcached.service
DEBUG stdout=
DEBUG stderr=ln -s '/lib/systemd/system/ipa_memcached.service'
'/etc/systemd/system/multi-user.target.wants/ipa_memcached.service'
DEBUG args=/bin/systemctl is-enabled ipa_memcached.service
DEBUG stdout=enabled
DEBUG stderr=
DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
DEBUG args=/bin/systemctl disable ipa_memcached.service
DEBUG stdout=
DEBUG stderr=rm
'/etc/systemd/system/multi-user.target.wants/ipa_memcached.service'
DEBUG   duration: 0 seconds
DEBUG done configuring ipa_memcached.

As you can see from above on f16 it's not using chkconfig but systemd,
but it should use chkconfig on other OS's.

So if it's not being chkconfig'd on it's a bug in host installation code.


In IPA no service should be started by chkconfig or systemd itself, we
handle all daemons via ipactl and the list we set in LDAP. please do not
diverge.

You get a NACK on the approach, please be consistent with the rest of
IPA controlled services.


This is exactly how the kadmin (e.g. KPASSWD) and ipa_webgui services 
are managed. Also ipa_memcached is controlled by ipactl in exactly the 
same way the other services are. So how is it inconsistent?


Does that mean kadmin(KPASSWD) is also broken?



--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-02-03 Thread Simo Sorce
On Fri, 2012-02-03 at 20:23 -0500, John Dennis wrote:
 On 02/03/2012 07:58 PM, Simo Sorce wrote:
  On Fri, 2012-02-03 at 19:12 -0500, John Dennis wrote:
  On 01/25/2012 09:12 AM, Rob Crittenden wrote:
  John Dennis wrote:
  This patch supersedes the previous patch, it corrects two issue Rob
  raised in a later patch review
 
  The fixed issues are:
 
  * spec file did not install ipa_memcached SysV initscript on SvsV 
  systems.
 
  * Typo in the name of the pid file variable in the ipa_memcached 
  initscript
 
 
  NACK, two small things.
 
  ipa-server-install man page needs to be updated with new option.
 
  I'm going to delete the -M option, things won't run without ipa_memcache_d
 
  ipa_memcached is not chkconfig'd on/off when it is installed/uninstalled.
 
  I'm confused by this, this is handled by the SimpleServiceInstance
  class, it's not chkconfig'd by the spec file, nor should it be.
 
  During install you get this:
 
  Configuring ipa_memcached
  [1/2]: starting ipa_memcached
  [2/2]: configuring ipa_memcached to start on boot
  done configuring ipa_memcached.
 
  Which in detail is doing this:
 
  DEBUG Configuring ipa_memcached
  DEBUG   [1/2]: starting ipa_memcached
  DEBUG args=/bin/systemctl is-active ipa_memcached.service
  DEBUG stdout=unknown
  DEBUG stderr=
  DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
  DEBUG args=/bin/systemctl restart ipa_memcached.service
  DEBUG stdout=
  DEBUG stderr=
  DEBUG   duration: 0 seconds
  DEBUG   [2/2]: configuring ipa_memcached to start on boot
  DEBUG args=/bin/systemctl enable ipa_memcached.service
  DEBUG stdout=
  DEBUG stderr=ln -s '/lib/systemd/system/ipa_memcached.service'
  '/etc/systemd/system/multi-user.target.wants/ipa_memcached.service'
  DEBUG args=/bin/systemctl is-enabled ipa_memcached.service
  DEBUG stdout=enabled
  DEBUG stderr=
  DEBUG Saving StateFile to '/var/lib/ipa/sysrestore/sysrestore.state'
  DEBUG args=/bin/systemctl disable ipa_memcached.service
  DEBUG stdout=
  DEBUG stderr=rm
  '/etc/systemd/system/multi-user.target.wants/ipa_memcached.service'
  DEBUG   duration: 0 seconds
  DEBUG done configuring ipa_memcached.
 
  As you can see from above on f16 it's not using chkconfig but systemd,
  but it should use chkconfig on other OS's.
 
  So if it's not being chkconfig'd on it's a bug in host installation code.
 
  In IPA no service should be started by chkconfig or systemd itself, we
  handle all daemons via ipactl and the list we set in LDAP. please do not
  diverge.
 
  You get a NACK on the approach, please be consistent with the rest of
  IPA controlled services.
 
 This is exactly how the kadmin (e.g. KPASSWD) and ipa_webgui services 
 are managed. Also ipa_memcached is controlled by ipactl in exactly the 
 same way the other services are. So how is it inconsistent?
 
 Does that mean kadmin(KPASSWD) is also broken?

No it means I should not review patches this late :-(

Simo.

-- 
Simo Sorce * Red Hat, Inc * New York

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-01-25 Thread Rob Crittenden

John Dennis wrote:

This patch supersedes the previous patch, it corrects two issue Rob
raised in a later patch review

The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV systems.

* Typo in the name of the pid file variable in the ipa_memcached initscript



NACK, two small things.

ipa-server-install man page needs to be updated with new option.

ipa_memcached is not chkconfig'd on/off when it is installed/uninstalled.

Also, can you update the commit message, it isn't as descriptive as it 
usually is :-)


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-01-23 Thread John Dennis
This patch supersedes the previous patch, it corrects two issue Rob 
raised in a later patch review


The fixed issues are:

* spec file did not install ipa_memcached SysV initscript on SvsV systems.

* Typo in the name of the pid file variable in the ipa_memcached initscript

--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
From d70c159046c86ea40dc704dd27607e7c59d431cf Mon Sep 17 00:00:00 2001
From: John Dennis jden...@redhat.com
Date: Wed, 14 Dec 2011 15:19:56 -0500
Subject: [PATCH 59-1] Modify spec file to add ipa_memcached service Install 
 control ipa_memcached instance
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

---
 freeipa.spec.in   |   22 ++
 init/SystemV/ipa_memcached.init   |  120 +
 init/ipa_memcached.conf   |5 ++
 init/systemd/ipa.conf.tmpfiles|1 +
 init/systemd/ipa_memcached.service|   13 
 install/tools/ipa-server-install  |7 ++
 ipaserver/install/memcacheinstance.py |   26 +++
 ipaserver/install/service.py  |1 +
 8 files changed, 195 insertions(+), 0 deletions(-)
 create mode 100755 init/SystemV/ipa_memcached.init
 create mode 100644 init/ipa_memcached.conf
 create mode 100644 init/systemd/ipa.conf.tmpfiles
 create mode 100644 init/systemd/ipa_memcached.service
 create mode 100644 ipaserver/install/memcacheinstance.py

diff --git a/freeipa.spec.in b/freeipa.spec.in
index 2526a52..7fcbd19 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -109,6 +109,8 @@ Requires: python-ldap
 Requires: python-krbV
 Requires: acl
 Requires: python-pyasn1 = 0.0.9a
+Requires: memcached
+Requires: python-memcached
 %if 0%{?fedora} = 16
 Requires: systemd-units = 36-3
 Requires(pre): systemd-units
@@ -349,12 +351,25 @@ mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
 /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf
 /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf
 mkdir -p %{buildroot}%{_initrddir}
+mkdir %{buildroot}%{_sysconfdir}/sysconfig/
+install -m 644 init/ipa_memcached.conf %{buildroot}%{_sysconfdir}/sysconfig/ipa_memcached
+
+%if 0%{?fedora} = 15
+mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
+install -m 0644 init/systemd/ipa.conf.tmpfiles %{buildroot}%{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
+
+mkdir -p %{buildroot}%{_localstatedir}/run/
+install -d -m 0700 %{buildroot}%{_localstatedir}/run/ipa_memcached/
+
 %if 0%{?fedora} = 16
 # Default to systemd initscripts for F16 and above
 mkdir -p %{buildroot}%{_unitdir}
 install -m 644 init/systemd/ipa.service %{buildroot}%{_unitdir}/ipa.service
+install -m 644 init/systemd/ipa_memcached.service %{buildroot}%{_unitdir}/ipa_memcached.service
 %else
 install -m755 init/SystemV/ipa.init %{buildroot}%{_initrddir}/ipa
+install -m755 init/SystemV/ipa_memcached.init %{buildroot}%{_initrddir}/ipa_memcached
 %endif
 %endif
 
@@ -483,12 +498,19 @@ fi
 %{_sbindir}/ipa-upgradeconfig
 %{_sbindir}/ipa-compliance
 %{_sysconfdir}/cron.d/ipa-compliance
+%config(noreplace) %{_sysconfdir}/sysconfig/ipa_memcached
+%dir %attr(0700,apache,apache) %{_localstatedir}/run/ipa_memcached/
+%if 0%{?fedora} = 15
+%config %{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
 %if 0%{?fedora} = 16
 # Use systemd scheme
 %attr(644,root,root) %{_unitdir}/ipa.service
+%attr(644,root,root) %{_unitdir}/ipa_memcached.service
 %else
 # Use SystemV scheme only before F16
 %attr(755,root,root) %{_initrddir}/ipa
+%attr(755,root,root) %{_initrddir}/ipa_memcached
 %endif
 %dir %{python_sitelib}/ipaserver
 %{python_sitelib}/ipaserver/*
diff --git a/init/SystemV/ipa_memcached.init b/init/SystemV/ipa_memcached.init
new file mode 100755
index 000..b30ea50
--- /dev/null
+++ b/init/SystemV/ipa_memcached.init
@@ -0,0 +1,120 @@
+#! /bin/sh
+#
+# chkconfig: - 55 45
+# description:	The ipa_memcached daemon is a memory cache service for IPA
+# processname: memcached
+# config: /etc/sysconfig/ipa_memcached
+# pidfile: /var/run/ipa_memcached/ipa_memcached.pid
+
+# Standard LSB functions
+#. /lib/lsb/init-functions
+
+# Source function library.
+. /etc/init.d/functions
+
+SOCKET_PATH=/var/run/ipa_memcached/ipa_memcached
+USER=apache
+PIDFILE=/var/run/ipa_memcached/ipa_memcached.pid
+MAXCONN=1024
+CACHESIZE=64
+OPTIONS=
+
+if [ -f /etc/sysconfig/ipa_memcached ];then 
+. /etc/sysconfig/ipa_memcached
+fi
+
+# Check that networking is up.
+. /etc/sysconfig/network
+
+if [ $NETWORKING = no ]
+then
+exit 0
+fi
+
+prog=ipa_memcached
+pidfile=${PIDFILE-/var/run/ipa_memcached/ipa_memcached.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/ipa_memcached}
+
+start () {
+echo -n $Starting $prog: 
+# Ensure that $pidfile directory has proper permissions and exists
+piddir=`dirname $pidfile`
+if [ ! -d $piddir ]; then
+	mkdir $piddir
+fi
+if [ `stat -c %U $piddir` != $USER ]; then
+	chown $USER $piddir
+fi
+
+daemon --pidfile ${pidfile} /usr/bin/memcached -d -s 

Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-01-13 Thread John Dennis

On 01/12/2012 10:53 PM, Rob Crittenden wrote:

John Dennis wrote:

On 01/12/2012 05:36 PM, Rob Crittenden wrote:

John Dennis wrote:

This patch adds an ipa memcached service, it does the following:

* adds SysV initscript for ipa_memcached

* adds systemd service file for ipa_memcached

* adds tmpfiles.d configuration file for /var/run/ipa_memcached

* adds configuration file for ipa_memcached

* adds memcacheinstance.py file to create service instance during server
install

* invokes installation of ipa_memcached during ipa-server-install

* adds dependencies to spec file

* adds ipa_memcached to ipactl service control


The conditionals for  F15 are probably not needed in the spec. Not
worth a NACK on its own.


Because we'll never deploy  f16? Or because you believe there is a
version issue not properly addressed?


Because we would never deploy on  F15 (and more likely F16). Can't
argue with the clarity that this stuff only works on F15+.



Do we need to create /var/run/ipa_memcached/ ourselves?

If the answer is no then ACK.


Not sure I understand the question because the spec file does create
/var/run/ipa_memcached and that directory must exist. Upon reboot it is
recreated because of the tmpfiles configuration in
/etc/tmpfiles.d/ipa.conf for= f15. What is your concern?


I don't see it being created in the spec file:

$ grep ipa_memcached
/tmp/freeipa-jdennis-0059-Modify-spec-file-to-add-ipa_memcached-service.patch
| grep mkdir

rob


It's there, but just crafted a bit differently than what your grep was 
looking for.


+mkdir -p %{buildroot}%{_localstatedir}/run/
+install -d -m 0700 %{buildroot}%{_localstatedir}/run/ipa_memcached/


--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-01-12 Thread Rob Crittenden

John Dennis wrote:

This patch adds an ipa memcached service, it does the following:

* adds SysV initscript for ipa_memcached

* adds systemd service file for ipa_memcached

* adds tmpfiles.d configuration file for /var/run/ipa_memcached

* adds configuration file for ipa_memcached

* adds memcacheinstance.py file to create service instance during server
install

* invokes installation of ipa_memcached during ipa-server-install

* adds dependencies to spec file

* adds ipa_memcached to ipactl service control


The conditionals for  F15 are probably not needed in the spec. Not 
worth a NACK on its own.


Do we need to create /var/run/ipa_memcached/ ourselves?

If the answer is no then ACK.

rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


Re: [Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2012-01-12 Thread Rob Crittenden

John Dennis wrote:

On 01/12/2012 05:36 PM, Rob Crittenden wrote:

John Dennis wrote:

This patch adds an ipa memcached service, it does the following:

* adds SysV initscript for ipa_memcached

* adds systemd service file for ipa_memcached

* adds tmpfiles.d configuration file for /var/run/ipa_memcached

* adds configuration file for ipa_memcached

* adds memcacheinstance.py file to create service instance during server
install

* invokes installation of ipa_memcached during ipa-server-install

* adds dependencies to spec file

* adds ipa_memcached to ipactl service control


The conditionals for F15 are probably not needed in the spec. Not
worth a NACK on its own.


Because we'll never deploy  f16? Or because you believe there is a
version issue not properly addressed?


Because we would never deploy on  F15 (and more likely F16). Can't 
argue with the clarity that this stuff only works on F15+.




Do we need to create /var/run/ipa_memcached/ ourselves?

If the answer is no then ACK.


Not sure I understand the question because the spec file does create
/var/run/ipa_memcached and that directory must exist. Upon reboot it is
recreated because of the tmpfiles configuration in
/etc/tmpfiles.d/ipa.conf for = f15. What is your concern?


I don't see it being created in the spec file:

$ grep ipa_memcached 
/tmp/freeipa-jdennis-0059-Modify-spec-file-to-add-ipa_memcached-service.patch 
| grep mkdir


rob

___
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel


[Freeipa-devel] [PATCH 59] Modify spec file to add ipa_memcached service Install , control ipa_memcached instance

2011-12-14 Thread John Dennis

This patch adds an ipa memcached service, it does the following:

* adds SysV initscript for ipa_memcached

* adds systemd service file for ipa_memcached

* adds tmpfiles.d configuration file for /var/run/ipa_memcached

* adds configuration file for ipa_memcached

* adds memcacheinstance.py file to create service instance during server 
install


* invokes installation of ipa_memcached during ipa-server-install

* adds dependencies to spec file

* adds ipa_memcached to ipactl service control

--
John Dennis jden...@redhat.com

Looking to carve out IT costs?
www.redhat.com/carveoutcosts/
From c782c67086c6873329625000d988322df497fab1 Mon Sep 17 00:00:00 2001
From: John Dennis jden...@redhat.com
Date: Wed, 14 Dec 2011 15:19:56 -0500
Subject: [PATCH 59] Modify spec file to add ipa_memcached service Install 
 control ipa_memcached instance
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit

---
 freeipa.spec.in   |   21 ++
 init/SystemV/ipa_memcached.init   |  120 +
 init/ipa_memcached.conf   |5 ++
 init/systemd/ipa.conf.tmpfiles|1 +
 init/systemd/ipa_memcached.service|   13 
 install/tools/ipa-server-install  |7 ++
 ipaserver/install/memcacheinstance.py |   26 +++
 ipaserver/install/service.py  |1 +
 8 files changed, 194 insertions(+), 0 deletions(-)
 create mode 100755 init/SystemV/ipa_memcached.init
 create mode 100644 init/ipa_memcached.conf
 create mode 100644 init/systemd/ipa.conf.tmpfiles
 create mode 100644 init/systemd/ipa_memcached.service
 create mode 100644 ipaserver/install/memcacheinstance.py

diff --git a/freeipa.spec.in b/freeipa.spec.in
index c14da8b..1ab71e9 100644
--- a/freeipa.spec.in
+++ b/freeipa.spec.in
@@ -109,6 +109,8 @@ Requires: python-ldap
 Requires: python-krbV
 Requires: acl
 Requires: python-pyasn1 = 0.0.9a
+Requires: memcached
+Requires: python-memcached
 %if 0%{?fedora} = 16
 Requires: systemd-units = 36-3
 Requires(pre): systemd-units
@@ -348,12 +350,25 @@ mkdir -p %{buildroot}%{_sysconfdir}/httpd/conf.d/
 /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-pki-proxy.conf
 /bin/touch %{buildroot}%{_sysconfdir}/httpd/conf.d/ipa-rewrite.conf
 mkdir -p %{buildroot}%{_initrddir}
+mkdir %{buildroot}%{_sysconfdir}/sysconfig/
+install -m 644 init/ipa_memcached.conf %{buildroot}%{_sysconfdir}/sysconfig/ipa_memcached
+
+%if 0%{?fedora} = 15
+mkdir -p %{buildroot}%{_sysconfdir}/tmpfiles.d/
+install -m 0644 init/systemd/ipa.conf.tmpfiles %{buildroot}%{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
+
+mkdir -p %{buildroot}%{_localstatedir}/run/
+install -d -m 0700 %{buildroot}%{_localstatedir}/run/ipa_memcached/
+
 %if 0%{?fedora} = 16
 # Default to systemd initscripts for F16 and above
 mkdir -p %{buildroot}%{_unitdir}
 install -m 644 init/systemd/ipa.service %{buildroot}%{_unitdir}/ipa.service
+install -m 644 init/systemd/ipa_memcached.service %{buildroot}%{_unitdir}/ipa_memcached.service
 %else
 install -m755 init/SystemV/ipa.init %{buildroot}%{_initrddir}/ipa
+install -m755 init/SystemV/ipa_memcached.init %{buildroot}%{_initrddir}/ipa_memcached
 %endif
 %endif
 
@@ -482,9 +497,15 @@ fi
 %{_sbindir}/ipa-upgradeconfig
 %{_sbindir}/ipa-compliance
 %{_sysconfdir}/cron.d/ipa-compliance
+%config(noreplace) %{_sysconfdir}/sysconfig/ipa_memcached
+%dir %attr(0700,apache,apache) %{_localstatedir}/run/ipa_memcached/
+%if 0%{?fedora} = 15
+%config %{_sysconfdir}/tmpfiles.d/ipa.conf
+%endif
 %if 0%{?fedora} = 16
 # Use systemd scheme
 %attr(644,root,root) %{_unitdir}/ipa.service
+%attr(644,root,root) %{_unitdir}/ipa_memcached.service
 %else
 # Use SystemV scheme only before F16
 %attr(755,root,root) %{_initrddir}/ipa
diff --git a/init/SystemV/ipa_memcached.init b/init/SystemV/ipa_memcached.init
new file mode 100755
index 000..a4101d9
--- /dev/null
+++ b/init/SystemV/ipa_memcached.init
@@ -0,0 +1,120 @@
+#! /bin/sh
+#
+# chkconfig: - 55 45
+# description:	The ipa_memcached daemon is a memory cache service for IPA
+# processname: memcached
+# config: /etc/sysconfig/ipa_memcached
+# pidfile: /var/run/ipa_memcached/ipa_memcached.pid
+
+# Standard LSB functions
+#. /lib/lsb/init-functions
+
+# Source function library.
+. /etc/init.d/functions
+
+SOCKET_PATH=/var/run/ipa_memcached/ipa_memcached
+USER=apache
+PIDFILE=/var/run/ipa_memcached/ipa_memcached.pid
+MAXCONN=1024
+CACHESIZE=64
+OPTIONS=
+
+if [ -f /etc/sysconfig/ipa_memcached ];then 
+. /etc/sysconfig/ipa_memcached
+fi
+
+# Check that networking is up.
+. /etc/sysconfig/network
+
+if [ $NETWORKING = no ]
+then
+exit 0
+fi
+
+prog=ipa_memcached
+pidfile=${PIDFILE-/var/run/ipa_memcached/ipa_memcached.pid}
+lockfile=${LOCKFILE-/var/lock/subsys/ipa_memcached}
+
+start () {
+echo -n $Starting $prog: 
+# Ensure that $pidfile directory has proper permissions and exists
+piddir=`dirname $pidfile`
+if [ ! -d $piddir ]; then
+	mkdir $piddir
+fi
+if [ `stat -c %U $piddir` != $USER ];