ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk (JIRA)" <>
Subject [jira] [Created] (AMBARI-15762) Component install post processing can not be run in parallel
Date Thu, 07 Apr 2016 14:54:26 GMT
Andrew Onischuk created AMBARI-15762:

             Summary: Component install post processing can not be run in parallel
                 Key: AMBARI-15762
             Project: Ambari
          Issue Type: Bug
            Reporter: Andrew Onischuk
            Assignee: Andrew Onischuk
             Fix For: 2.2.2
         Attachments: AMBARI-15762.patch

Ambari executes component installs in parallel on a host. Each install process
in the post-install phase executes certain shared/common configuration
directory related steps (stacks/HDP/2.0.6/hooks/after-
INSTALL/scripts/ -> ... -> /resource_ma
ks() ) on the directories listed in

The common configuration directory related processing fail in they are kicked
of in the same time for the same directory.

In the case the following code snippet is executed in the same time by
multiple component installs  
each will see the `backup_dir` as non existent and will try to execute the
"cp" command. One will succeed while the others fail.

    Execute(("cp", "-R", "-p", old_conf, backup_dir),  not_if = format("test -e {backup_dir}"),
sudo = True)

Similar behaviour is seen for the following code snippet:

    Execute(as_sudo(["cp", "-R", "-p", os.path.join(old_conf, "*"), versioned_conf], auto_escape=False),
only_if = format("ls -d {old_conf}/*"))

**Possible solution**  
Use the linux "lockfile" command or "mkdir /var/lock/mylock" (see example of
the mkdir solution here: <>)

This message was sent by Atlassian JIRA

View raw message