OpenStack Image Unset - Property BadRequestException:400

发布于 2025-01-27 09:49:30 字数 1180 浏览 6 评论 0原文

版本 Stein OpenStack,一个图像已经用HW_SCSI_MODEL ='Virtio-Scsi'设置了该属性,现在我必须取消设置,但无法正常工作。

# openstack image unset --property hw_scsi_model debian9.5
BadRequestException: 400: Client Error for url: http://10.10.10.10:9292/v2/images/3***0, Bad Request'

# openstack image show debian9.5 -c status -c visibility -c properties
| Field      | Value                                       |
| properties | hw_scsi_model='', os_hash_algo='sha512', ...|
| status     | active                                      |
| visibility | shared                                      |

将值设置为null,使用此图像创建服务器,获取错误字段值无效

# openstack image set --property hw_scsi_model='' debian9.5
# openstack image show debian9.5 -c properties -f value
{u'owner_specified.openstack.sha256': u'5**', 'hw_scsi_model': u''}
or
{u'owner_specified.openstack.sha256': u'5**', 'hw_scsi_model': u'None'}

错误日志>:

INFO nova.api.openstack.wsgi [req-***] HTTP exception thrown: Invalid image metadata. Error: Field value is invalid

如何在图像中解开属性?

Version stein openstack, one image had set the property with hw_scsi_model='virtio-scsi', now I have to unset it, but can't work.

# openstack image unset --property hw_scsi_model debian9.5
BadRequestException: 400: Client Error for url: http://10.10.10.10:9292/v2/images/3***0, Bad Request'

# openstack image show debian9.5 -c status -c visibility -c properties
| Field      | Value                                       |
| properties | hw_scsi_model='', os_hash_algo='sha512', ...|
| status     | active                                      |
| visibility | shared                                      |

While set the value to null or None, create server with this image, get error Field value is invalid

# openstack image set --property hw_scsi_model='' debian9.5
# openstack image show debian9.5 -c properties -f value
{u'owner_specified.openstack.sha256': u'5**', 'hw_scsi_model': u''}
or
{u'owner_specified.openstack.sha256': u'5**', 'hw_scsi_model': u'None'}

error log:

INFO nova.api.openstack.wsgi [req-***] HTTP exception thrown: Invalid image metadata. Error: Field value is invalid

How could I unset the property in image?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

翻身的咸鱼 2025-02-03 09:49:30

glance组件子命令image-update:一个解决方法:

glance image-update --remove-property hw_scsi_model debian9.5

openstack image unset unset -property失败

One solve method by glance component sub-command image-update:

glance image-update --remove-property hw_scsi_model debian9.5

openstack image unset --property fails

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文