NVIDIA / mig-parted

MIG Partition Editor for NVIDIA GPUs
Apache License 2.0
163 stars 39 forks source link

Add mig config watch then reload config file #108

Open lengrongfu opened 1 month ago

lengrongfu commented 1 month ago

https://github.com/NVIDIA/gpu-operator/issues/891

About this issue, I want to add some logic to watch for changes in the /mig-parted-config/config.yaml file and trigger a reload of the configuration file.

lengrongfu commented 4 weeks ago

eg: custom-config before config value is:

version: v1
mig-configs:
 custom-config:
    - devices: all
       mig-enabled: true
       mig-devices:
         3g.40gb: 2

custom-config after config value is:

version: v1
mig-configs:
 custom-config:
    - devices: all
       mig-enabled: true
       mig-devices:
         1g.10gb: 3
         2g.20gb: 2

When only config is modified, mig-pared apply will not be triggered.