servicecatalog / development

An Enterprise-ready Cloud Services Management Software
http://openservicecatalogmanager.org
Apache License 2.0
39 stars 27 forks source link

Repeated subscription modification error #893

Closed GoebelL closed 6 years ago

GoebelL commented 6 years ago

[Environment] 17.4 Glassfish, custom controller

[How to reproduce]

  1. Async subscription modification with custom controller is attempted with invalid parameter.
    (e.g. value of disk size paramater exceeding capacity that can be provided by the cloud side)
  2. As subscription is back to ACTIVE state, user repeats modification with corrected the parameter
  3. Error from Exception is shown in subscription UI

[Detail] Error occurs in APP attempting to persist parameters with null values. See attached log

GoebelL commented 6 years ago

app_server_log_from_repeated_modify_after_aborted_subscription.txt

GoebelL commented 6 years ago

See around line 108.

GoebelL commented 6 years ago

[additional info] The issue should be reproduce-able with OSCM sample controller, when throwing an APPlatformException in dispatch() (Dispatcher.java) at point when handling case MODIFICATION_REQUESTED.

StavrevaS commented 6 years ago

The parameters coming from OSCM to APP can be null, but APP converts the null values to empty strings. The same should be assured about changed parameters coming from the controller side (with InstanceStatus.setChangedParameters). Please check this issue.

GoebelL commented 6 years ago

@kowalczyka Please take over at your site

badziakp commented 6 years ago

I checked method InstanceStatus.setChangedParameters using Sample controller. When this method gets a map with any parameter which value is null then the exception "org.postgresql.util.PSQLException: ERROR: null value in column "parametervalue" violates not-null constraint" is thrown and error log can be found in server.log of app domain.

StavrevaS commented 6 years ago

@badziakp it is exactly as I expected. Please solve with converting the null values to empty strings.

grubskim commented 6 years ago

Fixed with https://github.com/servicecatalog/development/pull/895

GoebelL commented 6 years ago

@SylviaDehn Please verify with last unit build

ghost commented 6 years ago

[Build] 17.3.1 verified with sample controller