Skip to content

Neutron quota: int-as-string workaround#2126

Merged
jtopjian merged 1 commit intogophercloud:masterfrom
shiftstack:neutron_quota_reserved_bug_workaround
Mar 11, 2021
Merged

Neutron quota: int-as-string workaround#2126
jtopjian merged 1 commit intogophercloud:masterfrom
shiftstack:neutron_quota_reserved_bug_workaround

Conversation

@pierreprinetti
Copy link
Copy Markdown
Member

In some conditions, Neutron will JSON-encode quota values as strings
instead of integers.

With this patch, the unmarshaling method is overridden to accept
integers as strings.

See https://bugs.launchpad.net/neutron/+bug/1918565

Fixes #2125

@coveralls
Copy link
Copy Markdown

coveralls commented Mar 11, 2021

Coverage Status

Coverage decreased (-0.005%) to 79.846% when pulling 0297290 on shiftstack:neutron_quota_reserved_bug_workaround into cd9c207 on gophercloud:master.

In some conditions, Neutron will JSON-encode quota values as strings
instead of integers.

With this patch, the unmarshaling method is overridden to accept
integers as strings.

See https://bugs.launchpad.net/neutron/+bug/1918565

Fixes gophercloud#2125
@pierreprinetti pierreprinetti force-pushed the neutron_quota_reserved_bug_workaround branch from cb32ef9 to 0297290 Compare March 11, 2021 09:44
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci bot commented Mar 11, 2021

Build succeeded.

@EmilienM
Copy link
Copy Markdown
Contributor

great, I'll go with that until this is fixed in Neutron and backported. I suspect we'll carry this workaround for some time...
Thanks!

@jtopjian
Copy link
Copy Markdown
Contributor

@pierreprinetti This looks good to me. To confirm: this is ready to be merged?

@pierreprinetti
Copy link
Copy Markdown
Member Author

@pierreprinetti This looks good to me. To confirm: this is ready to be merged?

As far as I can tell, the patch is ready.

@EmilienM
Copy link
Copy Markdown
Contributor

@jtopjian LGTM, this is ready to go I think.

Thanks Pierre for the quick workaround!

@jtopjian
Copy link
Copy Markdown
Contributor

Thanks, all! I just like to make sure before I accidentally hit the merge button too early 🙂

Copy link
Copy Markdown
Contributor

@jtopjian jtopjian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thank you!

@jtopjian jtopjian merged commit 613955a into gophercloud:master Mar 11, 2021
@pierreprinetti pierreprinetti deleted the neutron_quota_reserved_bug_workaround branch March 11, 2021 20:51
@EmilienM
Copy link
Copy Markdown
Contributor

thanks @jtopjian for the ninja review!

@pierreprinetti
Copy link
Copy Markdown
Member Author

Thank you @jtopjian!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tolerate a Neutron bug where quota values may be returned as strings

5 participants