Uploaded image for project: 'JBoss Web Server'
  1. JBoss Web Server
  2. JWS-155

User experience issues with Solaris Tomcat .postinstall.tomcat

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • JWS 3.0.1 CR1
    • JWS 3.0.1 DR1, JWS 3.0.1 DR2, JWS 3.0.1 ER1
    • tomcat7, tomcat8
    • None
    • User Experience
    • Hide

      Unzip jws-application-servers-3.0.1-DR1-sun10.*.zip and play with .postinstall.tomcat as an unprivileged user.

      Show
      Unzip jws-application-servers-3.0.1-DR1-sun10.*.zip and play with .postinstall.tomcat as an unprivileged user.

      Similarly to the JWS-153 Numerous inconsistencies and user experience issues with Solaris Apache HTTP Server .postinstall.httpd, there are severe issues with .postinstall.tomcat on Solaris.

      Some of the selected notes:

      • it requires root privileges and exits without them; there is no reason for such behaviour and we should provide a fall-back alternative, customer case 01454946
      • it does not check whether it had been executed before (i.e. no check for $INSTALL_ROOT/etc/.postinstall.tomcat.done
      • it contains unnecessary differences between 32bit and 64bit versions
      • Tomcat8 and Tomcat7 code is copy-pasted, one below the other instead of looping over [tomcat7, tomcat8] and reusing the same block of code
      • jar version dependent symlinks

      Suggested improvement

      This is a drop-in replacement for: .postinstall.tomcat. Please, have a look at it, review the code and use it, if possible.
      THX

      Output from an unprivileged execution:

      [hudson@dev32-02 etc]$ ./.postinstall.tomcat 
      WARNING: This script should be run as superuser to create user `tomcat' and directories in `/var/'.
      WARNING: Using different root directory then `/opt/jws-3.0'
      WARNING: Not a superuser. User and group `tomcat' will not be created. User `hudson' used instead.
      WARNING: Not a superuser. Directories in `/var/' will not be created. Using `/tmp/delete/jws-3.0/var/' instead.
      Adding JAVA_HOME=/qa/tools/opt/solaris11_sparc/jdk1.8.0_last to the configuration ...
      WARNING: Not a superuser. User `hudson' used as TOMCAT_USER in /tmp/delete/jws-3.0/etc/sysconfig/tomcat7.
      Preserving file: /tmp/delete/jws-3.0/etc/sysconfig/tomcat7
      Adding JAVA_HOME=/qa/tools/opt/solaris11_sparc/jdk1.8.0_last to the configuration ...
      WARNING: Not a superuser. User `hudson' used as TOMCAT_USER in /tmp/delete/jws-3.0/etc/sysconfig/tomcat8.
      Preserving file: /tmp/delete/jws-3.0/etc/sysconfig/tomcat8
      WARNING: Not a superuser. Solaris runtime linker environment `crle' was not updated.
      Done
      

      User is clearly informed about what's going on and why, what are the implications of executing the script as a non-root user and so on.

        1. 0001-JWS-155-jws-application-servers.patch
          4 kB
          Karm Karm
        2. 0001-JWS-155-tomcat7.patch
          4 kB
          Karm Karm
        3. 0001-JWS-155-tomcat7.patch.new
          4 kB
          Karm Karm
        4. 0001-JWS-155-tomcat8.patch
          4 kB
          Karm Karm
        5. 0001-JWS-155-tomcat8.patch.new
          4 kB
          Karm Karm

              rhn-engineering-mturk Mladen Turk
              mbabacek1@redhat.com Karm Karm
              Jean-Frederic Clere
              Karm Karm Karm Karm
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: