ViPR Controller : Viprcli update host command fails with "Cannot update host because another operation is in progress for this host"


   Article Number:     537594                                   Article Version: 2     Article Type:    Break Fix 




ViPR Controller,ViPR Controller Controller 3.6 SP2





The user is unable to update a ViPR Controller  managed host via ViPRCli.   
    ViPRcli error   

      vipr1:/opt/storageos/cli/bin # ./viprcli host update -hl hostname -ndc DataCenterName -vc vCenterName Error: Failed to update hostReason:'HTTP code: 400, Bad Request [\{"code":1013,"retryable":false,"description":"Bad request body","details":"Cannot update host because another operation is in progress for this host."}]'    






There are pending tasks (associated with the host in question) in the ViPR Controller database that prevent the execution of the ViPRcli command.       
        Note: The Host pending tasks causing the issue may not be visible in the ViPR-C UI or via command line.
    e.g./opt/storageos/bin/dbutils list Task | grep "pending = true" -A 5 -B 13 | grep "id:\|pending\|resource"   







      A solution exists for this issue, but intervention from EMC technical support personnel is required.         
          Support personnel must access your storage system to fix this issue.         
          Contact the EMC Customer Support Center or your service representative for technical assistance and quote this article ID.
        Include the ViPR Controller Order History text as well as logs covering the time frame when you contact EMC for technical assistance.








      ViPR Controller API logs     
      vipr1 vipr1 apisvc 2019-09-19 12:37:54,822 [qtp1600330912-45] INFO (line 64) Request: PUT - - update_exports=false from       
        vipr1 vipr1 apisvc 2019-09-19 12:37:54,822 [qtp1600330912-45] INFO (line 71) Auth headers: Auth Token: yes - Proxy Token: no - Basic Auth: no - Keystone Token:no       
        vipr1 vipr1 apisvc 2019-09-19 12:37:54,822 [qtp1600330912-45] INFO (line 164) Token VDCid vdc1 matches that of this VDC vdc1       
        vipr1 vipr1 apisvc 2019-09-19 12:37:54,935 [qtp1600330912-45] WARN (line 74) Responding to internal 1013 with HTTP Bad Request; Caused by       
        com.emc.storageos.svcs.errorhandling.resources.BadRequestException: Cannot update host because another operation is in progress for this host.       
         at com.emc.storageos.api.service.impl.resource.HostService.updateHost(       
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)       
         at sun.reflect.NativeMethodAccessorImpl.invoke(       
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(       
         at java.lang.reflect.Method.invoke(