summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/posix/QpiddBroker.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QPID-7207: remove cpp and python subdirs from svn trunk, they have migrated ↵Robert Gemmell2016-07-051-250/+0
| | | | | | to their own git repositories git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1751566 13f79535-47bb-0310-9956-ffa450edef68
* QPID-6548: SYSV init scripts do not work properly wiht SSL-only broker.Alan Conway2015-05-201-17/+43
| | | | | | | | | | | | Previously the broker was writing a PID file with the port number as a suffix. This was confusing the tools when using SSL and no explicit port, as the actual listening port is 5671 but qpidd -c was looking for 5672. This commit introduces a simple --pidfile option which writes the pid exactly where you tell it with no frills. The original port-pidfile setup is over complex and not really necessary, it can be deprecated at some future time. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1680550 13f79535-47bb-0310-9956-ffa450edef68
* QPID-5942: qpid HA cluster may end-up in joining state after HA primary is ↵Alan Conway2014-07-311-9/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | killed There are two issues here, both related to the fact that rgmanager sees qpidd and qpidd-primary as two separate services. 1. The service start/stop scripts can be called concurrently. This can lead to running a qpidd process who's pid is not in the pidfile. rgmanager cannot detect or kill this qpidd and cannot start another qpidd because of the lock on the qpidd data directory. 2. rgmanager sees a primary failure as two failures: qpidd and qpidd-primary, and will then try to stop and start both services. The order of these actions is not defined and can lead to rgmanager killing a service it has just started. This patch makes two major changes to the init scripts: 1. Uses flock to lock the sensitive stop/start part of the scripts to ensure they are not executed concurrently. 2. On "stop" the scripts check if a running qpidd is primary or not. "qpidd stop" is a no-op if the running broker is primary, "qpidd-primary stop" is a no op if it is not. This ensures that a broker will be stopped by the same stream of service actions that started it. Minor changes in this patch: - better logging of broker start-up and shut-down sequence. - qpid-ha heartbeat use half of timeout option. - add missing timeouts in qpid-ha. Notes: This changes the behavior of 'clusvcadm -d <qpidd-service>' on the primary node. Previously this would have stopped the qpidd service on that node, killed the qpidd process and relocated the primary service. Now this will stop the qpidd service (as far as rgmanager is concerned) but will not kill qpidd or relocate the primary service. When the primary is relocated the qpidd service wil not be able to re-start on that node until it is re-enabled with 'clusvcadm -e'. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1614895 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4745: Alternative port allocation for tests, instead of 'qpidd --port=0'Alan Conway2013-06-181-3/+3
| | | | | | | | | | | | | | | | | | qpidd-p0 script binds a new port to a socket using bind(0), and then execs qpidd using the --socket-fd option to pass the socket to qpidd. It is intended to replace /path/to/qpidd --port 0 <args...> with qpidd-p0 /path/to/qpidd <args...> Most tests do not yet use qpidd-p0, they will be updated in a future commit. Changes: - Added qpidd-p0 - Fixed qpidd port printing logic: print port only if --port=0, regardless of --transport. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1494306 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4758: Extend the qpidd --wait option to work at shutdownCharles E. Rolke2013-04-241-2/+2
| | | | | | | | | Patch from Ernie Allen and Pavel Moravec. Note: This patch is for the posix platform broker; The windows broker does not use a --wait option and is unaffected by this patch. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1471442 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3689: Fix previous change of command line option handlingAndrew Stitcher2013-04-181-3/+3
| | | | | | | Now introduced new command line option type that is a pure command line switch which can take no boolean argument. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1469466 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4449 - Reverted much of the original change and re-implemented the fix ↵Ted Ross2012-11-301-2/+2
| | | | | | | | | | in a simpler way. The build-define _IN_QPID_BROKER is now used for modules built in the broker. The shared-pointer changes are conditionally compiled only for in-broker cases. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1415796 13f79535-47bb-0310-9956-ffa450edef68
* QPID-4449 - Fixed the API in qpid::management::Manageable to remain backward ↵Ted Ross2012-11-201-2/+2
| | | | | | compatible. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1411761 13f79535-47bb-0310-9956-ffa450edef68
* MQPID-4286: QMF queries for HA replication take too long to process (Jason ↵Alan Conway2012-10-151-2/+2
| | | | | | | | | | Dillaman) Rework ManagementAgent locks, get rid of shared buffers that were points of contention. Minor log message improvements in ha code. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1398530 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3500 C++ qpidd broker --help should work despite parse errorsCharles E. Rolke2012-09-201-6/+10
| | | | | | | | | | This patch finds and processes --version before anything else. Then it finds --help before fully parsing command line options. In the event of a parse error, help usage may be shown as requested. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1388032 13f79535-47bb-0310-9956-ffa450edef68
* NO-JIRA: Reduce message for missing lock file from critical to notice.Alan Conway2012-05-141-2/+8
| | | | | | | | If qpidd -q can't find the lock file, it used to issue a critical error message. This is to harsh, not finding the lock file usually just means the broker isn't running. Demoted to a notice message. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1338365 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3510 - Created a separate option in CommonOptions for the client ↵Ted Ross2012-04-231-2/+2
| | | | | | configuration file. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1329236 13f79535-47bb-0310-9956-ffa450edef68
* QPID-2082: Put all of the C++ code in the source tree into a namespaceAndrew Stitcher2012-03-201-5/+8
| | | | | | - This change moves the remaining non-example code in a namespace git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1302988 13f79535-47bb-0310-9956-ffa450edef68
* Add ability to run broker as a Windows service; resolves QPID-2519.Stephen D. Huston2011-10-211-0/+5
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1187499 13f79535-47bb-0310-9956-ffa450edef68
* QPID-3309: This fix sets the value of the port number in management if the ↵Kim van der Riet2011-07-051-2/+10
| | | | | | broker is started with a port value of 0. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1143078 13f79535-47bb-0310-9956-ffa450edef68
* Ensure broker is deleted in main thread, not by global destructors.Alan Conway2010-07-071-1/+1
| | | | | | | This fixes a race condition that was not handled by r959746. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@961404 13f79535-47bb-0310-9956-ffa450edef68
* Ensure broker is deleted in main thread, not by global destructors.Alan Conway2010-07-011-4/+13
| | | | | | | Finish the fix of r959661 by making it exception safe. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959746 13f79535-47bb-0310-9956-ffa450edef68
* Ensure broker is deleted in main thread, not by global destructors.Alan Conway2010-07-011-0/+2
| | | | | | | Fixes core dumps during shutdown. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@959661 13f79535-47bb-0310-9956-ffa450edef68
* Changed default timeout for daemon to 10 min to allow for long store ↵Kim van der Riet2009-11-041-1/+1
| | | | | | recovery times. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@832762 13f79535-47bb-0310-9956-ffa450edef68
* Pull running acceptor out of Broker run loopAndrew Stitcher2009-10-161-0/+2
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@826033 13f79535-47bb-0310-9956-ffa450edef68
* Have qpidd -q wait till the qpidd process exits before returning.Alan Conway2009-10-131-2/+10
| | | | git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@824894 13f79535-47bb-0310-9956-ffa450edef68
* Merge in initial changes to allow building with CMake; rubygen and ↵Stephen D. Huston2009-04-231-4/+5
| | | | | | managementgen can now generate either .mk files or .cmake files as needed; CONF_FILE and MODULE_DIR macros now have broker/client counterparts QPIDD_CONF_FILE, QPIDD_MODULE_DIR, QPIDC_CONF_FILE, QPIDC_MODULE_DIR configurable by cmake git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@768085 13f79535-47bb-0310-9956-ffa450edef68
* Fix anachronism in --daemon option description.Alan Conway2008-11-271-1/+1
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@721198 13f79535-47bb-0310-9956-ffa450edef68
* QPID-1459: don't call Broker::getPort() with empty string as transportGordon Sim2008-11-131-3/+7
| | | | git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@713720 13f79535-47bb-0310-9956-ffa450edef68
* Split platform-specific qpidd code out to posix/QpiddBroker.cpp; allows ↵Stephen D. Huston2008-10-291-0/+164
Windows port code to come in. Related to QPID-1338 git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@708991 13f79535-47bb-0310-9956-ffa450edef68