Uploaded image for project: 'Product Technical Learning'
  1. Product Technical Learning
  2. PTL-5736

RH134-121: Grading script (lab-disk) shows incorrect results (fails where it should be pass)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • RH134 - RHEL 7 3 20170803
    • RH134 - RHEL 7 0
    • RH134
    • None
    • Actual classroom setup with the latest from instructorcentral as of 22 July 2014

      URL:
      Reporter RHNID:
      Section: -
      Language: ||||||||
      Workaround:

      Description: lab disk grade failed when priorities is the other way round.

      /etc/fstab
      UUID=xx swap swap pri=1 0 0
      UUID=xx swap swap defaults 0 0

      lab-disk was looking for '-1 1' pattern .

      but my swap priorities was listed the other way round

      1. swapon -s
        ...
        /dev/vdb2 partition 524284 0 1
        /dev/vdb3 partition 524284 0 -1

      And the script failed me due to the order difference

      Proposed solution:
      File : /usr/local/bin/lab-disk
      Function: check_swap()

      Add another if condition to cater for swap priorities listed the other way round
      -------- code snippet BEGIN -----
      if [ "$PRI" = "-1 1" ] ; then
      print_PASS
      elif [ "$PRI" = "1 -1" ] ; then
      print_PASS
      else
      print_FAIL
      echo "Did not find swap priorities of -1 and 1."
      fi
      -------- code snippet END -----

              rht-mjarrett Michael Jarrett
              bkthong Boon Keng Thong (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: