Bug 1615418 - Import cluster job can be created via API right after previous import failed
Summary: Import cluster job can be created via API right after previous import failed
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: web-admin-tendrl-api
Version: rhgs-3.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Jeff Brown
QA Contact: sds-qe-bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-13 14:39 UTC by Filip Balák
Modified: 2018-12-06 10:22 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-12-06 10:22:50 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1516135 0 unspecified CLOSED When import fails, the import button should be accessible only after unmanage 2021-12-10 15:25:43 UTC

Internal Links: 1516135

Description Filip Balák 2018-08-13 14:39:50 UTC
Description of problem:
It is possible to initiate cluster import via API when previous import failed and unmanage was not yet performed. Import should not be possible as stated in https://bugzilla.redhat.com/show_bug.cgi?id=1516135#c16

Version-Release number of selected component (if applicable):
tendrl-ansible-1.6.3-6.el7rhgs.noarch
tendrl-api-1.6.3-5.el7rhgs.noarch
tendrl-api-httpd-1.6.3-5.el7rhgs.noarch
tendrl-commons-1.6.3-11.el7rhgs.noarch
tendrl-grafana-plugins-1.6.3-8.el7rhgs.noarch
tendrl-grafana-selinux-1.5.4-2.el7rhgs.noarch
tendrl-monitoring-integration-1.6.3-8.el7rhgs.noarch
tendrl-node-agent-1.6.3-9.el7rhgs.noarch
tendrl-notifier-1.6.3-4.el7rhgs.noarch
tendrl-selinux-1.5.4-2.el7rhgs.noarch
tendrl-ui-1.6.3-9.el7rhgs.noarch

How reproducible:
100%

Steps to Reproduce:
1. Install WA and prepare cluster.
2. Break WA repourl on one storage machine.
3. Import cluster via UI. Import fails and import button is disabled as expected but there is a way to initiate Import job via API.
3. Execute:
curl -H 'Content-Type: application/json' -d '{"username":<admin-user>, "password": <password>}' <wa-server>/api/1.0/login
3. Execute:
curl -XPOST -H "Authorization: Bearer <token>" -H "Content-Type: application/json" -d '{ "volume_profiling_flag": "enable" }'
<wa-server>/api/1.0/clusters/<not-imported-cluster-id>/import
as described in https://github.com/Tendrl/api/blob/master/docs/clusters.adoc#import-cluster

Actual results:
Import Cluster job is created. The job fails with error: `Failed post-run: tendrl.objects.Cluster.atoms.SetupClusterAlias for flow: Import existing Gluster Cluster` after a while. This job can be created also when the issue with bad repourl is resolved. In that case the job fails with the same error.

Expected results:
There should be some message stating that user needs to resolve issue and unmanage cluster before importing again or appropriate error code should be returned.

Additional info:

Comment 3 Nishanth Thomas 2018-12-06 10:22:50 UTC
Not planning to address this issue in any of the upcoming releases.This won't occur in normal cases(operating from UI). Closing this issue


Note You need to log in before you can comment on or make changes to this bug.