Qpid
  1. Qpid
  2. QPID-3510

Holes in C++ client configuration

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.12
    • Fix Version/s: 0.17
    • Component/s: C++ Client
    • Labels:
      None

      Description

      Configuration of the C++ (and wrapped) clients suffers from the following limitations:

      1) Logging cannot be configured from the client configuration file. The log module is only configurable via environment variables.

      2) Client configuration cannot be loaded from an alternative configuration file. The configuration file defined in the build is the only file that can be loaded for any application using the C++ client libraries.

        Activity

        Hide
        Ted Ross added a comment -

        Some notes on this issue:

        The issue of not being able to configure logging from the client configuration file remains a problem for which there is no easy solution. The reason for this is that the cluster module dynamically loads the client library at run time in order to set up an update-peer relationship between cluster nodes. When this occurs, the client and broker log configurations can conflict with each other.

        Since the client can be loaded by the broker, it is necessary to have separate configuration file options for broker and client configurations. Using the same option "config", leads to conflicts and ambiguities in configuration loading.

        The solution is to leave "config" (QPID_CONFIG) as the broker configuration file option and to add "client-config" (QPID_CLIENT_CONFIG) as the client configuration file option (for both pure-client operation and client-in-broker operation).

        Allowing log configuration to be configured for pure client operation in the client configuration file will remain un-solved for now.

        Show
        Ted Ross added a comment - Some notes on this issue: The issue of not being able to configure logging from the client configuration file remains a problem for which there is no easy solution. The reason for this is that the cluster module dynamically loads the client library at run time in order to set up an update-peer relationship between cluster nodes. When this occurs, the client and broker log configurations can conflict with each other. Since the client can be loaded by the broker, it is necessary to have separate configuration file options for broker and client configurations. Using the same option "config", leads to conflicts and ambiguities in configuration loading. The solution is to leave "config" (QPID_CONFIG) as the broker configuration file option and to add "client-config" (QPID_CLIENT_CONFIG) as the client configuration file option (for both pure-client operation and client-in-broker operation). Allowing log configuration to be configured for pure client operation in the client configuration file will remain un-solved for now.
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-04-19 14:05:36, Gordon Sim wrote:

        > trunk/qpid/cpp/include/qpid/sys/Env.h, line 34

        > <https://reviews.apache.org/r/4802/diff/1/?file=102984#file102984line34>

        >

        > Why is this in the public API?

        Ted Ross wrote:

        Good point, I'll move that to src.

        On that basis, ship it!

        • Gordon

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4802/#review7029
        -----------------------------------------------------------

        On 2012-04-19 13:56:16, Ted Ross wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4802/

        -----------------------------------------------------------

        (Updated 2012-04-19 13:56:16)

        Review request for qpid, Alan Conway and Gordon Sim.

        Summary

        -------

        This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables.

        This addresses bug QPID-3510.

        https://issues.apache.org/jira/browse/QPID-3510

        Diffs

        -----

        trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION

        trunk/qpid/cpp/src/CMakeLists.txt 1327943

        trunk/qpid/cpp/src/Makefile.am 1327943

        trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943

        trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION

        trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION

        Diff: https://reviews.apache.org/r/4802/diff

        Testing

        -------

        Thanks,

        Ted

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-04-19 14:05:36, Gordon Sim wrote: > trunk/qpid/cpp/include/qpid/sys/Env.h, line 34 > < https://reviews.apache.org/r/4802/diff/1/?file=102984#file102984line34 > > > Why is this in the public API? Ted Ross wrote: Good point, I'll move that to src. On that basis, ship it! Gordon ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/#review7029 ----------------------------------------------------------- On 2012-04-19 13:56:16, Ted Ross wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/ ----------------------------------------------------------- (Updated 2012-04-19 13:56:16) Review request for qpid, Alan Conway and Gordon Sim. Summary ------- This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables. This addresses bug QPID-3510 . https://issues.apache.org/jira/browse/QPID-3510 Diffs ----- trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION trunk/qpid/cpp/src/CMakeLists.txt 1327943 trunk/qpid/cpp/src/Makefile.am 1327943 trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943 trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943 trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943 trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION Diff: https://reviews.apache.org/r/4802/diff Testing ------- Thanks, Ted
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-04-19 14:05:36, Gordon Sim wrote:

        > trunk/qpid/cpp/include/qpid/sys/Env.h, line 34

        > <https://reviews.apache.org/r/4802/diff/1/?file=102984#file102984line34>

        >

        > Why is this in the public API?

        Good point, I'll move that to src.

        • Ted

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4802/#review7029
        -----------------------------------------------------------

        On 2012-04-19 13:56:16, Ted Ross wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4802/

        -----------------------------------------------------------

        (Updated 2012-04-19 13:56:16)

        Review request for qpid, Alan Conway and Gordon Sim.

        Summary

        -------

        This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables.

        This addresses bug QPID-3510.

        https://issues.apache.org/jira/browse/QPID-3510

        Diffs

        -----

        trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION

        trunk/qpid/cpp/src/CMakeLists.txt 1327943

        trunk/qpid/cpp/src/Makefile.am 1327943

        trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943

        trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION

        trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION

        Diff: https://reviews.apache.org/r/4802/diff

        Testing

        -------

        Thanks,

        Ted

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-04-19 14:05:36, Gordon Sim wrote: > trunk/qpid/cpp/include/qpid/sys/Env.h, line 34 > < https://reviews.apache.org/r/4802/diff/1/?file=102984#file102984line34 > > > Why is this in the public API? Good point, I'll move that to src. Ted ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/#review7029 ----------------------------------------------------------- On 2012-04-19 13:56:16, Ted Ross wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/ ----------------------------------------------------------- (Updated 2012-04-19 13:56:16) Review request for qpid, Alan Conway and Gordon Sim. Summary ------- This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables. This addresses bug QPID-3510 . https://issues.apache.org/jira/browse/QPID-3510 Diffs ----- trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION trunk/qpid/cpp/src/CMakeLists.txt 1327943 trunk/qpid/cpp/src/Makefile.am 1327943 trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943 trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943 trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943 trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION Diff: https://reviews.apache.org/r/4802/diff Testing ------- Thanks, Ted
        Hide
        jiraposter@reviews.apache.org added a comment -

        On 2012-04-19 14:03:15, Alan Conway wrote:

        > Just need to make sure it doesn't break windows.

        Windows is currently stubbed so it should behave as it did before with regard to env variables. I'll test it prior to commit.

        • Ted

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4802/#review7028
        -----------------------------------------------------------

        On 2012-04-19 13:56:16, Ted Ross wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4802/

        -----------------------------------------------------------

        (Updated 2012-04-19 13:56:16)

        Review request for qpid, Alan Conway and Gordon Sim.

        Summary

        -------

        This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables.

        This addresses bug QPID-3510.

        https://issues.apache.org/jira/browse/QPID-3510

        Diffs

        -----

        trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION

        trunk/qpid/cpp/src/CMakeLists.txt 1327943

        trunk/qpid/cpp/src/Makefile.am 1327943

        trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943

        trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION

        trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION

        Diff: https://reviews.apache.org/r/4802/diff

        Testing

        -------

        Thanks,

        Ted

        Show
        jiraposter@reviews.apache.org added a comment - On 2012-04-19 14:03:15, Alan Conway wrote: > Just need to make sure it doesn't break windows. Windows is currently stubbed so it should behave as it did before with regard to env variables. I'll test it prior to commit. Ted ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/#review7028 ----------------------------------------------------------- On 2012-04-19 13:56:16, Ted Ross wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/ ----------------------------------------------------------- (Updated 2012-04-19 13:56:16) Review request for qpid, Alan Conway and Gordon Sim. Summary ------- This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables. This addresses bug QPID-3510 . https://issues.apache.org/jira/browse/QPID-3510 Diffs ----- trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION trunk/qpid/cpp/src/CMakeLists.txt 1327943 trunk/qpid/cpp/src/Makefile.am 1327943 trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943 trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943 trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943 trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION Diff: https://reviews.apache.org/r/4802/diff Testing ------- Thanks, Ted
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4802/#review7029
        -----------------------------------------------------------

        trunk/qpid/cpp/include/qpid/sys/Env.h
        <https://reviews.apache.org/r/4802/#comment15618>

        Why is this in the public API?

        • Gordon

        On 2012-04-19 13:56:16, Ted Ross wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4802/

        -----------------------------------------------------------

        (Updated 2012-04-19 13:56:16)

        Review request for qpid, Alan Conway and Gordon Sim.

        Summary

        -------

        This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables.

        This addresses bug QPID-3510.

        https://issues.apache.org/jira/browse/QPID-3510

        Diffs

        -----

        trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION

        trunk/qpid/cpp/src/CMakeLists.txt 1327943

        trunk/qpid/cpp/src/Makefile.am 1327943

        trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943

        trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION

        trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION

        Diff: https://reviews.apache.org/r/4802/diff

        Testing

        -------

        Thanks,

        Ted

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/#review7029 ----------------------------------------------------------- trunk/qpid/cpp/include/qpid/sys/Env.h < https://reviews.apache.org/r/4802/#comment15618 > Why is this in the public API? Gordon On 2012-04-19 13:56:16, Ted Ross wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/ ----------------------------------------------------------- (Updated 2012-04-19 13:56:16) Review request for qpid, Alan Conway and Gordon Sim. Summary ------- This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables. This addresses bug QPID-3510 . https://issues.apache.org/jira/browse/QPID-3510 Diffs ----- trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION trunk/qpid/cpp/src/CMakeLists.txt 1327943 trunk/qpid/cpp/src/Makefile.am 1327943 trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943 trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943 trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943 trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION Diff: https://reviews.apache.org/r/4802/diff Testing ------- Thanks, Ted
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4802/#review7028
        -----------------------------------------------------------

        Ship it!

        Just need to make sure it doesn't break windows.

        • Alan

        On 2012-04-19 13:56:16, Ted Ross wrote:

        -----------------------------------------------------------

        This is an automatically generated e-mail. To reply, visit:

        https://reviews.apache.org/r/4802/

        -----------------------------------------------------------

        (Updated 2012-04-19 13:56:16)

        Review request for qpid, Alan Conway and Gordon Sim.

        Summary

        -------

        This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables.

        This addresses bug QPID-3510.

        https://issues.apache.org/jira/browse/QPID-3510

        Diffs

        -----

        trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION

        trunk/qpid/cpp/src/CMakeLists.txt 1327943

        trunk/qpid/cpp/src/Makefile.am 1327943

        trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943

        trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943

        trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION

        trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION

        Diff: https://reviews.apache.org/r/4802/diff

        Testing

        -------

        Thanks,

        Ted

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/#review7028 ----------------------------------------------------------- Ship it! Just need to make sure it doesn't break windows. Alan On 2012-04-19 13:56:16, Ted Ross wrote: ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/ ----------------------------------------------------------- (Updated 2012-04-19 13:56:16) Review request for qpid, Alan Conway and Gordon Sim. Summary ------- This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables. This addresses bug QPID-3510 . https://issues.apache.org/jira/browse/QPID-3510 Diffs ----- trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION trunk/qpid/cpp/src/CMakeLists.txt 1327943 trunk/qpid/cpp/src/Makefile.am 1327943 trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943 trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943 trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943 trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION Diff: https://reviews.apache.org/r/4802/diff Testing ------- Thanks, Ted
        Hide
        jiraposter@reviews.apache.org added a comment -

        -----------------------------------------------------------
        This is an automatically generated e-mail. To reply, visit:
        https://reviews.apache.org/r/4802/
        -----------------------------------------------------------

        Review request for qpid, Alan Conway and Gordon Sim.

        Summary
        -------

        This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables.

        This addresses bug QPID-3510.
        https://issues.apache.org/jira/browse/QPID-3510

        Diffs


        trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION
        trunk/qpid/cpp/src/CMakeLists.txt 1327943
        trunk/qpid/cpp/src/Makefile.am 1327943
        trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943
        trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943
        trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943
        trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION
        trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION

        Diff: https://reviews.apache.org/r/4802/diff

        Testing
        -------

        Thanks,

        Ted

        Show
        jiraposter@reviews.apache.org added a comment - ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/4802/ ----------------------------------------------------------- Review request for qpid, Alan Conway and Gordon Sim. Summary ------- This patch allows client applications to use configuration files other than the installed default. It also allows logging options to be supplied via the configuration file, not just environment variables. This addresses bug QPID-3510 . https://issues.apache.org/jira/browse/QPID-3510 Diffs trunk/qpid/cpp/include/qpid/sys/Env.h PRE-CREATION trunk/qpid/cpp/src/CMakeLists.txt 1327943 trunk/qpid/cpp/src/Makefile.am 1327943 trunk/qpid/cpp/src/qpid/client/ConnectionImpl.cpp 1327943 trunk/qpid/cpp/src/qpid/client/LoadPlugins.cpp 1327943 trunk/qpid/cpp/src/qpid/client/SslConnector.cpp 1327943 trunk/qpid/cpp/src/qpid/sys/posix/Env.cpp PRE-CREATION trunk/qpid/cpp/src/qpid/sys/windows/Env.cpp PRE-CREATION Diff: https://reviews.apache.org/r/4802/diff Testing ------- Thanks, Ted

          People

          • Assignee:
            Ted Ross
            Reporter:
            Ted Ross
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development