'openstack image unset' Command Fails with 'BadRequestException' Error

Problem

  • Removing a property from an image fails with below error:

$ openstack image unset --property hw_scsi_model ag6dghc-f41d-765d-76d5-hafgdjckdnfdyh3
BadRequestException: 400: Client Error for url: http://10.x.x.x:9292/v2/images/ag6dghc-f41d-765d-76d5-hafgdjckdnfdyh3, Bad Request

Environment

  • Platform9 Managed OpenStack - v4.0 and Higher

Cause

  • OpenStack client is setting the property to null instead of removing it.

# openstack --debug image unset --property hw_scsi_model ag6dghc-f41d-765d-76d5-hafgdjckdnfdyh3

Resolution

  • Remove/Unset the property using glance client

# glance --debug image-update --remove-property hw_scsi_model ag6dghc-f41d-765d-76d5-hafgdjckdnfdyh3

Last updated