You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In internal/partitioning/mps/partitioner.go, in ToPluginConfig function, Config struct is used from github.com/NVIDIA/k8s-device-plugin/api/config/v1 package. This struct, while containing nested structs, does not use struct pointers, which causes YAML/JSON Marshal function to render "empty" structs as empty map/object, instead of omitting them. This results in following config value (take a look at timeSlicing):
There is a custom Unmarshal function that is executed when sharing.timeSlicing field exists in raw config, but throws an error when it is empty, exactly as we see in the above config example. See code here:
GFD uses this package to read device-plugin config, created by partitioner. When new partitioning config is applied, empty timeSlicing field in it causes the above code to crash the GFD container with no resources specified error, until timeSlicing: {} is removed from ConfigMap, which resolves the error.
I think it makes sense to fix this issue in nebuly-ai/k8s-device-plugin by removing the checks and forking GFD to use that, as well as tweaking the structs to utilize pointers when nesting other structs in order to render proper YAML.
The text was updated successfully, but these errors were encountered:
In
internal/partitioning/mps/partitioner.go
, inToPluginConfig
function, Config struct is used fromgithub.com/NVIDIA/k8s-device-plugin/api/config/v1
package. This struct, while containing nested structs, does not use struct pointers, which causes YAML/JSON Marshal function to render "empty" structs as empty map/object, instead of omitting them. This results in following config value (take a look at timeSlicing):This behavior is explained here.
There is a custom Unmarshal function that is executed when
sharing.timeSlicing
field exists in raw config, but throws an error when it is empty, exactly as we see in the above config example. See code here:GFD uses this package to read device-plugin config, created by partitioner. When new partitioning config is applied, empty timeSlicing field in it causes the above code to crash the GFD container with
no resources specified
error, untiltimeSlicing: {}
is removed from ConfigMap, which resolves the error.I think it makes sense to fix this issue in nebuly-ai/k8s-device-plugin by removing the checks and forking GFD to use that, as well as tweaking the structs to utilize pointers when nesting other structs in order to render proper YAML.
The text was updated successfully, but these errors were encountered: