Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow required flavor props to be zero-valued #84

Draft
wants to merge 1 commit into
base: openstack-seeder-k8s-1.10
Choose a base branch
from

Conversation

grandchild
Copy link
Contributor

Trying to seed a flavor with 0 disk size fails because the 0-value get's pruned from the flavor spec.

According to https://pkg.go.dev/encoding/json#Marshal the "omitempty" option in the struct definition is to blame for this. Remove it for some fields that are required for a flavor: RAM, Disk & vCPUs.

While it's hard to conceive of a useful flavor without either RAM or CPUs, it might be required for testing -- just like the testing flavor with no disk size that just failed.

Trying to seed a flavor with 0 disk size fails because the 0-value
get's pruned from the flavor spec.

According to https://pkg.go.dev/encoding/json#Marshal the "omitempty"
option in the struct definition is to blame for this. Remove it for
some fields that are required for a flavor: RAM, Disk & vCPUs.

While it's hard to conceive of a useful flavor without either RAM or
CPUs, it might be required for testing -- just like the testing
flavor with no disk size that just failed.
@grandchild
Copy link
Contributor Author

Has to be fixed before KVM rollout since flavors in KVM shouldn't have root disks at all.

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.

1 participant