Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-2871

maxscale RPM post-uninstall script has bugs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.3.16
    • 2.3.17, 2.4.7, 2.5.0
    • Core
    • None
    • Centos 7

    Description

      There are a couple of issues in the maxscale post-uninstall scripts.

      #1 The RPM pre/post-uninstall scripts are trying to use "systemd" instead of "systemctl" to manage the systemd services. See errors in following snippit (from rpm -q --scripts)

      preuninstall program: /bin/sh
      postuninstall scriptlet (using /bin/sh):
      #!/bin/sh
       
      # The first argument is the number of packages left after
      # this one has been removed. If it is 0 then the package is being
      # removed from the system.
      if [ "$1" = "0" ] || [ "$1" = "remove" ]
      then
          if [ -f /etc/init.d/maxscale ]
          then
              rm /etc/init.d/maxscale
          fi
       
          if [ -f /etc/ld.so.conf.d/maxscale.conf ]
          then
              rm /etc/ld.so.conf.d/maxscale.conf
          fi
       
          if [ -f /usr/lib/systemd/system/maxscale.service ]
          then
              systemd stop maxscale.service
              rm /usr/lib/systemd/system/maxscale.service
          elif [ -f /lib/systemd/system/maxscale.service ]
          then
              systemd stop maxscale.service
              rm /lib/systemd/system/maxscale.service
          fi
       
          if [ -f /etc/logrotate.d/maxscale_logrotate ]
          then
              rm /etc/logrotate.d/maxscale_logrotate
          fi
      fi
      
      

      #2 - The post-uninstall should also perform a "systemctl disable maxscale.service" to remove the symbolic link from /etc/systemd/system/multi-user.target.wants to /lib/systemd/system for the maxscale.service.

      Attachments

        Issue Links

          Activity

            People

              markus makela markus makela
              rvlane Richard Lane
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.