Posted on 01-15-2016 08:38 AM
I know this is kind of off topic, even through I see an increasing footprint of folks working with BSDPY here...
If there is a better forum to post, please let me know and I will post there, not seeing a lot, but maybe I missed something.
We're running a test instance of BSDPY to tie into our casper infrastructure on a VM using CentOS 7. VM is not in our netboot subnet, so we are using IP helper tables.
So far so good, netboot instance shows up in sys prefs, but no boot love. Here are the abbreviated logs below, and it seems strange to me that the IP is defined at 127.0.0.1, so I'm wondering if that might be the issue?
Posted on 01-15-2016 09:03 AM
Hi Phil, it looks like BSDPy was started with the default IP assignment, localhost
or 127.0.0.1
as you noted. First make sure that you are providing BSDPy with the correct network interface to listen on (default is eth0
) by using the -i
flag: python bsdpserver.py -i <interface>
If the interface is correct you'll want to make sure to provide the IP of the host BSDPy is running on so that clients will contact it for later steps like TFTP and HTTP/NFS.
When running BSDPy as a Docker container you would pass -e BSDPY_IP=<your host external IP>
at run time for example.
If you're not using Docker you can also pass the variable at runtime like this:
$ BSDPY_IP=<your host external IP> python bsdpserver.py
or you can set it globally with export:
$ export BSDPY_IP=<your host external IP>
$ python bsdpserver.py -i <interface>
BSDPy will note it is using your provided IP at startup as well.
Posted on 01-15-2016 10:45 AM
Hey @Bruienne Thanks for the response. Looks like I have not assigned the correct network interface, as you surmised. We are using Docker.
I'm a python newbie, I'm afraid, running:
python bsdpserver.py -i <interface>
and, after replacing with correct interface, getting output:
python: can't open file 'bsdpserver.py': [Errno 2] No such file or directory
Posted on 01-15-2016 10:50 AM
BTW, did a find, and ran the following as well, with no results:
sudo python /var/lib/docker/devicemapper/mnt/7d987eacc0849f77f2d7f6f8892f714c4e22aaf47306e48753b11d09c7951165/rootfs/bsdpy/bsdpserver.py -i eno16780032
output
bsdpy/bsdpserver.py", line 72, in <module>
from docopt import docopt
ImportError: No module named docopt
Posted on 01-15-2016 11:38 AM
You can ignore my directions for running it directly with Python, I wanted to give the procedure for both Docker and non-Docker methods. To run with Docker you'll want to append either one of the following extra flags to your docker run
command: -e BSDPY_IP=<external IP>
or -e BSDPY_IFACE=<interface>
The former will directly set the IP to use for replying to clients, while the latter will retrieve the IP of the given interface and send that to clients. It is not necessary to use both, clearly BSDPY_IP
is the more direct method.
As part of an example complete Docker run statement for both options:
$ docker run -d -e BSDPY_IP=1.2.3.4 --name bsdpy (...) bruienne/bsdpy:1.0 # Direct IP
$ docker run -d -e BSDPY_IFACE=eth0 --name bsdpy (...) bruienne/bsdpy:1.0 # Get IP from interface
Posted on 01-15-2016 03:33 PM
Great, thanks for the info, I'll check it out.