Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-21581

Replace Hard Coded conf-select Structures

    XMLWordPrintableJSON

Details

    • Task
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 2.6.0
    • 2.6.0
    • None
    • None

    Description

      Currently, both the stack-select and conf-select python files have hard-coded structures inside of them which contain mappings for things like configuration directories and stack-select component names.

      This code is really HDP-specific in that it reverses the mappings of the RPMs and allows us to remap /etc/<component>/conf to /usr/hdp/current/<stack-component>/conf

      conf_select.py
      _PACKAGE_DIRS = {
        "atlas": [
          {
            "conf_dir": "/etc/atlas/conf",
            "current_dir": "{0}/current/atlas-client/conf".format(STACK_ROOT_PATTERN)
          }
        ],
        "accumulo": [
          {
            "conf_dir": "/etc/accumulo/conf",
            "current_dir": "{0}/current/accumulo-client/conf".format(STACK_ROOT_PATTERN)
          }
        ],
      ...
      

      With the coming of management packs replacing stacks, we can no longer hard code this in Python. My suggestion is to begin moving this data into a property of some sort. Today, cluster-env exists and would be the only place for it (where the stack-feature tools are now). However, I believe that cluster-env is also going away and being replaced with something similar to "Cluster Settings".

      In any event, this Jira is to track the work needed to replace this logic.

      Attachments

        1. AMBARI-21581.patch
          263 kB
          Jonathan Hurley

        Issue Links

          Activity

            People

              jonathanhurley Jonathan Hurley
              jonathanhurley Jonathan Hurley
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: