Skip to content
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

Reenable bf-python CLI. #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Reenable bf-python CLI. #29

wants to merge 1 commit into from

Conversation

fruffy
Copy link
Contributor

@fruffy fruffy commented Jan 17, 2025

Fixes #23.

@fruffy
Copy link
Contributor Author

fruffy commented Jan 17, 2025

@jafingerhut I assuming for you enable bf-python would still cause issues with tabulate, right?

@fruffy fruffy marked this pull request as ready for review January 17, 2025 14:30
@fruffy fruffy mentioned this pull request Jan 17, 2025
@jafingerhut
Copy link
Contributor

I can try it out after my current large-VM-experiment with enabling Tofino2 is finished.

@jafingerhut
Copy link
Contributor

OK, another point of confusion for me: Why isn't the part of the CI test runs that runs bf_switchd and a PTF test on one P4 program also failing to find the tabulate package?

What is it doing differently than I would on my personal VM? I build using batch-install.sh, which runs most install as root, then I try running the model, bf_switch, and the PTF test as a normal non-root user. Is that the difference?

@fruffy
Copy link
Contributor Author

fruffy commented Jan 17, 2025

OK, another point of confusion for me: Why isn't the part of the CI test runs that runs bf_switchd and a PTF test on one P4 program also failing to find the tabulate package?

What is it doing differently than I would on my personal VM? I build using batch-install.sh, which runs most install as root, then I try running the model, bf_switch, and the PTF test as a normal non-root user. Is that the difference?

For Ubuntu 22.04 the default Python version is 3.10 so all packages are in the same folder.

For Ubuntu 20.04 the default Python version is 3.8, unclear to me why it works. It is possible that both 3.8 and 3.10 are included in PYTHONPATH.

@jafingerhut
Copy link
Contributor

jafingerhut commented Jan 21, 2025

Manual test results with this version:

commit 612cd88cf24c8d9025720d67dc1ee269656cdde2
Author: fruffy <[email protected]>
Date:   Fri Jan 17 08:57:13 2025 -0500

Started from freshly installed Ubuntu 20.04 x86_64 VM.

cd open-p4studio
./batch-install.sh |& tee log.txt

Build went OK with no errors.

I ran these commands, and the last one gave an error about not being able to find the tabulate Python package. There were some python3.8 packages, and some python3.10 packages, installed beneath open-p4studio/install/lib after the install was done.

source $HOME/setup-open-p4studio.bash
sudo ${SDE_INSTALL}/bin/veth_setup.sh 128
./run_tofino_model.sh -p tna_counter --arch tofino
./run_switchd.sh -p tna_counter --arch tofino
./run_p4_tests.sh -p tna_counter --arch tofino

All Python packages were installed in python3.10 packages on an Ubuntu 22.04 VM. I tried 3 times, but the run_switchd.sh command above never generated a command prompt, which seems to be the signal that it is ready to receive an incoming connection request from the run_p4_tests.sh command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bfrt_python is missing
2 participants