You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cloudstack.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2015/12/16 11:35:46 UTC

[jira] [Commented] (CLOUDSTACK-9181) Syntax error in checkrouter.sh when interface is missing

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

ASF GitHub Bot commented on CLOUDSTACK-9181:
--------------------------------------------

GitHub user remibergsma opened a pull request:

    https://github.com/apache/cloudstack/pull/1249

    CLOUDSTACK-9181 Prevent syntax error in checkrouter.sh

    Added quotes to prevent syntax errors in weird situations.
    
    Error seen in mgt server:
    ```
    2015-12-15 14:30:32,371 DEBUG [c.c.a.m.AgentManagerImpl] (RedundantRouterStatusMonitor-7:ctx-0dd8ef3e) Details from executing class com.cloud.agent.api.CheckRouterCommand: Status: UNKNOWN
    /opt/cloud/bin/checkrouter.sh: line 28: [: =: unary operator expected
    /opt/cloud/bin/checkrouter.sh: line 31: [: =: unary operator expected
    ```
    Cause:
    ```
    root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
    ./checkrouter.sh: line 28: [: =: unary operator expected
    ./checkrouter.sh: line 31: [: =: unary operator expected
    Status: UNKNOWN
    ```
    
    Somehow a nic was missing.
    
    After fix the script can handle this:
    
    ```
    root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
    Status: UNKNOWN
    ```
    
    The other states are also reported fine:
    ```
    root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
    Status: MASTER
    ```
    
    ```
    root@r-1192-VM:/opt/cloud/bin# ./checkrouter.sh
    Status: BACKUP
    ```


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/remibergsma/cloudstack fix-checkrouter-script

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cloudstack/pull/1249.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1249
    
----
commit b7785fc70e95d8da5936fcad34de026d1d04982a
Author: Remi Bergsma <gi...@remi.nl>
Date:   2015-12-16T10:27:26Z

    CLOUDSTACK-9181 Prevent syntax error in checkrouter.sh

----


> Syntax error in checkrouter.sh when interface is missing
> --------------------------------------------------------
>
>                 Key: CLOUDSTACK-9181
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9181
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Virtual Router
>    Affects Versions: 4.7.0
>            Reporter: Remi Bergsma
>
> Error seen in mgt server:
> 2015-12-15 14:30:32,371 DEBUG [c.c.a.m.AgentManagerImpl] (RedundantRouterStatusMonitor-7:ctx-0dd8ef3e) Details from executing class com.cloud.agent.api.CheckRouterCommand: Status: UNKNOWN
> /opt/cloud/bin/checkrouter.sh: line 28: [: =: unary operator expected
> /opt/cloud/bin/checkrouter.sh: line 31: [: =: unary operator expected
> root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
> ./checkrouter.sh: line 28: [: =: unary operator expected
> ./checkrouter.sh: line 31: [: =: unary operator expected
> Status: UNKNOWN
> Somehow a nic was missing.
> After fix the script can handle this:
> root@r-1191-VM:/opt/cloud/bin# ./checkrouter.sh
> Status: UNKNOWN



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)