I agree with your proposition around the virtual host node code changes.

I have created a jira for it:

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


Regards,

Adel

________________________________
From: Rob Godfrey <[email protected]>
Sent: Monday, October 16, 2017 3:32:32 PM
To: [email protected]
Subject: Re: [Qpid Java Broker 6.1.4] Broker is ready even if an error is 
occuring on startup and failStartupWithErroredChild set to true

On 16 October 2017 at 13:08, Adel Boutros <[email protected]> wrote:

> Hello Rob,
>
> If a virtual host is not available, then all queues and persisted messages
> are currently unavailable and the broker can be considered in a critical
> state due to the messages unavailability.
>
> Is there a way to enforce that a broker will fail to startup unless all of
> its virtual host are started correctly via an option?
>
>
Not to my knowledge, no (and in some cases with HA, the vhost won't be up
unless this particular broker is the current master).  I think there would
need to be a change to the standard virtual host node code so that if there
is an error when the underlying virtual host is opened, then the virtual
host node itself is put into the errored state - this would cover the
"normal" (non-HA) case while still allowing HA virtual host nodes to not
block the broker coming up..

-- Rob


> Regards,
> Adel
> ________________________________
> From: Rob Godfrey <[email protected]>
> Sent: Monday, October 16, 2017 11:50:34 AM
> To: [email protected]
> Subject: Re: [Qpid Java Broker 6.1.4] Broker is ready even if an error is
> occuring on startup and failStartupWithErroredChild set to true
>
> Hi Adel,
>
> I think broker.failStartupWithErroredChild=true will only cause the broker
> to fail if a *direct* child of the broker fails to start, the vhost is a
> child of the vhostnode, so if the vhost node starts up, the broker doesn't
> fail.
>
> -- Rob
>
> On 16 October 2017 at 11:16, Adel Boutros <[email protected]> wrote:
>
> > Hello,
> >
> >
> > Using the Qpid Java Broker 6.1.4, I have noticed that even if i specify
> > "set QPID_OPTS=-Dbroker.failStartupWithErroredChild=true" and my JDBC
> > virtual host cannot start, then the broker is set to ready.
> >
> >
> > Is this expected?
> >
> >
> > 2017-10-16 11:11:02,520 ERROR [VirtualHostNode-default-Config]
> (o.a.q.s.m.AbstractConfiguredObject)
> > - Failed to open object with name 'default'.  Object will be put into
> ERROR
> > state.
> > org.apache.qpid.server.configuration.IllegalConfigurationException:
> > Attribute 'tableNamePrefix' instance of org.apache.qpid.server.
> > virtualhost.jdbc.JDBCVirtualHostImplWithAccessChecking named 'default'
> > cannot have value 'broker-single-component'. Valid values pattern is:
> > [a-zA-Z_0-9]*
> > at org.apache.qpid.server.model.AbstractConfiguredObject.onValidate(
> > AbstractConfiguredObject.java:1307)
> > at org.apache.qpid.server.virtualhost.AbstractVirtualHost.onValidate(
> > AbstractVirtualHost.java:358)
> > at org.apache.qpid.server.model.AbstractConfiguredObject.doValidation(
> > AbstractConfiguredObject.java:1161)
> > at org.apache.qpid.server.model.AbstractConfiguredObject$1.execute(
> > AbstractConfiguredObject.java:582)
> > at org.apache.qpid.server.model.AbstractConfiguredObject$1.execute(
> > AbstractConfiguredObject.java:571)
> > at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(
> > AbstractConfiguredObject.java:632)
> > at org.apache.qpid.server.model.AbstractConfiguredObject$2.execute(
> > AbstractConfiguredObject.java:625)
> > at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$
> > TaskLoggingWrapper.execute(TaskExecutorImpl.java:252)
> > at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$
> > CallableWrapper$1.run(TaskExecutorImpl.java:324)
> > at java.security.AccessController.doPrivileged(Native Method)
> > at javax.security.auth.Subject.doAs(Subject.java:360)
> > at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$
> > CallableWrapper.call(TaskExecutorImpl.java:317)
> > at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> > at java.util.concurrent.ThreadPoolExecutor.runWorker(
> > ThreadPoolExecutor.java:1142)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(
> > ThreadPoolExecutor.java:617)
> > at java.lang.Thread.run(Thread.java:745)
> > 2017-10-16 11:11:02,565 INFO  [Broker-Config] (q.m.b.listening) -
> [Broker]
> > BRK-1002 : Starting : Listening on TCP port 42812
> > 2017-10-16 11:11:02,567 INFO  [Broker-Config] (q.m.m.startup) - [Broker]
> > MNG-1001 : Web Management Startup
> > 2017-10-16 11:11:02,704 INFO  [Broker-Config] (q.m.m.listening) -
> [Broker]
> > MNG-1002 : Starting : HTTP : Listening on TCP port 42813
> > 2017-10-16 11:11:02,706 INFO  [Broker-Config] (q.m.m.ready) - [Broker]
> > MNG-1004 : Web Management Ready
> > 2017-10-16 11:11:02,751 INFO  [Broker-Config] (q.m.b.ready) - [Broker]
> > BRK-1004 : Qpid Broker Ready
> >
> >
> >
> > Regards,
> >
> > Adel
> >
>

Reply via email to