Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-31146

Panic if log_level settings is missing in function deployed using rest API

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.0.0
    • 6.0.0
    • eventing
    • None
    • Untriaged
    • No

    Description

      Build 6.0.0-1592

      Coming from- https://forums.couchbase.com/t/possible-bug-eventing-log-error-on-missing-log-level/18198

      Observed following panic when deployed a function without log_level in settings using rest API.

      On UI it shows bootstrapping and user cannot undeploy or delete a function. 

      Here is command used:

      curl -v -XPOST -d '{  "appname": "test1",  "appcode": "function OnUpdate(doc, meta) {}",  "depcfg": {    "Buckets": [      {        "alias": "bucket_test",        "bucket_name": "eventing-bucket-1"      }    ],    "metadata_bucket": "eventing",    "source_bucket": "bucket-1"  },  "settings": {    "dcp_stream_boundary": "from_now",    "deployment_status": true,    "processing_status": true,    "execution_timeout": 60  }}'  http://Administrator:password@172.23.97.177:8096/api/v1/functions/test1

      Logs- https://s3.amazonaws.com/bugdb/jira/log_level_eventing/collectinfo-2018-09-04T054125-ns_1%40172.23.97.177.zip

      Panic:

       

      2018/09/03 22:35:15 Supervisor super_supervisor: super_supervisor: Failed service 'Producer => function: test1 tcpPort: ' (1.000000 failures of 5.000000), restarting: true, error: interface conversion: interface {} is nil, not string, stacktrace: goroutine 10516 [running]:
      github.com/couchbase/eventing/suptree.(*Supervisor).runService.func1.1(0xc42030e000, 0x1)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/suptree/supervisor.go:392 +0xbc
      panic(0xbf37e0, 0xc42a95cb80)
      /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/runtime/panic.go:502 +0x229
      github.com/couchbase/eventing/producer.(*Producer).parseDepcfg(0xc42dabdc00, 0xd38b30, 0xc42dabdc00)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/producer/depcfg_parser.go:342 +0x3978
      github.com/couchbase/eventing/producer.(*Producer).Serve(0xc42dabdc00)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/producer/producer.go:90 +0x70
      github.com/couchbase/eventing/suptree.(*Supervisor).runService.func1(0xc42030e000, 0xb896b2e800000001, 0xdc0580, 0xc42dabdc00)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/suptree/supervisor.go:398 +0x63
      created by github.com/couchbase/eventing/suptree.(*Supervisor).runService
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/suptree/supervisor.go:388 +0x5b
      2018-09-03T22:35:15.269-07:00 [Info] Producer::parseDepcfg [test1] Opening up application file
      2018/09/03 22:35:20 Supervisor super_supervisor: super_supervisor: Failed service 'Producer => function: test1 tcpPort: ' (1.890698 failures of 5.000000), restarting: true, error: interface conversion: interface {} is nil, not string, stacktrace: goroutine 10462 [running]:
      github.com/couchbase/eventing/suptree.(*Supervisor).runService.func1.1(0xc42030e000, 0x1)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/suptree/supervisor.go:392 +0xbc
      panic(0xbf37e0, 0xc4289e5e80)
      /home/couchbase/.cbdepscache/exploded/x86_64/go-1.10.3/go/src/runtime/panic.go:502 +0x229
      github.com/couchbase/eventing/producer.(*Producer).parseDepcfg(0xc42dabdc00, 0xd38b30, 0xc42dabdc00)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/producer/depcfg_parser.go:342 +0x3978
      github.com/couchbase/eventing/producer.(*Producer).Serve(0xc42dabdc00)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/producer/producer.go:90 +0x70
      github.com/couchbase/eventing/suptree.(*Supervisor).runService.func1(0xc42030e000, 0x1, 0xdc0580, 0xc42dabdc00)
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/suptree/supervisor.go:398 +0x63
      created by github.com/couchbase/eventing/suptree.(*Supervisor).runService
      /home/couchbase/jenkins/workspace/couchbase-server-unix/goproj/src/github.com/couchbase/eventing/suptree/supervisor.go:388 +0x5b
      

       

      Attachments

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

        Activity

          People

            asingh Abhishek Singh (Inactive)
            mahesh.mandhare Mahesh Mandhare (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty