eclipse / kapua

Eclipse Public License 2.0
227 stars 160 forks source link

No Error Message At Child Account Creation If "compose_broker_1" Container Not Working #2053

Open LeoNerdoG opened 6 years ago

LeoNerdoG commented 6 years ago

If compose_broker_1 container fails for any reason and user wants to create a child account, Kapua ust blinks the first time user presses Submit button (Add child account window does not close) and every next attempt of pressing Submit button is followed by error in bottom right corner saying: An entity with the same value for field already exists.

When user clicks cancel, window closes and in the child account list there is the account, that was "unsuccessfully" created.

The problem is, that when creating a child account, there are automatically "thing" and "admin" roles created - and "thing" role has "broker:connect" permissions.

Testflow:

  1. When Kapua build finishes, run docker containers with command ./docker-deploy && docker stop compose_broker_1
  2. Login as kapua-sys
  3. Go to Child Accounts, click Add, try to add a unique child account When Submit is pressed, nothing happens and Kapua starts throwing errors.

Expected behavior Kapua sohuld report a specific error that compose_broker_1 container is not started or something similar, so user would be guided towards the root of the error.

Screenshots unnamed

Version of Kapua 1.0.0-SNAPSHOT

Type of deployment [ ] Local Vagrant deployment [x] Docker [ ] Openshift (in its variants) [ ] Others

Main component affected [x] Console (in case of console please report info on which browser you encountered the problem) [ ] REST API [ ] Message Broker [ ] - Others

Browsers used:

lorthirk commented 6 years ago

More in general, I'd say that Kapua should show an error about the incorrect/not found domain: the main issue here is that if the Docker container doesn't start it won't seed the broker domain in the DB.