uldaq icon indicating copy to clipboard operation
uldaq copied to clipboard

can we use in k8s pod?

Open anup28 opened this issue 2 years ago • 5 comments

anup28 avatar May 29 '22 11:05 anup28

We are using USB-1024LS , can see in lsusb output. But getting error as <Error: No DAQ devices found>

anup28 avatar May 30 '22 09:05 anup28

output of lsusb:::

<Bus 009 Device 002: ID 09db:0076 MCC USB-1024LS Bus 009 Device 001: ID 1d6b:0002 Linux 5.4.0-113-generic xhci-hcd xHCI Host Controller Bus 010 Device 001: ID 1d6b:0003 Linux 5.4.0-113-generic xhci-hcd xHCI Host Controller Bus 002 Device 001: ID 1d6b:0002 Linux 5.4.0-113-generic ehci_hcd EHCI Host Controller Bus 008 Device 001: ID 1d6b:0001 Linux 5.4.0-113-generic uhci_hcd UHCI Host Controller Bus 007 Device 001: ID 1d6b:0001 Linux 5.4.0-113-generic uhci_hcd UHCI Host Controller Bus 006 Device 001: ID 1d6b:0001 Linux 5.4.0-113-generic uhci_hcd UHCI Host Controller Bus 001 Device 001: ID 1d6b:0002 Linux 5.4.0-113-generic ehci_hcd EHCI Host Controller Bus 005 Device 001: ID 1d6b:0001 Linux 5.4.0-113-generic uhci_hcd UHCI Host Controller Bus 004 Device 001: ID 1d6b:0001 Linux 5.4.0-113-generic uhci_hcd UHCI Host Controller Bus 003 Device 001: ID 1d6b:0001 Linux 5.4.0-113-generic uhci_hcd UHCI Host Controller

anup28 avatar May 30 '22 09:05 anup28

Measurement Computing has not conducted any testing using Kubernetes pods. There are no plans to do so.

jeffreyg3 avatar Jun 01 '22 14:06 jeffreyg3

Hey @anup28,

I think this should be possible if you configure the container correctly:

https://stackoverflow.com/questions/42697985/kubernetes-node-device-port-usb-mapping-to-pod-or-swarm-service-device-mapp

Out of curiosity, what are you working on needs to access the MCC hardware from K8s?

samkristoff avatar Jun 01 '22 19:06 samkristoff

I was able to run this out of a docker container, so I assume you could do it with a cluster, although I'm also curious as to why somebody would do that.. On the host device, you'll need to map the host device inside of the container as referenced above, but also you'll need to modify the install.sh script. It calls daqhats_read_eeprom during the setup as a validation and will abort on failure, but this will never pass during your makefile execution since it requires host hardware not in place yet.

I broke out the install script to just the compilation & installation and created a startup script that will execute the daqhats_read_eeprom on boot to ensure the hats stay up to date.

thompcd avatar Apr 18 '23 10:04 thompcd