qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Wall (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (QPID-5834) Trying to deleting a default virtual host leaves model in inconsistent state
Date Fri, 20 Jun 2014 09:52:24 GMT

    [ https://issues.apache.org/jira/browse/QPID-5834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14038628#comment-14038628
] 

Keith Wall commented on QPID-5834:
----------------------------------

I am producing this error by starting a broker, then sending REST command

curl -v --user admin -X DELETE   http://localhost:8080/api/latest/virtualhost/default/default



> Trying to deleting a default virtual host leaves model in inconsistent state
> ----------------------------------------------------------------------------
>
>                 Key: QPID-5834
>                 URL: https://issues.apache.org/jira/browse/QPID-5834
>             Project: Qpid
>          Issue Type: Bug
>          Components: Java Broker
>    Affects Versions: 0.29
>            Reporter: Keith Wall
>
> If I try to delete the default virtual host, I expect the system to prevent the delete
from happening and the object remain in its current state.
> At the moment, the model gets into an inconsistent state.
> I see an exception in the logs, and through the UI I see the VH in state DELETED but
still attached to the VHN.  It is as if the delete operation is 'half done'.
> {noformat}
> 014-06-20 10:37:40,894 WARN  [qtp1886012265-25] (rest.RestServlet) - Caught exception
> org.apache.qpid.server.model.IntegrityViolationException: Cannot delete default virtual
host 'default'
> 	at org.apache.qpid.server.virtualhost.AbstractVirtualHost.doDelete(AbstractVirtualHost.java:1149)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.attainState(AbstractConfiguredObject.java:643)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.attainStateIfResolved(AbstractConfiguredObject.java:623)
> 	at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:606)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.automatedSetValue(AbstractConfiguredObject.java:374)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.changeAttribute(AbstractConfiguredObject.java:951)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.changeAttributes(AbstractConfiguredObject.java:1234)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$11.execute(AbstractConfiguredObject.java:1213)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$2.execute(TaskExecutorImpl.java:148)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$2.execute(TaskExecutorImpl.java:144)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.executeTask(TaskExecutorImpl.java:298)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.submit(TaskExecutorImpl.java:130)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.run(TaskExecutorImpl.java:250)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.run(TaskExecutorImpl.java:143)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.runTask(AbstractConfiguredObject.java:1190)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject.setAttributes(AbstractConfiguredObject.java:1207)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$7.execute(AbstractConfiguredObject.java:745)
> 	at org.apache.qpid.server.model.AbstractConfiguredObject$7.execute(AbstractConfiguredObject.java:730)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.executeTask(TaskExecutorImpl.java:298)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl.access$400(TaskExecutorImpl.java:43)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper$1.run(TaskExecutorImpl.java:326)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at javax.security.auth.Subject.doAs(Subject.java:356)
> 	at org.apache.qpid.server.configuration.updater.TaskExecutorImpl$CallableWrapper.call(TaskExecutorImpl.java:321)
> 	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 	at java.lang.Thread.run(Thread.java:744)
> {noformat}
> We have validation in the doDelete state change method which throws a IVE, but the state
machinery provided by ACO still lets the state change happen regardless.
> State change methods need a mechanism to veto a state change. 



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message