ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dmitry Lysnichenko (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (AMBARI-22678) Fix Broken Symlinks on Stack Distribution
Date Thu, 04 Jan 2018 16:44:00 GMT

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

Dmitry Lysnichenko edited comment on AMBARI-22678 at 1/4/18 4:43 PM:
---------------------------------------------------------------------

Committed
   6e58eccdfc..41c362eb97  branch-2.6 -> branch-2.6
   dfb9785519..72812bd2bd  trunk -> trunk


was (Author: dmitriusan):
Committed
   6e58eccdfc..41c362eb97  branch-2.6 -> branch-2.6


> Fix Broken Symlinks on Stack Distribution
> -----------------------------------------
>
>                 Key: AMBARI-22678
>                 URL: https://issues.apache.org/jira/browse/AMBARI-22678
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.6.2
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>            Priority: Blocker
>             Fix For: 2.6.2
>
>         Attachments: AMBARI-22678.patch
>
>
> There are two scenarios to cover here:
> # Ambari never conf-select'd a component (maybe because of a bug or because the component
didn't support it)
> # The conf pointers of a component are broken
> In either event, when distributing a new stack, the code detects this problem (as it
would on a first-time install) and tries to fix it:
> {code}
> /etc/component/conf (directory)
> /usr/hdp/current/component -> /usr/hdp/v1/component
> /usr/hdp/v1/component -> /etc/component/conf
> {code}
> The stack distribution thinks this is a first-time installed and tries to fix the symlinks.
We end up with:
> {code}
> /etc/component/conf -> /usr/hdp/current/component
> /usr/hdp/current/component -> /usr/hdp/v1/component
> /usr/hdp/v1/component -> /etc/component/conf
> /usr/hdp/v2/component -> /etc/component/v2/0
> {code}
> Because we're only conf-selecting v2, v1 never gets corrected since it's already installed.
Thus, we have a circular symlink.
> Most likely the proper fix will be:
> - Iterate over the entire known conf-select structure
> - Check to see the state /etc/component/conf - if it's bad, fix it to defaults
> Chances are we can do this directly in {{conf_select.convert_conf_directories_to_symlinks}}:
> {code}
> stack_name = Script.get_stack_name()
> for directory_struct in dirs:
> if not os.path.exists(directory_struct['conf_dir']):
> Logger.info("Skipping the conf-select tool on {0} since {1} does not exist.".format(
> package, directory_struct['conf_dir']))
> return
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message