Extend tag implementation so that devices can be excluded from a job
Based on this message from cnspring2002 on the lava-users mailing list: https://lists.lavasoftware.org/pipermail/lava-users/2019-April/001793.html
I attach a tag on one of my device, and when submit job I will add "tags:" to my job, it's ok.
But, when others submit their job with same device-type which same as my device, as they did not specify "tags", they will have chance to run their job on my device. How to avoid it? I want the job not be scheduled to the device which have a tag if the job did not specify any tag.
I tried to set the device as private, but then only me can use this device, I have other guys in groupA which want to use the device, while I hae another some guys in groupB which didid not want to use these devices as some modules on the device is not same.
Currently, the only solution to this scenario seems to be adding a separate device type. There should be a better way. The tag implementation might be extended, so that jobs MUST set a tag in order to enable certain devices for scheduling.
The current tag implementation works like this: "If a job includes a tag, the device has to have this tag as well."
The above scenario would add a requirement: "If a device has a tag, the job has to include this tag as well."
I would propose adding a boolean flag "exclusive" (or similar, there might be better vocabulary) to tags. If a tag has this flag set, a device containing the tag is used only for jobs which have the tag set as well. Devices containing the tag will not have jobs without this tag scheduled on them.
@lava developers: What do you say? Would you accept such an implementation? Any other ideas?