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

Declare URL uniqueness in repoinfo.xml

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: trunk
    • Component/s: ambari-server
    • Labels:
      None

      Description

      Repository info for a stack can contain any number of repo definitions. For HDP, there are two repos used (HDP and HDP-UTILS). When checking repositories for duplicate URL, the code does this:

      if (! repositoryEntity.getRepositoryId().startsWith("HDP-UTILS") &&  // HDP-UTILS is shared between repo versions
      ! existingRepoVersion.getId().equals(repositoryVersion.getId())) { // Allow modifying already defined repo version
      existingRepoUrls.add(repositoryEntity.getBaseUrl());
      }
      

      We should make the unique declaration directly for the repository so authors don't have to guess. This entails:

      • Change repoinfo.xml to support a <unique> element within <repo>
      • <unique> should apply to, say, versions of HDP that change with each release. Absence of said element implies false for backward compatibility.
      • Change RepositoryVersionResourceProvider.validateRepositoryVersion(...) to use this boolean for uniqueness check.
      • Update the version_definition.xsd to include this new element.

        Attachments

        1. AMBARI-18350.patch
          149 kB
          Dmitry Lysnichenko

          Issue Links

            Activity

              People

              • Assignee:
                dmitriusan Dmitry Lysnichenko
                Reporter:
                dmitriusan Dmitry Lysnichenko
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: