ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-12125) If agent is not restarted after upgrade, it reads new version file and registers as a new version
Date Wed, 24 Jun 2015 18:19:04 GMT

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

Hudson commented on AMBARI-12125:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #2991 (See [https://builds.apache.org/job/Ambari-trunk-Commit/2991/])
AMBARI-12125. If agent is not restarted after upgrade, it reads new version file and registers
as a new version (dlysnichenko) (dlysnichenko: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d998d056fcfc3de56eb9b905eb2a84075b28e291)
* ambari-agent/src/main/python/ambari_agent/Controller.py
* ambari-agent/src/test/python/ambari_agent/TestRegistration.py
* ambari-agent/src/main/python/ambari_agent/Register.py
* ambari-agent/src/test/python/ambari_agent/TestController.py


> If agent is not restarted after upgrade, it reads new version file and registers as a
new version
> -------------------------------------------------------------------------------------------------
>
>                 Key: AMBARI-12125
>                 URL: https://issues.apache.org/jira/browse/AMBARI-12125
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>             Fix For: 2.1.0
>
>         Attachments: AMBARI-12125.patch
>
>
> I think now I understand how issue occurs. 
> I had consideration for a while that traceback does not match lines in CustomServiceOrchestrator.py
source. Now the picture is complete: line numbers match exactly CustomServiceOrchestrator.py
as it appears in 2.0.maint branch. 
> That means that agent on affected host was upgraded, but not restarted after package
upgrade. 
> The bug here is in workflow:
> - server is upgraded 
> - agents on hosts are upgraded. Linux systems allow overwriting files in use (e.g. running
binaries)
> - agent on all hosts but one are restarted
> - server is restarted
> - agent, that was not upgraded, registers on server. During registration, it provides
version that appears at /var/lib/ambari-agent/data/version file. But agent version file is
already upgraded! So *old* agent executable reads *new* version file, and successfully registers
on server.
> That is an actual bug.
> The fix probably would be to substitute agent version directly into agent script, and
not into separate files. Python would not re-import sources after upgrade.
> The same applies to the server upgrade.
> Another option is to check if agent is running from package upgrade scripts.



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

Mime
View raw message