Uploaded image for project: 'AdMaxLocal'
  1. AdMaxLocal
  2. AML-4151

AML System Anamolies script reading values from algorithm.properties

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Not a Bug
    • Affects Version/s: Mercury
    • Fix Version/s: None
    • Component/s: Other / Misc.
    • Labels:
      None
    • Environment:

      QA7

      Build details
      ops-scripts-3.0.0-BETA1

      Description

      When we run AMLSystemAnamolies.py script its throwing IndexError. I found that the script is trying to access the one of the property from algorithm.properties. As per Mercury that property is now moved to database.

      Log

      [amlops@aml-qa7-monman1 techOps-Utils]$ ./AMLSystemAnamolies.py aml-qa7-mysql1
      sudo: unknown user: nagios
      sudo: unable to initialize policy plugin
      Traceback (most recent call last):
      File "./AMLSystemAnamolies.py", line 546, in <module>
      main()
      File "./AMLSystemAnamolies.py", line 505, in main
      maxBidStr = values[0]
      IndexError: list index out of range

      Snippet of the code

      #Get bidmodifier information
      stackName = hostName.replace("-mysql1", "")
      coreServerName = stackName + "-core1"
      bidSettingsFileName = "/usr/local/tsa/algorithm.properties"

      #Get the maxBid setting in core server
      commandStr = "com.thesearchagency.admax.algorithms.sabb.maxBid.google." + resellerCurrencyCode[0]
      command="sudo -u nagios ssh -i /home/nagios/.ssh/nagios_id_rsa nagios@"coreServerName" 'grep "commandStr" "bidSettingsFileName"'"
      values = ((subprocess.Popen(['/bin/bash', '-c', command], stdout=subprocess.PIPE)).communicate()[0]).splitlines()

      maxBidStr = values[0] //Error Line code
      maxBidList = maxBidStr.split("=")

      maxBidVal = "-1"
      if (len(maxBidList) > 1):
      maxBidVal = maxBidList[1]
      maxBidVal.strip("")
      maxBidVal.rstrip("")
      print "maxBid configured on stack is: " + str(maxBidVal)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              anil.kumar Anil Kumar Halmadgi
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: