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

(2.5.0 fix) Ambari server upgrade script deletes all .pyc files

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0
    • trunk
    • ambari-server
    • None

    Description

      From customer case:

      We are trying upgrade Ambari from 2.2.2 to Ambari 2.4 with the latest packages (1226).

      https://issues.apache.org/jira/browse/AMBARI-15947 - "Upgrading Ambari should delete any pyc files"

      The patch contains the following two lines

      AMBARI_SERVER="${ROOT}/usr/lib/python2.6/site-packages/ambari_server"
      find $AMBARI_SEVER/ -name *.pyc -exec rm {} \;
      

      The AMBARI_SEVER typo basically executes "find / -name *.pyc -exec rm {} \;"
      on the root directory and deletes ALL pyc files from the ambari server machine.

      This looks like a bug in the latest Ambari package we released yesterday.

      Considering the command has both "rm" and "*" in the same line, lets see if we can use a safer strategy such as changing the CWD and then deleting files.

      Attachments

        1. AMBARI-18305.patch
          1 kB
          Dmitry Lysnichenko

        Issue Links

          Activity

            People

              dmitriusan Dmitry Lysnichenko
              dmitriusan Dmitry Lysnichenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: