ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hadoop QA (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-13320) Cannot Perform RU If Ambari Server Is Not A Part of the Cluster
Date Tue, 06 Oct 2015 11:34:26 GMT

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

Hadoop QA commented on AMBARI-13320:
------------------------------------

{color:red}-1 overall{color}.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12765160/AMBARI-13320.patch
  against trunk revision .

    {color:red}-1 patch{color}.  The patch command could not apply the patch.

Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/3907//console

This message is automatically generated.

> Cannot Perform RU If Ambari Server Is Not A Part of the Cluster
> ---------------------------------------------------------------
>
>                 Key: AMBARI-13320
>                 URL: https://issues.apache.org/jira/browse/AMBARI-13320
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.2
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>             Fix For: 2.1.3
>
>         Attachments: AMBARI-13320.patch
>
>
> A commit was merged into {{branch-2.1}} and {{branch-2.1.2}} which prevents a rolling
upgrade from starting unless the Ambari Server is a part of the cluster. When Ambari is not
a part of the cluster, a hostname is not correctly chosen for server-side actions and the
following exception is thrown at upgrade time:
> {code}
> java.lang.NullPointerException
> 	at org.apache.ambari.server.actionmanager.ActionDBAccessorImpl.persistActions(ActionDBAccessorImpl.java:300)
> 	at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:68)
> 	at org.apache.ambari.server.actionmanager.ActionManager.sendActions(ActionManager.java:99)
> 	at org.apache.ambari.server.controller.internal.RequestStageContainer.persist(RequestStageContainer.java:216)
> 	at org.apache.ambari.server.controller.internal.UpgradeResourceProvider.createUpgrade(UpgradeResourceProvider.java:752)
> 	at org.apache.ambari.server.controller.internal.UpgradeResourceProvider.access$100(UpgradeResourceProvider.java:116)
> 	at org.apache.ambari.server.controller.internal.UpgradeResourceProvider$1.invoke(UpgradeResourceProvider.java:284)
> 	at org.apache.ambari.server.controller.internal.UpgradeResourceProvider$1.invoke(UpgradeResourceProvider.java:274)
> 	at org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:272)
> 	at org.apache.ambari.server.controller.internal.UpgradeResourceProvider.createResources(UpgradeResourceProvider.java:274)
> 	at org.apache.ambari.server.controller.internal.ClusterControllerImpl.createResources(ClusterControllerImpl.java:289)
> {code}
> The problem is the following line of code:
> https://github.com/apache/ambari/blob/branch-2.1.2/ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java#L1281
> {code}
>     String hostName = null;
>     Collection<Long> hostIds = cluster.getAllHostsDesiredConfigs().keySet();
>     if (!hostIds.isEmpty()) {
>       Long hostId = hostIds.iterator().next();
>       HostEntity hostEntity = s_hostDAO.findById(hostId);
>       if (hostEntity != null) {
>         hostName = hostEntity.getHostName();
>       }
>     }
> ...
>     stage.addServerActionCommand(task.getImplementationClass(), Role.AMBARI_SERVER_ACTION,
>         RoleCommand.EXECUTE, cluster.getClusterName(),
>         new ServiceComponentHostServerActionEvent(null, System.currentTimeMillis()),
commandParams,
>         itemDetail, null, Integer.valueOf(1200), allowRetry,
>         context.isComponentFailureAutoSkipped());
> {code}
> The calculated {{hostName}} is never used to construct the server-side action. The fix
is simple - use the {{hostName}} when creating the action.



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

Mime
View raw message