The automatic appliance upgrade to the version 1.0.2 is not working. The system fails to extract the downloaded upgrade bundle due to a ZIP extraction error. You must upgrade your appliance to the 1.0.2 version using the instructions provided in this topic.

  1. Verify the appliance upgrade status.
    1. From your browser, log in to the Carbon Black Cloud Workload appliance at https://<appliance IP address> using the admin credentials.
    2. Go to the Appliance > Upgrade page.
    3. The automatic upgrade starts based on your configured day and time. If the automatic upgrade has failed, you can see the upgrade failed error.

  2. Verify the reason for the upgrade failure.
    1. SSH to the appliance CLI using the admin credentials. For example, ssh admin@<appliance IP address>.
    2. Run the following command.
      cat /var/log/cwp/apw_upgrade_status.json
    3. See the value of the status field in the output. Here is a sample output.
      {"status":"EXTRACTING_WRAPPER_BUNDLE_FAILED","reboot_pending":null,"message":"Zip entry breaches extract location, entry resolved path: /var/vmware/bundle/bundles/staging/wrapper-1.0.2.0-xxxxxxxx/cwp-appliance-bundle- 1.0.2.0-xxxxxxxx.zip, extract location/opt/vmware/cwp/etc/bundles/staging/wrapper- 1.0.2.0-xxxxxxxx","source_version":null,"target_version":"1.0.2.0-xxxxxxxx"} 
    • If status is EXTRACTING_WRAPPER_BUNDLE_FAILED, the system fails to download the upgrade bundle due to a ZIP extraction error. This error occurs on all the 1.0.1 appliances. Proceed to the next step for your upgrade.
    • If status is TIMEDOUT_WAIT_FOR_TERMINAL_STATUS, then the root and admin passwords of your appliance are expired and you must first reset the passwords before proceeding for the upgrade. The password for the appliance expires in 90 days. Change the passwords as explained in the Reset Appliance Password topic and then proceed to the next step.
  3. Download and run the shell (.sh) script file as follows.
    1. Click the following link. The script file gets downloaded. Extract the file to your local machine.

      https://community.carbonblack.com/gbouw27325/attachments/gbouw27325/cloud_workload_documents/7/1/update-config.zip.

      -OR-

      Copy the following code as the update-config shell script file.

      CONFIG_FILE="/opt/vmware/cwp/appliance-worker/config/application.yml"
      
      if grep -q "upgrade.staging.location" "${CONFIG_FILE}"
      then
          # Already exists, nothing to do
          echo "Settings already up-to-date. Nothing to do!"
      else
          # Add config and restart service
          echo "Updating config..."
          sed "-i.$(date +%s)" '1i upgrade.staging.location: /var/vmware/bundle/bundles/staging' "${CONFIG_FILE}"
      
          echo "Restarting appliance worker service..."
          systemctl restart cwp-appliance-worker.service
          sleep 10
      
          echo "Settings updated successfully!"
      fi
    2. Copy the script file to the appliance VM using the following command.
      Linux:
      scp <Location_Of_update-config.sh_File> admin@<Appliance_VM_IP>:
      admin@<Appliance_VM_IP>'s password:
       
      Windows:
      pscp -scp -P 22 <Location_Of_update-config.sh_File> admin@<Appliance_VM_IP>:
      admin@<Appliance_VM_IP>'s password:
    3. SSH to the appliance VM using the admin credentials and switch to the root user.
      ssh admin@<Appliance_VM_IP>
      Warning: Permanently added '<Appliance_VM_IP>' (RSA) to the list of known hosts.
      admin@<Appliance_VM_IP>'s password:
      admin@<Appliance_VM_IP> [ ~ ]$ su -
      Password:
      root@<Appliance_VM_IP> [ ~ ]#
    4. Change the permissions of the file using the following commands to make the file executable.
      # chmod +x /home/admin/update-config.sh
    5. Execute the script using the following command.
      # ./update-config.sh
      
    6. The sample output appears as follows.
      Updating config... 
      Restarting appliance worker service... 
      Settings updated successfully! 
  4. Schedule your appliance upgrade. For upgrade information, see Upgrade Appliance and Plug-In.

    Once the upgrade is triggered as per your schedule, monitor the upgrade page on the appliance UI for the result. Upgrade process generally finishes within 10 to 15 minutes.

  5. To verify your upgrade.
    • Go to the appliance dashboard. You can view the updated version and the build number.

      appliance version

    • Go to the Upgrade page. Make sure there is no upgrade related error message.