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

knoxsso-topology does not get written to disk after update in Ambari UI

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.5.0
    • None
    • ambari-server
    • HDP 2.6.2.0
      Ambari 2.5.0.3
      Knox 0.12.0

    Description

      It appears the knoxsso-topology is NOT updated on disk after changed in the Ambari UI because of the following code in /var/lib/ambari-server/resources/common-services/KNOX/0.5.0.2.2/package/scripts/knox.py:
       
        if params.version_formatted and check_stack_feature(StackFeature.KNOX_SSO_TOPOLOGY, params.version_formatted):
            File(os.path.join(params.knox_conf_dir, "topologies", "knoxsso.xml"),
               group=params.knox_group,
               owner=params.knox_user,
               content=InlineTemplate(params.knoxsso_topology_template)
            )
       
      The if condition is preventing the knoxsso.xml from being written as indicated in the log of a restart of Knox Service:
       
      2018-07-12 12:42:43,870 - Generating config: /usr/hdp/current/knox-server/conf/gateway-site.xml
      2018-07-12 12:42:43,871 - File['/usr/hdp/current/knox-server/conf/gateway-site.xml'] {'owner': 'knox', 'content': InlineTemplate(...), 'group': 'knox', 'mode': None, 'encoding': 'UTF-8'}
      2018-07-12 12:42:43,879 - File['/usr/hdp/current/knox-server/conf/gateway-log4j.properties'] {'content': InlineTemplate(...), 'owner': 'knox', 'group': 'knox', 'mode': 0644}
      2018-07-12 12:42:43,887 - File['/usr/hdp/current/knox-server/conf/topologies/default.xml'] {'content': InlineTemplate(...), 'owner': 'knox', 'group': 'knox'}
      2018-07-12 12:42:43,890 - File['/usr/hdp/current/knox-server/conf/topologies/admin.xml'] {'content': InlineTemplate(...), 'owner': 'knox', 'group': 'knox'}
      2018-07-12 12:42:43,891 - Execute['/usr/hdp/current/knox-server/bin/knoxcli.sh create-master --master [PROTECTED]'] {'environment':

      {'JAVA_HOME': u'/usr/jdk64/jdk1.8.0_112'}

      , 'not_if': "ambari-sudo.sh su knox -l -s /bin/bash -c 'test -f /usr/hdp/current/knox-server/data/security/master'", 'user': 'knox'}
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            jackson Christopher Jackson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: