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 subversion and git services (JIRA)" <ji...@apache.org> on 2013/07/16 03:27:46 UTC

[jira] [Commented] (CLOUDSTACK-3539) Management server ip in global configuration is not updated after first boot up in the developer environment

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

ASF subversion and git services commented on CLOUDSTACK-3539:
-------------------------------------------------------------

Commit 2f85c806553ffdf390b04a47516e9b580a05f846 in branch refs/heads/4.2 from [~yasker]
[ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=2f85c80 ]

CLOUDSTACK-3539: Fix wrong management ip when server start up

The value "localhost" for mgmt server should be over-written anyway.

                
> Management server ip in global configuration is not updated after first boot up in the developer environment
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: CLOUDSTACK-3539
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-3539
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>    Affects Versions: 4.2.0
>            Reporter: Sheng Yang
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> It's caused by:
> commit 4e4112fcecc4f2791ec99b774f81988f8c416d77
> Author: Edison Su <su...@gmail.com>
> Date:   Thu May 23 13:51:14 2013 -0700
>     fix attach volume for kvm
> diff --git a/server/src/com/cloud/server/ConfigurationServerImpl.java b/server/src/com/cloud/server/ConfigurationServerImpl.java
> index bc52e9a..98f1c96 100755
> --- a/server/src/com/cloud/server/ConfigurationServerImpl.java
> +++ b/server/src/com/cloud/server/ConfigurationServerImpl.java
> @@ -224,9 +224,20 @@ public class ConfigurationServerImpl extends ManagerBase implements Configuratio
>              }
>  
>              String hostIpAdr = NetUtils.getDefaultHostIp();
> +            boolean needUpdateHostIp = true;
>              if (hostIpAdr != null) {
> -                _configDao.update(Config.ManagementHostIPAdr.key(), Config.ManagementHostIPAdr.getCategory(), hostIpAdr);
> -                s_logger.debug("ConfigurationServer saved \"" + hostIpAdr + "\" as host.");
> +               Boolean devel = Boolean.valueOf(_configDao.getValue("developer"));
> +               if (devel) {
> +                       String value = _configDao.getValue(Config.ManagementHostIPAdr.key());
> +                       if (value != null) {
> +                               needUpdateHostIp = false;
> +                       }
> +               }
> +               
> +               if (needUpdateHostIp) {
> +                        _configDao.update(Config.ManagementHostIPAdr.key(), Config.ManagementHostIPAdr.getCategory(), hostIpAdr);
> +                     s_logger.debug("ConfigurationServer saved \"" + hostIpAdr + "\" as host.");
> +               }
>              }
> If devel is true, value would be checked against null, but the default value is "localhost" for my machine, so the IP wouldn't be picked up then e.g. SSVM cannot connect to mgmt server.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira