[jboss-jira] [JBoss JIRA] (AS7-4468) Cannot remove and re-add socket-binding group

Kabir Khan (JIRA) jira-events at lists.jboss.org
Fri Jun 8 06:44:18 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4468?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700083#comment-12700083 ] 

Kabir Khan commented on AS7-4468:
---------------------------------

I'm not sure we can clean up the services since that would lead to unsatisfied dependencies which causes the remove to get rolled back.

restart-required means you need to restart, so if I do the following (very inelegant) sequence I manage to do it

{code}
[domain at localhost:9999 /] /socket-binding-group=full-sockets:remove             {             
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => {"main-server-group" => {"host" => {"master" => {
        "server-one" => {"response" => {
            "outcome" => "success",
            "response-headers" => {
                "operation-requires-restart" => true,
                "process-state" => "restart-required"
            }
        }},
        "server-two" => {"response" => {
            "outcome" => "success",
            "response-headers" => {
                "operation-requires-restart" => true,
                "process-state" => "restart-required"
            }
        }}
    }}}}
}
[domain at localhost:9999 /] /server-group=main-server-group:restart-servers
{
    "outcome" => "failed",
    "failure-description" => {"domain-failure-description" => "JBAS014749: Operation handler failed: JBAS010981: Included socket binding group full-sockets is not defined"},
    "rolled-back" => true
}
<<<< Here server-one gets stopped but fails to start again, server-two is still running >>>>>>
[domain at localhost:9999 /] /socket-binding-group=full-sockets:add(default-interface=public)
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => {"main-server-group" => {"host" => {"master" => {"server-two" => {"response" => {
        "outcome" => "success",
        "response-headers" => {
            "operation-requires-restart" => true,
            "process-state" => "restart-required"
        }
    }}}}}}
}
[domain at localhost:9999 /] /server-group=main-server-group:restart-servers       {        
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}
<<<< Server-two gets started. server-one needs the start call to start >>>>>>
[domain at localhost:9999 /] /server-group=main-server-group:start-servers
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => undefined
}
<<<< Both servers are started with missing depenendencies >>>>>>

[domain at localhost:9999 /] /socket-binding-group=full-sockets/socket-binding=http:add(port=8080)
{
    "outcome" => "success",
    "result" => undefined,
    "server-groups" => {"main-server-group" => {"host" => {"master" => {
        "server-one" => {"response" => {"outcome" => "success"}},
        "server-two" => {"response" => {"outcome" => "success"}}
    }}}}
}

<<<< http now works on both servers >>>>>>

{code}

I totally admit that this sucks :-) I'll try to make the socket-binding-group remove fail instead with a meaningful error message if there are running servers using that socket-binding-group.
                
> Cannot remove and re-add socket-binding group
> ---------------------------------------------
>
>                 Key: AS7-4468
>                 URL: https://issues.jboss.org/browse/AS7-4468
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: Domain Management
>    Affects Versions: 7.1.1.Final
>            Reporter: Michael Voegele
>            Assignee: Kabir Khan
>             Fix For: 7.1.3.Final (EAP), 7.2.0.Alpha1
>
>
> Error message when trying to (remove and) add a socket-binding-group in domain mode:
> First remove:
> { "operation" => "remove", "address" => [("socket-binding-group" => "standard-sockets")] }
> Result:
> {
> "outcome" : "success",
> "result" : null,
> "server-groups" : {"server-group-1" : {"server-1" : {
> "host" : "master",
> "response" : {"outcome" : "success"}
> }}}
> }
> Now add again:
> {
> "name" : "standard-sockets",
> "default-interface" : "public",
> "operation" : "add",
> "address" : [{ "socket-binding-group" : "standard-sockets" }]
> }
> Result:
> {
> "outcome" : "failed",
> "result" : null,
> "failure-description" : "JBAS010839: Operation failed or was rolled back on all servers.",
> "rolled-back" : true,
> "server-groups" : {"server-group-1" : {"server-1" : {
> "host" : "master",
> "response" : { "outcome" : "failed", "failure-description" : "JBAS014749: Operation handler failed: Service jboss.socket-binding-manager is already registered", "rolled-back" : true }
> }}}
> }
> For me, this seems a bit strange. If an error shall be produced, then it should be thrown when removing the socket-binding-group, as there is a server running referencing the socket-binding-group via server-group. But if the socket-binding-group can be removed, it should also be possible to add it again (possibly with new defined socket-bindings in the group, then trigger a restart of the server in order to take the newly configured ports into account).

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list