commit 5246cf21147191e3b1ef6d9448f0b92f5a2e9d2a
Merge: 64ba262 8fe72ef
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed Feb 12 17:06:22 2014 -0500
Merge remote-tracking branch 'origin/dev' into brolley/dev
commit 64ba262d1beb232703013db4001cb512d1790ff3
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed Feb 12 17:02:49 2014 -0500
Support ipv6 and unix domain socket control connections in pmlogger
and pmlc.
pmlogger now listens on ipv6 and on a local unix domain socket
(on supported platforms) for control connections.
pmlc can now use ipv6 addresses as well as unix:{path] and
local:[path] urls to connect to pmlogger.
commit dcf64bb7b71d3d0aa3717ec79ff3a3c1d613031b
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed Feb 12 10:37:12 2014 -0500
pmlc: ConnectPMCD: Catch potential NULL return from strdup.
commit 8e8684fd55ed95627bca8b20f67c3c633e651721
Author: Dave Brolley <brolley@xxxxxxxxxx>
Date: Wed Feb 12 10:32:53 2014 -0500
Handle PR_AF_LOCAL in the NSPR implementation of __pmGetNameInfo.
Was already handled by the native implementation.
---------------------------------------------------
With these changes, on supported platforms, pmlogger now opens IPv6
sockets on the configured ports and a unix domain docket for control
connections. The unix domain socket is named pmlogger.<pid>.socket and
is created in PCP_RUN_DIR (the same location as pmcd.socket). If the
pmlogger is primary, a hard link to the socket called
pmlogger.primary.socket is also created in the same directory.
On supported platforms, pmlc can now connect to pmlogger via its ipv6
and unix domain sockets. Ipv6 addresses may now be specified on the -h
option. As with pmcd, the -h option of pmlc now also supports the
unix:[path] and local:[path] urls. As with pmcd, the local: url means to
try unix: first followed by localhost, if unsuccessful. These urls are
used in combination with the -P, -p and <pid> arguments to select the
correct socket as follows:
-h unix:/some/path - attempts to connect using the socket at
/some/path
-h unix:/some/path -P - rejected: conflicting requests
-h unix:/some/path -p <port> - rejected: unix domain sockets do not use
a port number
-h unix:/some/path <pid> - rejected: conflicting requests
-h unix: - rejected: not enough information
-h unix: -P - attempts to connect using the socket at
$PCP_RUN_DIR/pmlogger.primary.socket
-h unix: -p <port> - rejected: unix domain sockets do not use
a port number
-h unix: <pid> - attempts to connect using the socket at
$PCP_RUN_DIR/pmlogger.<pid>.socket
-h local:/some/path - attempts to connect using the socket at
/some/path
-h local:/some/path -P - attempts to connect using the socket at
/some/path
if unsuccessful, tries to connect as in
-h localhost -P
-h local:/some/path -p <port> - attempts to connect using the socket at
/some/path
if unsuccessful, tries to connect as in
-h localhost -p <port>
-h local:/some/path <pid> - attempts to connect using the socket at
/some/path
if unsuccessful, tries to connect as in
-h localhost <pid>
-h local: - rejected: not enough information
-h local -P - attempts to connect using the socket at
$PCP_RUN_DIR/pmlogger.primary.socket
if unsuccessful, tries to connect as in
-h localhost -P
-h local: -p <port> - attempts to connect as in -h localhost
-p <port>
-h local: <pid> - attempts to connect using the socket at
$PCP_RUN_DIR/pmlogger.<pid>.socket
if unsuccessful, tries to connect as in
-h localhost <pid>
The default for -h is now local:
Similarly, unix:[path] and local:[path] urls are now allowed on 'show
loggers' and 'connect' commands in the pmlc interactive command
interpreter. They have the same effect on selection of a pmlogger as
above. IPv6 addresses are not supported here because inet addresses are
also not currently supported.
The pmlogger access controls have also been updated, in the same way as
pmcd was, to accept ipv6 addresses and wildcards as well as unix:[path]
and local:[path] urls and wildcards. The default pmlogger access control
has been changed to
[access]
disallow .* : all;
disallow :* : all;
allow local:* : enquire;
and pmlogconf.sh has been updated accordingly along with
_writable_primary_logger and _restore_primary_logger in qa/common.check.
With respect to pmlogconf.sh, I expected it to be run as part of the
build process or as part of the rpm install, however it does not appear
to be. These access control changes are now necessary for correct
accesss to pmlogger since the old "disallow * : all;" prevents access
via unix:. A similar change was required for the default pmcd access
controls at the time they were implemented. How do we ensure that all
users get the updated access config for pmlogger?
There is some qa fallout due to altered output for some tests with
respect to host names. I am in the process of addressing these.
Comments please!
Dave
|