Details

    • Type: Improvement Improvement
    • Status: Resolved
    • Priority: Blocker Blocker
    • Resolution: Fixed
    • Affects Version/s: 0.1.2
    • Fix Version/s: 0.1.2
    • Component/s: Build and Test Code
    • Labels:
      None
    • Environment:

      Redhat EL 5.1, Java 6

      Description

      For Chukwa 0.1.1.5 release, it used to create /services/chukwa-*/run as files. In 0.1.2, this has been changed to use symlink in /services. However, the symlink is in %post and %postun. This is a problem for upgrading the RPM file. The symlink should be created at build time.

        Activity

        Hide
        Eric Yang added a comment -

        Ant task to generate rpm has a couple limitations. Ideally, we want to prevent the use of Makefile in our RPM build to prevent unnecessary nested build procedures. However, this means we can't create symlink in %install for RPM build. In addition, Chukwa RPM is design to install in user defined directory. If version 1 of the RPM build is installed in /usr/local/chukwa-1 and version 2 is installed in /usr/local/chukwa-2. It is difficult to keep track weather the symlink should be removed during the upgrade. Hence, the only option is to manage the symlink removal via a fixed file which will always exist between different version of the rpm.

        /etc/init.d/chukwa-collector is a fixed file which always exist across chukwa version. The script is changed to detect existence of this file to determine if the RPM is executed as an uninstall or upgrade. Symlink removal logic will base on the detection and remove at the right time.

        Show
        Eric Yang added a comment - Ant task to generate rpm has a couple limitations. Ideally, we want to prevent the use of Makefile in our RPM build to prevent unnecessary nested build procedures. However, this means we can't create symlink in %install for RPM build. In addition, Chukwa RPM is design to install in user defined directory. If version 1 of the RPM build is installed in /usr/local/chukwa-1 and version 2 is installed in /usr/local/chukwa-2. It is difficult to keep track weather the symlink should be removed during the upgrade. Hence, the only option is to manage the symlink removal via a fixed file which will always exist between different version of the rpm. /etc/init.d/chukwa-collector is a fixed file which always exist across chukwa version. The script is changed to detect existence of this file to determine if the RPM is executed as an uninstall or upgrade. Symlink removal logic will base on the detection and remove at the right time.
        Hide
        Cheng added a comment -

        +1 looks good.

        Show
        Cheng added a comment - +1 looks good.
        Hide
        Eric Yang added a comment -

        I just committed this, thanks Cheng.

        Show
        Eric Yang added a comment - I just committed this, thanks Cheng.
        Hide
        Hudson added a comment -

        Integrated in Chukwa-trunk #26 (See http://hudson.zones.apache.org/hudson/job/Chukwa-trunk/26/)
        . Manage symlink correctly for RPM upgrade and uninstall. (Eric Yang)

        Show
        Hudson added a comment - Integrated in Chukwa-trunk #26 (See http://hudson.zones.apache.org/hudson/job/Chukwa-trunk/26/ ) . Manage symlink correctly for RPM upgrade and uninstall. (Eric Yang)
        Hide
        Hudson added a comment -
        Show
        Hudson added a comment - Integrated in Chukwa-trunk #45 (See http://hudson.zones.apache.org/hudson/job/Chukwa-trunk/45/ )

          People

          • Assignee:
            Eric Yang
            Reporter:
            Eric Yang
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development