Description of problem: When API call for cluster import is called with invalid `cluster-id` then the status of job invoked by this operation remains as `new`. Version-Release number of selected component (if applicable): tendrl-ansible-1.6.1-2.el7rhgs.noarch tendrl-api-1.6.1-1.el7rhgs.noarch tendrl-api-httpd-1.6.1-1.el7rhgs.noarch tendrl-commons-1.6.1-1.el7rhgs.noarch tendrl-grafana-plugins-1.6.1-1.el7rhgs.noarch tendrl-grafana-selinux-1.5.4-2.el7rhgs.noarch tendrl-monitoring-integration-1.6.1-1.el7rhgs.noarch tendrl-node-agent-1.6.1-1.el7rhgs.noarch tendrl-notifier-1.6.0-1.el7rhgs.noarch tendrl-selinux-1.5.4-2.el7rhgs.noarch tendrl-ui-1.6.1-1.el7rhgs.noarch How reproducible: 100% Steps to Reproduce: 1. Create new import cluster job: $ curl -XPOST -H "Authorization: Bearer [TOKEN]" -H "Content-Type: application/json" -d '{"volume_profiling_flag": "enable"}' [HOSTNAME]/api/1.0/clusters/000000-0000-0000-0000-000000000/import where [TOKEN] is valid access token and [HOSTNAME] is address of Tendrl server. 2. Repeatedly check status of created job: $ curl -XGET -H "Authorization: Bearer [TOKEN]" -H "Content-Type: application/json" [HOSTNAME]/api/1.0/jobs/[JOBID] where [JOBID] is job id generated in previous step. Actual results: Status of job remains `new` even after a few hours. Expected results: Job should fail after a while. Additional info:
We need to handle import for unknown cluster ID at the API layer.
Job with invalid cluster id can not be currently initiated. When invalid cluster id is provided then there is no job created and error message is returned: {"errors":{"message":"Cluster with cluster_id [invalid cluster id] not found."}} --> VERIFIED Tested with: tendrl-ansible-1.6.3-3.el7rhgs.noarch tendrl-api-1.6.3-3.el7rhgs.noarch tendrl-api-httpd-1.6.3-3.el7rhgs.noarch tendrl-commons-1.6.3-4.el7rhgs.noarch tendrl-grafana-plugins-1.6.3-2.el7rhgs.noarch tendrl-grafana-selinux-1.5.4-2.el7rhgs.noarch tendrl-gluster-integration-1.6.3-2.el7rhgs.noarch tendrl-monitoring-integration-1.6.3-2.el7rhgs.noarch tendrl-node-agent-1.6.3-4.el7rhgs.noarch tendrl-notifier-1.6.3-2.el7rhgs.noarch tendrl-selinux-1.5.4-2.el7rhgs.noarch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2018:2616