[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-3539?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sheng Yang closed CLOUDSTACK-3539.
----------------------------------


Close the issue because it's in developer environment and verified by developer.
                
> 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
>            Assignee: Sheng Yang
>            Priority: Blocker
>             Fix For: 4.2.0
>
>
> It's caused by:
> commit 4e4112fcecc4f2791ec99b774f81988f8c416d77
> Author: Edison Su <[email protected]>
> 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

Reply via email to