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

Software packaging using Vagrant #9

Open
xxks-kkk opened this issue Sep 19, 2018 · 4 comments
Open

Software packaging using Vagrant #9

xxks-kkk opened this issue Sep 19, 2018 · 4 comments
Assignees
Labels
DevOps Work item related to DevOps enhancement New feature or request Up for the grab Good starting point for the new contributors
Milestone

Comments

@xxks-kkk
Copy link
Member

xxks-kkk commented Sep 19, 2018

The program developed under the repo requires the user to run it under sudo, which can be dangerous especially from the development process perspective. One important reason is that SPDK utilizes DPDK as way to do memory management related work. If the programs on top of SPDK hangs and get killed, the resources allocated to SPDK application via DPDK may not have a chance to reclaim the resources.
The worst case can happen in this case is to reboot the machine, which is hard to do (imagine you have to go inside a data center to reboot one machine !physically!)

To handle this issue, we want to use vagrant to provide a VM with NVMe simulator enabled so that we can perform development work on that VM. If something bad happens, we can easily reboot the VM. Now the question is how we can build some tool to automatically setup VM, repo, and development toolchain so that developers can start to work without much overhead.

A good starting point is the vagrant provided by SPDK repo.

@xxks-kkk xxks-kkk added the Up for the grab Good starting point for the new contributors label Sep 19, 2018
@xxks-kkk xxks-kkk added this to the 1.0 milestone Sep 19, 2018
@xxks-kkk xxks-kkk added DevOps Work item related to DevOps enhancement New feature or request labels Sep 19, 2018
@djarotech djarotech self-assigned this Sep 21, 2018
@djarotech
Copy link
Collaborator

djarotech commented Sep 21, 2018

Tried it and it worked for me, here are the steps I took:
https://github.com/utsaslab/rustfs/wiki/Vagrant-Set-Up-Steps

@xxks-kkk
Copy link
Member Author

xxks-kkk commented Sep 22, 2018

Hello Dan @danielpygo ,

Thanks for the writeup. However, I still think there are some issues when I follow your guide. For example, when I run ./configure --prefix=~/spdk_install, I got the following error message:

Creating CONFIG.local...done.
Type 'make' to build.
vagrant@localhost:~/spdk_repo/spdk$ make
C compiler is gcc but C++ compiler is
This may result in errors
make[3]: Entering directory '/home/vagrant/spdk_repo/spdk/dpdk'
== Build lib
== Build lib/librte_compat
== Build lib/librte_eal
== Build lib/librte_eal/common
== Build lib/librte_eal/linuxapp
== Build lib/librte_eal/linuxapp/eal
  CC eal.o
  CC eal_cpuflags.o
  CC eal_hugepage_info.o
  CC eal_memory.o
/home/vagrant/spdk_repo/spdk/dpdk/lib/librte_eal/linuxapp/eal/eal_memory.c:27:18: fatal error: numa.h: No such file or directory
compilation terminated.
/home/vagrant/spdk_repo/spdk/dpdk/mk/internal/rte.compile-pre.mk:114: recipe for target 'eal_memory.o' failed
make[8]: *** [eal_memory.o] Error 1
/home/vagrant/spdk_repo/spdk/dpdk/mk/rte.subdir.mk:35: recipe for target 'eal' failed
make[7]: *** [eal] Error 2
/home/vagrant/spdk_repo/spdk/dpdk/mk/rte.subdir.mk:35: recipe for target 'linuxapp' failed
make[6]: *** [linuxapp] Error 2
/home/vagrant/spdk_repo/spdk/dpdk/mk/rte.subdir.mk:35: recipe for target 'librte_eal' failed
make[5]: *** [librte_eal] Error 2
/home/vagrant/spdk_repo/spdk/dpdk/mk/rte.sdkbuild.mk:49: recipe for target 'lib' failed
make[4]: *** [lib] Error 2
/home/vagrant/spdk_repo/spdk/dpdk/mk/rte.sdkroot.mk:100: recipe for target 'all' failed
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/vagrant/spdk_repo/spdk/dpdk'
Makefile:12: recipe for target 'all' failed
make[2]: *** [all] Error 2
Makefile:106: recipe for target 'all' failed
make[1]: *** [all] Error 2
/home/vagrant/spdk_repo/spdk/mk/spdk.subdirs.mk:35: recipe for target 'dpdkbuild' failed
make: *** [dpdkbuild] Error 2

Are there any missing steps?

Thanks!

@djarotech
Copy link
Collaborator

Yes there was some missing about setting up the vm. Updated it yesterday but I am having an issue replicating my results from friday, I will get back to you soon.

@xxks-kkk
Copy link
Member Author

Using QEMU with emulated NVMe SSD is possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DevOps Work item related to DevOps enhancement New feature or request Up for the grab Good starting point for the new contributors
Projects
None yet
Development

No branches or pull requests

2 participants