Uploaded image for project: 'mod-inventory-storage'
  1. mod-inventory-storage
  2. MODINVSTOR-573

Unable to upgrade inventory-storage on rancher env

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: TBD
    • Resolution: Done
    • Affects Version/s: 19.2.0, 19.3.0
    • Fix Version/s: 19.3.6, 19.4.0
    • Labels:
    • Environment:

      all envs that do upgrade of the module

    • Template:
      Standard Bug Write-Up Format
    • Sprint:
      Core: F - Sprint 97
    • Story Points:
      1
    • Development Team:
      Prokopovych

      Description

      Overview: I'm not able to install new version of the mod-inventory-storage on the rancher env., because of tenant initialization fails with 500 error code.

      Steps to Reproduce:

      1. Go to the rancher;
      2. Attempt to install latest version of mod-inventory-storage.

      Expected Results: New version successfully installed.
      Actual Results: Tenant initialization failed with following error:

      14 Sep 2020 11:49:44:111 ERROR ServicePointsUserAPI [] duplicate key value violates unique constraint "service_point_user_userid_idx_unique"
      io.vertx.pgclient.PgException: duplicate key value violates unique constraint "service_point_user_userid_idx_unique"
      	at io.vertx.pgclient.impl.codec.ErrorResponse.toException(ErrorResponse.java:29) ~[mod-inventory-storage-fat.jar:?]
      	at io.vertx.pgclient.impl.codec.QueryCommandBaseCodec.handleErrorResponse(QueryCommandBaseCodec.java:57) ~[mod-inventory-storage-fat.jar:?]
      	at io.vertx.pgclient.impl.codec.ExtendedQueryCommandCodec.handleErrorResponse(ExtendedQueryCommandCodec.java:87) ~[mod-inventory-storage-fat.jar:?]
      	at io.vertx.pgclient.impl.codec.PgDecoder.decodeError(PgDecoder.java:232) ~[mod-inventory-storage-fat.jar:?]
      	at io.vertx.pgclient.impl.codec.PgDecoder.decodeMessage(PgDecoder.java:122) [mod-inventory-storage-fat.jar:?]
      	at io.vertx.pgclient.impl.codec.PgDecoder.channelRead(PgDecoder.java:102) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.CombinedChannelDuplexHandler.channelRead(CombinedChannelDuplexHandler.java:251) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:357) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:365) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:714) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) [mod-inventory-storage-fat.jar:?]
      	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) [mod-inventory-storage-fat.jar:?]
      	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [mod-inventory-storage-fat.jar:?]
      	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [mod-inventory-storage-fat.jar:?]
      	at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [mod-inventory-storage-fat.jar:?]
      	at java.lang.Thread.run(Thread.java:834) [?:?]
      

      Additional Information: Quick review suggested that tenant init logic expects 422 code for this case, and it treats this as success. But the API itself uses outdated logic to map DB error to a user friendly. The API should invoke RMB PgUtill.post method instead.

      URL:
      Interested parties:

        TestRail: Results

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bohdan-suprun Bohdan Suprun
                Reporter:
                bohdan-suprun Bohdan Suprun
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:

                    TestRail: Runs

                      TestRail: Cases