You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by da...@apache.org on 2014/10/02 11:14:13 UTC
git commit: updated refs/heads/hotfix/4.4/CLOUDSTACK-7219 to 08b9a96
Repository: cloudstack
Updated Branches:
refs/heads/hotfix/4.4/CLOUDSTACK-7219 [created] 08b9a96b7
CLOUDSTACK-7219 added nullcheck to config retrieval
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/08b9a96b
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/08b9a96b
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/08b9a96b
Branch: refs/heads/hotfix/4.4/CLOUDSTACK-7219
Commit: 08b9a96b7c19b94da8b6f934d579a5e0d30f44bf
Parents: 9eb8656
Author: Daan Hoogland <da...@onecht.net>
Authored: Thu Oct 2 11:12:55 2014 +0200
Committer: Daan Hoogland <da...@onecht.net>
Committed: Thu Oct 2 11:12:55 2014 +0200
----------------------------------------------------------------------
server/src/com/cloud/server/ManagementServerImpl.java | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08b9a96b/server/src/com/cloud/server/ManagementServerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/ManagementServerImpl.java b/server/src/com/cloud/server/ManagementServerImpl.java
index da72711..0711fed 100755
--- a/server/src/com/cloud/server/ManagementServerImpl.java
+++ b/server/src/com/cloud/server/ManagementServerImpl.java
@@ -1703,9 +1703,11 @@ public class ManagementServerImpl extends ManagerBase implements ManagementServe
List<ConfigurationVO> configVOList = new ArrayList<ConfigurationVO>();
for (ConfigurationVO param : result.first()) {
ConfigurationVO configVo = _configDao.findByName(param.getName());
- configVo.setValue(_configDepot.get(param.getName()).valueIn(id).toString());
- configVOList.add(configVo);
- }
+ if (configVo != null) {
+ configVo.setValue(_configDepot.get(param.getName()).valueIn(id).toString());
+ configVOList.add(configVo);
+ }
+ }
return new Pair<List<? extends Configuration>, Integer>(configVOList, configVOList.size());
}
Re: git commit: updated refs/heads/hotfix/4.4/CLOUDSTACK-7219 to 08b9a96
Posted by Daan Hoogland <da...@gmail.com>.
On Thu, Oct 2, 2014 at 11:49 AM, Rohit Yadav <ro...@gmail.com> wrote:
> This null check sort of masks the issue that Mgmt server was expecting some
> configuration which does not exist anymore and in this fix we're simply
> ignore when this happens. Should we at least log a warning that a config
> was not found anymore?
>
you are right about the warning, i will add
>
> While it's right for most cases but when someone is upgrading from one
> version of CloudStack to another, we deliberately ignore missing (null)
> configs that don't exist anymore which may affect CloudStack's behaviour.
>
as said this is not solving the upgrade issue and we still need to figure
out a solution for that.
--
Daan
Re: git commit: updated refs/heads/hotfix/4.4/CLOUDSTACK-7219 to 08b9a96
Posted by Rohit Yadav <ro...@gmail.com>.
Hi,
On Thu, Oct 2, 2014 at 11:14 AM, <da...@apache.org> wrote:
>
>
> http://git-wip-us.apache.org/repos/asf/cloudstack/blob/08b9a96b/server/src/com/cloud/server/ManagementServerImpl.java
> ----------------------------------------------------------------------
> diff --git a/server/src/com/cloud/server/ManagementServerImpl.java
> b/server/src/com/cloud/server/ManagementServerImpl.java
> index da72711..0711fed 100755
> --- a/server/src/com/cloud/server/ManagementServerImpl.java
> +++ b/server/src/com/cloud/server/ManagementServerImpl.java
> @@ -1703,9 +1703,11 @@ public class ManagementServerImpl extends
> ManagerBase implements ManagementServe
> List<ConfigurationVO> configVOList = new
> ArrayList<ConfigurationVO>();
> for (ConfigurationVO param : result.first()) {
> ConfigurationVO configVo =
> _configDao.findByName(param.getName());
> -
> configVo.setValue(_configDepot.get(param.getName()).valueIn(id).toString());
> - configVOList.add(configVo);
> - }
> + if (configVo != null) {
> +
> configVo.setValue(_configDepot.get(param.getName()).valueIn(id).toString());
> + configVOList.add(configVo);
> + }
> + }
>
This null check sort of masks the issue that Mgmt server was expecting some
configuration which does not exist anymore and in this fix we're simply
ignore when this happens. Should we at least log a warning that a config
was not found anymore?
While it's right for most cases but when someone is upgrading from one
version of CloudStack to another, we deliberately ignore missing (null)
configs that don't exist anymore which may affect CloudStack's behaviour.
Cheers.