From 2cc32e6e21d9aefd09d808d74c1b32a87fd3fbe0 Mon Sep 17 00:00:00 2001 From: Volker Theile Date: Thu, 23 May 2019 12:00:38 +0200 Subject: [PATCH] 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 --- .../rgw-user-form/rgw-user-form.component.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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 770bc09854a4..408703d596d3 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(); } - ); + }); } /** -- 2.47.3