<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 01/03/14 13:09, Ade Lee wrote:<br>
</div>
<blockquote cite="mid:1388783340.2439.19.camel@aleeredhat.laptop"
type="cite">
<pre wrap="">These two patches have changes on the dogtag side to allow debian to
start up a dogtag CA. Along with some debian specific patches which
will be kept with the debian repo, we can now pkispawn and run a Dogtag
10 CA on debian!
Please review,
Ade
Patch 179:
Debian: add init script functionality
The addtions in this patch will add start/stop/restart
functionality to operations, so that Debian systems can perform
these operations by calling these functions from an init script.
We also introduce a parameter in the configuration scripts that
can be used to determine if the system is a debian system. This
parameter is used to specify a system V init script instead of
a systemd script on a debian system, when the configuration
scriptlets start and stop a system.
Also source apparently does not work by default in debian. Used
dot (.) instead.
Patch 178:
Debian - replace arch specification
uname -i returns "unknown" on a debian system. "arch" on the other
hand works for fedora, rhel and debian. Replacing these for all
packages except for the migration ones which will not be built on
debian in any case.
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Pki-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Pki-devel@redhat.com">Pki-devel@redhat.com</a>
<a class="moz-txt-link-freetext" href="https://www.redhat.com/mailman/listinfo/pki-devel">https://www.redhat.com/mailman/listinfo/pki-devel</a></pre>
</blockquote>
(1) While I was unable to configure a Debian machine appropriate to
check out these fixes, I did successfully install the patches and
successfully build from source on a Fedora 20 x86_64 machine.<br>
<br>
However, when I attempted to install a CA instance using 'pkispawn
-s CA -f /tmp/pki/ca.cfg', I received the following error:<br>
<blockquote>...<br>
pkispawn : INFO ....... executing 'certutil -N -d
/root/.dogtag/pki-tomcat/ca/alias -f
/root/.dogtag/pki-tomcat/ca/password.conf'<br>
pkispawn : INFO ....... executing 'systemctl start
<a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a>'<br>
Job for <a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a> failed. See 'systemctl
status <a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a>' and 'journalctl -xn' for
details.<br>
pkispawn : ERROR ....... subprocess.CalledProcessError:
Command '['systemctl', 'start', '<a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a>']'
returned non-zero exit status 1!<br>
pkispawn : DEBUG ....... Error Type: CalledProcessError<br>
pkispawn : DEBUG ....... Error Message: Command
'['systemctl', 'start', '<a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a>']'
returned non-zero exit status 1<br>
pkispawn : DEBUG ....... File "/sbin/pkispawn", line 463,
in main<br>
rv = instance.spawn(deployer)<br>
File
"/usr/lib/python2.7/site-packages/pki/server/deployment/scriptlets/configuration.py",
line 97, in spawn<br>
deployer.systemd.start()<br>
File
"/usr/lib/python2.7/site-packages/pki/server/deployment/pkihelper.py",
line 3088, in start<br>
subprocess.check_call(command)<br>
File "/usr/lib64/python2.7/subprocess.py", line 542, in
check_call<br>
raise CalledProcessError(retcode, cmd)<br>
<br>
<br>
Installation failed.<br>
<br>
<br>
# systemctl status -l <a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a><br>
<a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a> - PKI Tomcat Server pki-tomcat<br>
Loaded: loaded (/usr/lib/systemd/system/pki-tomcatd@.service;
enabled)<br>
Active: failed (Result: exit-code) since Fri 2014-01-03
18:59:42 PST; 6min ago<br>
Process: 21904 ExecStartPre=/usr/bin/pkidaemon start tomcat %i
(code=exited, status=1/FAILURE)<br>
<br>
Jan 03 18:59:40 dogtag20.example.com systemd[1]: Starting PKI
Tomcat Server pki-tomcat...<br>
Jan 03 18:59:42 dogtag20.example.com pkidaemon[21904]: WARNING:
Attempting to change symbolic link '/var/lib/pki/pki-tomcat/bin'
to point to target '/usr/share/tomcat7/bin' INSTEAD of current
target '/usr/share/tomcat/bin'!<br>
Jan 03 18:59:42 dogtag20.example.com systemd[1]:
<a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a>: control process exited,
code=exited status=1<br>
Jan 03 18:59:42 dogtag20.example.com systemd[1]: Failed to start
PKI Tomcat Server pki-tomcat.<br>
Jan 03 18:59:42 dogtag20.example.com systemd[1]: Unit
<a class="moz-txt-link-abbreviated" href="mailto:pki-tomcatd@pki-tomcat.service">pki-tomcatd@pki-tomcat.service</a> entered failed state.<br>
<br>
<br>
# journalctl -xn<br>
-- Logs begin at Wed 2013-07-10 14:02:40 PDT, end at Fri
2014-01-03 19:08:02 PST<br>
Jan 03 19:06:01 dogtag20.example.com systemd[1]: Starting Session
21094 o<br>
-- Subject: Unit session-21094.scope has begun with start-up<br>
-- Defined-By: systemd<br>
-- Support:
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
-- <br>
-- Unit session-21094.scope has begun starting up.<br>
Jan 03 19:06:01 dogtag20.example.com systemd[1]: Started Session
21094 of<br>
-- Subject: Unit session-21094.scope has finished start-up<br>
-- Defined-By: systemd<br>
-- Support:
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
-- <br>
-- Unit session-21094.scope has finished starting up.<br>
-- <br>
-- The start-up result is done.<br>
Jan 03 19:06:03 dogtag20.example.com CROND[21984]: (root) CMD
(/usr/bin/r<br>
Jan 03 19:06:25 dogtag20.example.com dbus-daemon[493]: dbus[493]:
[system<br>
Jan 03 19:06:25 dogtag20.example.com dbus[493]: [system]
Activating via s<br>
Jan 03 19:06:25 dogtag20.example.com dbus[493]: [system]
Activation via s<br>
Jan 03 19:06:25 dogtag20.example.com dbus-daemon[493]: dbus[493]:
[system<br>
Jan 03 19:08:01 dogtag20.example.com systemd[1]: Starting Session
21095 o<br>
-- Subject: Unit session-21095.scope has begun with start-up<br>
-- Defined-By: systemd<br>
-- Support:
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
-- <br>
-- Unit session-21095.scope has begun starting up.<br>
Jan 03 19:08:01 dogtag20.example.com systemd[1]: Started Session
21095 of<br>
-- Subject: Unit session-21095.scope has finished start-up<br>
-- Defined-By: systemd<br>
-- Support:
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/systemd-devel">http://lists.freedesktop.org/mailman/listinfo/systemd-devel</a><br>
-- <br>
-- Unit session-21095.scope has finished starting up.<br>
-- <br>
-- The start-up result is done.<br>
Jan 03 19:08:02 dogtag20.example.com CROND[21995]: (root) CMD
(/usr/bin/r<br>
</blockquote>
<br>
(2) One concern that I can see from reviewing the code appears that
the 'stop' and 'restart' commands will still not work on Debian, as
the entry point which comes from 'pkidaemon' will utilize the '*'
option which will yield the following messages:<br>
<blockquote>unknown action (stop)<br>
Usage: /usr/bin/pkidaemon {start|stop|restart|status}
instance-type [instance-name]<br>
...<br>
<br>
unknown action (restart)<br>
Usage: /usr/bin/pkidaemon {start|stop|restart|status}
instance-type [instance-name]<br>
...<br>
<br>
NOTE: These commands SHOULD yield this on Fedora systems, but NOT
on Debian systems.<br>
</blockquote>
(3) Finally, the following white spaces were present in your patches
when they were applied:<br>
<blockquote># git am ../*.patch<br>
Applying: Debian - replace arch specification<br>
Applying: Debian: add init script functionality<br>
/home/mharmsen/DOGTAG/test/pki/.git/rebase-apply/patch:18:
trailing whitespace.<br>
<br>
/home/mharmsen/DOGTAG/test/pki/.git/rebase-apply/patch:61:
trailing whitespace.<br>
command = ["/etc/init.d/pki-tomcatd", "stop", <br>
/home/mharmsen/DOGTAG/test/pki/.git/rebase-apply/patch:76:
trailing whitespace.<br>
command = ["/etc/init.d/pki-tomcatd", "restart", <br>
warning: 3 lines add whitespace errors.<br>
</blockquote>
<br>
</body>
</html>