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

networking_ebpf build: ./ipdk: line 208: docker: command not found #295

Open
chrispsommers opened this issue Nov 16, 2022 · 4 comments
Open

Comments

@chrispsommers
Copy link

chrispsommers commented Nov 16, 2022

Following the networking_ebpf instructions at https://github.com/ipdk-io/ipdk/blob/main/build/networking_ebpf/README_DOCKER.md#optional-vagrant-setup yielded the error shown below. SHould the instructions also include this step?

/git/ipdk/build/networking_ebpf/scripts/host_install.sh

Here is the error:

~/ipdk/build/networking_ebpf/vagrant$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
==> default: Checking if box 'debian/bullseye64' version '11.20220912.1' is up to date...
==> default: Clearing any previously set forwarded ports...
==> default: Clearing any previously set network interfaces...
==> default: Preparing network interfaces based on configuration...
    default: Adapter 1: nat
==> default: Forwarding ports...
    default: 22 (guest) => 2222 (host) (adapter 1)
==> default: Running 'pre-boot' VM customizations...
==> default: Booting VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 127.0.0.1:2222
    default: SSH username: vagrant
    default: SSH auth method: private key
==> default: Machine booted and ready!
==> default: Checking for guest additions in VM...
    default: The guest additions on this VM do not match the installed version of
    default: VirtualBox! In most cases this is fine, but in rare cases it can
    default: prevent things such as shared folders from working properly. If you see
    default: shared folder errors, please make sure the guest additions within the
    default: virtual machine match the version of VirtualBox you have installed on
    default: your host and reload your VM.
    default: 
    default: Guest Additions Version: 6.0.0 r127566
    default: VirtualBox Version: 6.1
==> default: Mounting shared folders...
    default: /vagrant => /home/chris/ipdk/build/networking_ebpf/vagrant
    default: /git/ipdk => /home/chris/ipdk
==> default: Machine already provisioned. Run `vagrant provision` or use the `--provision`
==> default: flag to force provisioning. Provisioners marked to run always will still run.

==> default: Machine 'default' has a post `vagrant up` message. This is a message
==> default: from the creator of the Vagrantfile, and not from Vagrant itself:
==> default: 
==> default: Vanilla Debian box. See https://app.vagrantup.com/debian for help and bug reports
chris@chris-z4:~/ipdk/build/networking_ebpf/vagrant$ vagrant ssh
Linux bullseye 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Tue Nov 15 19:29:47 2022 from 10.0.2.2
vagrant@bullseye:~$ cd /git/ipdk/build
vagrant@bullseye:/git/ipdk/build$ ./ipdk install ebpf-ubuntu2004
/git/ipdk/build/scripts/ipdk_default.env: line 31: git: command not found
Loaded /git/ipdk/build/scripts/ipdk_default.env
Loaded /home/vagrant/.ipdk/ipdk.env
User changable IPDK configuration file is already defined at 
'~/.ipdk/ipdk.env'.
Changed runtime environment to: ebpf-ubuntu2004

As last step execute:
  export PATH=/git/ipdk/build:$PATH
to add the IPDK CLI to your path in the running environment!
vagrant@bullseye:/git/ipdk/build$ ipdk build
-bash: ipdk: command not found
vagrant@bullseye:/git/ipdk/build$ ./ipdk build
/git/ipdk/build/scripts/ipdk_default.env: line 31: git: command not found
Loaded /git/ipdk/build/scripts/ipdk_default.env
Loaded /home/vagrant/.ipdk/ipdk.env
/git/ipdk/build /git/ipdk/build
Can't find docker. Install first!!
Use old docker build!
/git/ipdk/build/networking_ebpf /git/ipdk/build /git/ipdk/build
./ipdk: line 208: docker: command not found
/git/ipdk/build /git/ipdk/build
/git/ipdk/build
@vsureshkumarp
Copy link
Contributor

vsureshkumarp commented Nov 22, 2022

Looks like you missed the step to set the PATH variable
export PATH=/git/ipdk/build:$PATH before running the ipdk build.
Once if you set the PATH you will not see ipdk command error.

./ipdk install ebpf-ubuntu2004
/git/ipdk/build/scripts/ipdk_default.env: line 31: git: command not found
Loaded /git/ipdk/build/scripts/ipdk_default.env
Loaded /home/vagrant/.ipdk/ipdk.env
User changable IPDK configuration file is already defined at
'~/.ipdk/ipdk.env'.
Changed runtime environment to: ebpf-ubuntu2004

As last step execute:
export PATH=/git/ipdk/build:$PATH
to add the IPDK CLI to your path in the running environment!

vagrant@bullseye:/git/ipdk/build$

@vsureshkumarp
Copy link
Contributor

No issues observed till docker container image creation.
But, unable to run the demo "make start-demo" due to missing the folder “go” under /home/vagrant
Somehow go folder is getting created under /root/ instead of /home/vagrant
Needs further debugging.

@chrispsommers
Copy link
Author

Looks like you missed the step to set the PATH variable export PATH=/git/ipdk/build:$PATH before running the ipdk build. Once if you set the PATH you will not see ipdk command error.

./ipdk install ebpf-ubuntu2004 /git/ipdk/build/scripts/ipdk_default.env: line 31: git: command not found Loaded /git/ipdk/build/scripts/ipdk_default.env Loaded /home/vagrant/.ipdk/ipdk.env User changable IPDK configuration file is already defined at '~/.ipdk/ipdk.env'. Changed runtime environment to: ebpf-ubuntu2004

As last step execute: export PATH=/git/ipdk/build:$PATH to add the IPDK CLI to your path in the running environment! vagrant@bullseye:/git/ipdk/build$

Thanks, I confirmed that setting the PATH solved the docker image build issue. Can't this PATH export be done automatically by the build scripts? Why add a manual step?

@stolsma
Copy link
Contributor

stolsma commented Nov 29, 2022

Can't this PATH export be done automatically by the build scripts? Why add a manual step?

Unfortunately not... Because the script is running in its own shell environment exporting a extended path will be gone when the script ends. 😢

Starting a new bash shell or logging in again should do the work also...

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

No branches or pull requests

3 participants