From: Volker Theile Date: Thu, 23 May 2019 10:00:38 +0000 (+0200) Subject: mgr/dashboard: Use serial RGW Admin OPS API calls X-Git-Tag: v15.1.0~2630^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=2cc32e6e21d9aefd09d808d74c1b32a87fd3fbe0;p=ceph-ci.git mgr/dashboard: Use serial RGW Admin OPS API calls This PR takes care that changes done to a RGW user are submitted (via RGW Admin OPS API) in serial and NOT in parallel. Fixes: https://tracker.ceph.com/issues/40015 Signed-off-by: Volker Theile --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts index 770bc09854a..408703d596d 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/rgw/rgw-user-form/rgw-user-form.component.ts @@ -5,7 +5,7 @@ import { ActivatedRoute, Router } from '@angular/router'; import { I18n } from '@ngx-translate/i18n-polyfill'; import * as _ from 'lodash'; import { BsModalService } from 'ngx-bootstrap/modal'; -import { forkJoin as observableForkJoin, Observable } from 'rxjs'; +import { concat as observableConcat, forkJoin as observableForkJoin, Observable } from 'rxjs'; import { RgwUserService } from '../../../shared/api/rgw-user.service'; import { ActionLabelsI18n, URLVerbs } from '../../../shared/constants/app.constants'; @@ -238,17 +238,17 @@ export class RgwUserFormComponent implements OnInit { const bucketQuotaArgs = this._getBucketQuotaArgs(); this.submitObservables.push(this.rgwUserService.updateQuota(uid, bucketQuotaArgs)); } - // Finally execute all observables. - observableForkJoin(this.submitObservables).subscribe( - () => { - this.notificationService.show(NotificationType.success, notificationTitle); - this.goToListView(); - }, - () => { + // Finally execute all observables one by one in serial. + observableConcat(...this.submitObservables).subscribe({ + error: () => { // Reset the 'Submit' button. this.userForm.setErrors({ cdSubmitButton: true }); + }, + complete: () => { + this.notificationService.show(NotificationType.success, notificationTitle); + this.goToListView(); } - ); + }); } /**