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

Change message from Success to Queued

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Critical
    • 6.0.0
    • 6.0.0
    • tools
    • 6.0.0-1569
    • Untriaged
    • Centos 64-bit
    • Unknown

    Description

      Original Title
      couchbase-cli delete in fails after undeploy with ERR_APP_DELETE_NOT_ALLOWED

      Script to Repro

      ./testrunner -i /tmp/testexec.21447.ini -p get-cbcollect-info=True -t eventing.eventing_tools.EventingTools.test_eventing_lifecycle_with_couchbase_cli,nodes_init=4,services_init=kv-eventing-index-n1ql,dataset=default,groups=simple,reset_services=True,skip_cleanup=True
      

      This test last passed on 6.0.0-1529 .

      Automation Log : http://qa.sc.couchbase.com/job/test_suite_executor/87938/consoleText

      From Logs

      [2018-08-27 19:04:50,019] - [eventing_tools:285] INFO - /opt/couchbase/bin//couchbase-cli eventing-function-setup -c 172.23.106.62 -u Administrator -p password --undeploy --name Function_396275055_test_export_function
      [2018-08-27 19:04:50,019] - [remote_util:3137] INFO - running command.raw on 172.23.106.62: /opt/couchbase/bin//couchbase-cli eventing-function-setup -c 172.23.106.62 -u Administrator -p password --undeploy --name Function_396275055_test_export_function
      [2018-08-27 19:04:50,420] - [remote_util:3174] INFO - command executed successfully
      [2018-08-27 19:04:50,421] - [eventing_tools:290] INFO - couchbase-cli event-setup function undeploy succeeded : ['SUCCESS: Function undeployed']
      [2018-08-27 19:04:50,424] - [remote_util:232] INFO - connecting to 172.23.106.62 with username:root password:couchbase ssh_key:
      [2018-08-27 19:04:50,635] - [remote_util:266] INFO - Connected to 172.23.106.62
      [2018-08-27 19:04:51,057] - [eventing_tools:285] INFO - /opt/couchbase/bin//couchbase-cli eventing-function-setup -c 172.23.106.62 -u Administrator -p password --delete --name Function_396275055_test_export_function
      [2018-08-27 19:04:51,057] - [remote_util:3137] INFO - running command.raw on 172.23.106.62: /opt/couchbase/bin//couchbase-cli eventing-function-setup -c 172.23.106.62 -u Administrator -p password --delete --name Function_396275055_test_export_function
      [2018-08-27 19:04:51,417] - [remote_util:3174] INFO - command executed successfully
      FAIL
      [2018-08-27 19:04:51,461] - [basetestcase:2295] INFO - list of eventing nodes in cluster: [ip:172.23.106.62 port:8091 ssh_username:root]
      [2018-08-27 19:04:51,464] - [remote_util:232] INFO - connecting to 172.23.106.62 with username:root password:couchbase ssh_key:
      [2018-08-27 19:04:51,668] - [remote_util:266] INFO - Connected to 172.23.106.62
      [2018-08-27 19:04:52,162] - [rest_client:1480] INFO - /diag/eval status on 172.23.106.62:8091: True content: "/opt/couchbase/var/lib/couchbase/logs" command: filename:absname(element(2, application:get_env(ns_server,error_logger_mf_dir))).
      [2018-08-27 19:04:52,162] - [remote_util:3137] INFO - running command.raw on 172.23.106.62: zgrep "panic" "/opt/couchbase/var/lib/couchbase/logs"/eventing.log* | wc -l
      [2018-08-27 19:04:52,231] - [remote_util:3174] INFO - command executed successfully
      [2018-08-27 19:04:52,231] - [remote_util:3137] INFO - running command.raw on 172.23.106.62: ls "/opt/couchbase/var/lib/couchbase/logs"/../crash/| wc -l
      [2018-08-27 19:04:52,314] - [remote_util:3174] INFO - command executed successfully
      [2018-08-27 19:04:52,316] - [basetestcase:391] WARNING - CLEANUP WAS SKIPPED
      ======================================================================
      FAIL: test_eventing_lifecycle_with_couchbase_cli (eventing.eventing_tools.EventingTools)
      ----------------------------------------------------------------------
      Traceback (most recent call last):
        File "pytests/eventing/eventing_tools.py", line 276, in test_eventing_lifecycle_with_couchbase_cli
          "SUCCESS: Function deleted")
        File "pytests/eventing/eventing_tools.py", line 288, in _couchbase_cli_eventing
          self.fail("couchbase-cli event-setup function {0} failed: {1}".format(operation, output))
      AssertionError: couchbase-cli event-setup function delete failed: ["ERROR: runtime_info - {u'info': u'Function: Function_396275055_test_export_function is currently undergoing undeploy. Only undeployed function can be deleted', u'code': 44}", 'ERROR: attributes - None', 'ERROR: code - 44', 'ERROR: name - ERR_APP_DELETE_NOT_ALLOWED', 'ERROR: description - Function needs to be undeployed before it can be deleted']
      

      From the logs its clear that we waited for undeploy to complete and then invoked delete. Looks like couchbase-cli needs to use the new api for undeploy(getRunningApps) from tools side too ?

      Logs attached.

      Attachments

        1. test_2.zip
          7.46 MB
        2. tools.txt
          43 kB

        Issue Links

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

          Activity

            People

              pvarley Patrick Varley (Inactive)
              Balakumaran.Gopal Balakumaran Gopal
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty