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

metainfo.xml should support os families not os types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.6.0
    • None
    • None

    Description

      There are many different packages for ubuntu and suse/rhel (snappy, snappy-
      devel, net-snmp, net-snmp-utils, lzo, lzo-devel, hadoop-lzo, hadoop-lzo-native
      and others). In metainfo our code will turn from this:

                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
          
      
      Will turn into such a copy paste, which is actually the same copy pasted text.
      
          
          
                  <osSpecific>
                    <osType>suse11</osType>
                    <packages>
                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>sles11</osType>
                    <packages>
                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>centos6</osType>
                     <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>centos5</osType>
                    <packages>
                       <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>        
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>redhat6</osType>
                    <packages>
                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>redhat5</osType>
                    <packages>
                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>oraclelinux6</osType>
                    <packages>
                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                  <osSpecific>
                    <osType>oraclelinux5</osType>
                    <packages>
                    <osType>any</osType>
                    <packages>
                      <package>
                        <type>rpm</type>
                        <name>lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-libhdfs</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>hadoop-lzo-native</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>snappy-devel</name>
                      </package>
                      <package>
                        <type>rpm</type>
                        <name>ambari-log4j</name>
                      </package>
                    </packages>
                    </packages>
                  </osSpecific>
                </osSpecifics>
      

      This is so errorprone, we can forget something for some os, and so on. As a
      solution we can check by os family, not os type. And allow comma separated os
      in these tags I best is to use code from os_check.py script to detect
      os_family.

      Attachments

        Issue Links

          Activity

            People

              aonishuk Andrew Onischuk
              aonishuk Andrew Onischuk
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: