Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8202977

upgradeJDK.sh script should validate provided source jdk repository

    XMLWordPrintable

    Details

    • CPU:
      x86_64, sparc_64
    • OS:
      linux, solaris

      Description

      There was no validation check on provided source directory (--repo ) if it exists or not. Even if it doesn't exist, it will continue with further steps of calculating number of folders inside.
      Case 1: When no repo 'input' directory exists
      Logs were like below:
              [2018-05-07 11:21:25 ] No path to jdk bundle provided, will process repo path
              ls: cannot access 'input': No such file or directory
              basename: missing operand
              Try 'basename --help' for more information.
              ls: cannot access 'input': No such file or directory
              [2018-05-07 11:21:25 ] No folders found in input
              [2018-05-07 11:21:25 ] step setComputedVariables error: No folders found in input
              [2018-05-07 11:21:25 ] Exiting upgrade with error status: 1
              [2018-05-07 11:21:25 ] FAIL
              [2018-05-07 11:21:25 ] Closing output and exiting. upgradeJDK.sh END.


      Case 2 : When input folder has one folder inside but that's not exploded bundle (e.g. JDK/8u121) . It will still continue with copying files and creating staging area :
      [2018-05-11 06:08:07 ] Executing with args: --repo JDK --apptop output/
      [2018-05-11 06:08:07 ] No logfile created. Output to syslog only.
      [2018-05-11 06:08:07 ] upgradeJDK.sh BEGIN
      [2018-05-11 06:08:07 ] No path to jdk bundle provided, will process repo path
      [2018-05-11 06:08:07 ] Will copy folder 8u121
      [2018-05-11 06:08:07 ] Creating staging area in "/webbugs/priyanka/upgradeJDK/output"
      [2018-05-11 06:08:07 ] Copying ~250M of files. This may take a few minutes...
      [2018-05-11 06:08:08 ] Copy finished
      [2018-05-11 06:08:08 ] Unexpected java version output: ")"
      [2018-05-11 06:08:08 ] The version reported by the jvm copied from /webbugs/priyanka/upgradeJDK/JDK/8u121 was expected to match '' but instead reports: ''. Manually verify repository location and jdk version settings before attempting this upgrade again.
      [2018-05-11 06:08:08 ] Removing staged upgrade files due to version mismatch.
      [2018-05-11 06:08:08 ] Removing "/webbugs/priyanka/upgradeJDK/output/tmp.w4aimA"
      [2018-05-11 06:08:08 ] step validateNewJdk error: Unexpected java version output: ")"
      [2018-05-11 06:08:08 ] Exiting upgrade with error status: 1
      [2018-05-11 06:08:08 ] FAIL
      [2018-05-11 06:08:08 ] Closing output and exiting. upgradeJDK.sh END.

      Similarly script should validate destination directory (apptop) also.

        Attachments

          Activity

            People

            Assignee:
            pmangal Priyanka Mangal (Inactive)
            Reporter:
            pmangal Priyanka Mangal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: