Uploaded image for project: 'Logging analytics'
  1. Logging analytics
  2. LOG-69 Logging Code Refactoring
  3. LOG-70

LoggingContext.requestId required NULL handling in aai/aai-common (20170607)

    XMLWordPrintable

    Details

    • Type: Sub-task
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: Amsterdam Release
    • Labels:
      None
    • Sprint:
      LOG Sprint 7

      Description

       Reproduction: Clean deployment - do a cloud-region put - the same one that is at the start of vFW testing  (before creating a customer) - you should not see a null pointer in the log anymore of AAI resources when tailing the log

      see

      https://wiki.onap.org/display/DW/Vetted+vFirewall+Demo+-+Full+draft+how-to+for+F2F+and+ReadTheDocs#VettedvFirewallDemo-Fulldrafthow-toforF2FandReadTheDocs-vFirewallTasks 

       

      from postman:code

      PUT /aai/v11/cloud-infrastructure/cloud-regions/cloud-region/Openstack/RegionOne HTTP/1.1
      Host: 34.232.186.178:30233
      Accept: application/json
      Content-Type: application/json
      X-FromAppId: AAI
      X-TransactionId: get_aai_subscr
      Authorization: Basic QUFJOkFBSQ==
      Cache-Control: no-cache
      Postman-Token: d5de805a-3053-9fa3-55ba-256a60182458

      {
      "cloud-owner": "Openstack",
      "cloud-region-id": "RegionOne",
      "cloud-region-version": "v1",
      "cloud-type": "SharedNode",
      "cloud-zone": "CloudZone",
      "owner-defined-type": "OwnerType",
      "tenants": {
      "tenant": [{
      "tenant-id": "1035021",
      "tenant-name": "ecomp-dev"
      }]
      }
      }

       

      Fyi,

         The following works out of the box on the 20171004:0800 tag of ONAP deployed to OOM – AAI is working if you have a prepopulated region – or you previously do a PUT request

       

      PUT on

      https://aai_ip:aai_port/aai/v8/cloud-infrastructure/cloud-regions/cloud-region/IAD/RegionOne

      GET on

      https://aai_ip:aai_port/aai/v11/cloud-infrastructure/cloud-regions/

       

      {    "cloud-region": [

              {

                  "cloud-owner": "IAD",

                  "cloud-region-id": "RegionOne",

                  "cloud-type": "SharedNode",

                  "owner-defined-type": "OwnerType",

                  "cloud-region-version": "v1",

                  "cloud-zone": "CloudZone",

                  "sriov-automation": false,

                  "resource-version": "1507147808029"

              } ]}

       

      The NPE looks like a separate bug where the requestId String passed into the static log function is not null checked

      org.onap.aai.logging.LoggingContext:117 

      If(requestId.contains(“:”)

      Should be

      If(null != requestId && requestId.contains(“:”)

       

      Since the IAE catch block will not generate a UUID for a null requestId

       

      I’ll put in a JIRA to AAI – this is log related

       

      java.lang.NullPointerException: null

                      at org.onap.aai.logging.LoggingContext.requestId(LoggingContext.java:119)

      Thank you

      /michael

        Attachments

          Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            Activity

              People

              Assignee:
              michaelobrien Michael O'Brien
              Reporter:
              michaelobrien Michael O'Brien
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: