diff options
author | Steve Baker <sbaker@redhat.com> | 2020-09-29 16:13:37 +1300 |
---|---|---|
committer | Dmitry Tantsur <dtantsur@protonmail.com> | 2020-09-29 13:55:36 +0200 |
commit | a1c5559fae6b7b0cddfe7c34e9a831d34464a189 (patch) | |
tree | 146a81fd0b241ca276e0c517b49a6fc1a051e952 /releasenotes | |
parent | fb90ed41fe4492caa48d7ac52a6cf6db7101091b (diff) | |
download | ironic-a1c5559fae6b7b0cddfe7c34e9a831d34464a189.tar.gz |
Handle patching node /protected value with None
Calling baremetal node unset --protected will attempt to set the
protected attribute to None, which raises a 500 error because the
object attribute is not nullable[1]. This change checks for this case
in the patch call and sets protected to False.
This appears to be the only boolean attribute affected by this issue
(node, port, and portgroup boolean attributes were checked).
[1] https://opendev.org/openstack/ironic/src/branch/master/ironic/objects/node.py#L146
Change-Id: I561e059218a99154e77df075aeadd68f56b86267
Story: 2008205
Task: 40989
Diffstat (limited to 'releasenotes')
-rw-r--r-- | releasenotes/notes/protected-unset-0620b844afbb635e.yaml | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/releasenotes/notes/protected-unset-0620b844afbb635e.yaml b/releasenotes/notes/protected-unset-0620b844afbb635e.yaml new file mode 100644 index 000000000..f516a5c0e --- /dev/null +++ b/releasenotes/notes/protected-unset-0620b844afbb635e.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fixes HTTP 500 when trying to unset the ``protected`` attribute via + the CLI. |