ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Onischuk (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-5373) metainfo.xml should support os families not os types
Date Mon, 07 Apr 2014 14:56:16 GMT
Andrew Onischuk created AMBARI-5373:
---------------------------------------

             Summary: metainfo.xml should support os families not os types
                 Key: AMBARI-5373
                 URL: https://issues.apache.org/jira/browse/AMBARI-5373
             Project: Ambari
          Issue Type: Bug
            Reporter: Andrew Onischuk
            Assignee: Andrew Onischuk
             Fix For: 1.6.0


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.





--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message