-
Notifications
You must be signed in to change notification settings - Fork 181
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
Command-line option to statically configure places #1358
Comments
The intention behind the coordinator is to have it run continuously in the background, it will correctly store and restore the current place information if it has persistent storage. A one-time sync to create the places and than modifying them with |
Our lab is also 40+ devices. You might look at contrib/sync-places.py. It will let you define your places in a YAML file, then sync the configuration of the coordinator to match. We use it to keep our place configuration in source control, then use an Ansible task to run the script to keep the coordinator in sync. |
Also of note, we have 1 exporter for each DUT, so our coordinator doesn't have access to all exporter configs that would make that even work properly. It gets even more complicated if you have multiple resources for the same DUT spread out over multiple exporters (which we also do in some limited cases). Labgrid is quite flexible in how you can organize it, but it does mean you have to be explicit about what the coordinator is doing vs. the exporters. |
Thanks for the info. Yes I am using sync-places.py but still need to write the places file. @JoshuaWatt I don't quite understand your comment. What new information is in the places file that is not in the collective exporters? Is it trying to present only a subset of what is available? |
Exporters aren't really aware of "places". In your exporter config file, the top level key |
Thank you for the explanation. IMO this is all quite confusing. (aside: it seems to me that 'place' and 'group' should be switched, since a 'place' is an arbitrary grouping of things that might come from any exporter whereas a 'group' is a logically connected group of devices from one exporter and presumably in one place) It would be great to add your notes above in the docs here: https://labgrid.readthedocs.io/en/latest/overview.html#remote-resources-and-places Perhaps we could have a mention that the places and groups are generally the same, which makes things easier to understand, but that (for advanced use) they can be different? |
This again shows how little standard terminology exists in this space. I still remember that a large chunk of the first Automated Testing Summit in 2018 was spent figuring out a shared terminology... And documenting this in a way understandable by someone who already uses different terminology seems really hard. :/ While @JoshuaWatt mentions that his convention is to use the same name for 'group' and 'place', we use it differently in our lab. One rack of boards contains one or two exporters (running on physical machines) for USB busses. Additionally, we have a shared exporter running in a VM which exports PDUs, MQTT power plugs running Tasmota, serial port servers and PoE switches.
This allows us to easily combine the resources from multiple exporters into one place and needed by a specific board when we place it on a rack shelf and wire it up. When done, it looks like this
This allows us to add/change/remove places just by looking at the labeled USB ports and power cables.
Yes, but it would still need to make the distinction that groups are mainly a exporter-level concept while places only come into play with the coordinator. |
Not sure how helpful this is in our case, but following the links lead to this page: https://elinux.org/Test_Glossary |
See #1069 (but I was unable to reopen it, so created a new issue with more details)
The current approach requires these steps when starting up the lab:
It would be better to have labgrid-exporter handle the sync automatically, e.g. by loading the places file.
But even better to not have a places file. My export_kea.yaml file looks like this:
and places_kea.yaml is just:
which seems pretty redundant to me.
So could we perhaps have an option to create a place for each exported target as a place?
Yes, I am aware that most uses of labgrid create ad-hoc labs consisting of one or two targets. But I have a lab of about 34 targets so far, so ad-hoc creation isn't really practical.
The text was updated successfully, but these errors were encountered: