tohojo / flent

The FLExible Network Tester.
https://flent.org
Other
431 stars 77 forks source link

Issues running flent / packaging into container #226

Closed xciter327 closed 3 years ago

xciter327 commented 3 years ago

I wanted to run some test on Fedora 34, which seems to have lost the netperf package. So I decided to give packaging Flent into a container a go. I'm having some issues actually running the thing. Output from tring to run it:

➜  flent git:(master) ✗ podman run -it --network=host 0c4ea2cce3e flent rrul -p all_scaled -l 60 -H netperf.bufferbloat.net
Started Flent 2.0.0 using Python 3.9.5.
Traceback (most recent call last):
  File "/usr/bin/flent", line 33, in <module>
    sys.exit(load_entry_point('flent==2.0.0', 'console_scripts', 'run')())
  File "/usr/share/flent/flent/__init__.py", line 59, in run_flent
    b.run()
  File "/usr/share/flent/flent/batch.py", line 617, in run
    return self.run_test(self.settings, self.settings.DATA_DIR, True)
  File "/usr/share/flent/flent/batch.py", line 505, in run_test
    record_metadata(res, settings.EXTENDED_METADATA,
  File "/usr/share/flent/flent/metadata.py", line 132, in record_metadata
    m['MODULE_VERSIONS'] = get_module_versions()
  File "/usr/share/flent/flent/metadata.py", line 514, in get_module_versions
    version_strings.split(
AttributeError: 'NoneType' object has no attribute 'split'

Python version:

➜  flent git:(master) ✗ podman run -it --network=host 0c4ea2cce3e python3 --version
Python 3.9.5

Relevant dockerfile:

➜  flent git:(master) ✗ cat Dockerfile 
FROM ubuntu:hirsute
RUN apt-get update && \
    apt-get install -y locales software-properties-common && \
    sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \
    locale-gen
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
RUN add-apt-repository ppa:tohojo/flent
RUN apt-get update
RUN apt install -y flent netperf python3-setuptools iperf
tohojo commented 3 years ago

xciter327 @.***> writes:

I wanted to run some test on Fedora 34, which seems to have lost the netperf package. So I decided to give packaging Flent into a container a go. I'm having some issues actually running the thing. Output from tring to run it:

➜  flent git:(master) ✗ podman run -it --network=host 0c4ea2cce3e flent rrul -p all_scaled -l 60 -H netperf.bufferbloat.net
Started Flent 2.0.0 using Python 3.9.5.
Traceback (most recent call last):
  File "/usr/bin/flent", line 33, in <module>
    sys.exit(load_entry_point('flent==2.0.0', 'console_scripts', 'run')())
  File "/usr/share/flent/flent/__init__.py", line 59, in run_flent
    b.run()
  File "/usr/share/flent/flent/batch.py", line 617, in run
    return self.run_test(self.settings, self.settings.DATA_DIR, True)
  File "/usr/share/flent/flent/batch.py", line 505, in run_test
    record_metadata(res, settings.EXTENDED_METADATA,
  File "/usr/share/flent/flent/metadata.py", line 132, in record_metadata
    m['MODULE_VERSIONS'] = get_module_versions()
  File "/usr/share/flent/flent/metadata.py", line 514, in get_module_versions
    version_strings.split(
AttributeError: 'NoneType' object has no attribute 'split'

Hmm, my guess would be that this happens because the container doesn't have 'hexdump' available. Really shouldn't cause a crash, though, that's definitely a bug...

And yeah, I really ought to do something about that missing netperf package (you're the second person pointing it out in the last couple of days)...