GithubHelp home page GithubHelp logo

nanovms / ops Goto Github PK

View Code? Open in Web Editor NEW
1.2K 24.0 131.0 19.86 MB

ops - build and run nanos unikernels

Home Page: https://ops.city

License: MIT License

Makefile 0.14% Go 98.29% Shell 1.57%
unikernels devops microservice serverless edge-computing virtualization operating-systems minimalist sandbox orchestrator

ops's People

Contributors

ahmedaabouzied avatar am11 avatar angristan avatar arknable avatar asyslinux avatar chaitanya-baraskar avatar dependabot[bot] avatar emikhalev avatar externalreality avatar eyberg avatar fabiodmferreira avatar francescolavra avatar fredrikbakken avatar girish-nanovms avatar girishramnani avatar hnord-vdx avatar mkhon avatar ponokys avatar prologic avatar quantumsheep avatar rinor avatar ronaudinho avatar rutu-k avatar sanderssj avatar sanketsudake avatar shravanshetty1 avatar skupr avatar tijoytom avatar wjhun avatar zeroecco avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ops's Issues

hide or adjust verbosity levels of debug output

in general the user prob. shouldn't see any output except for what comes from their program - maybe a single boot msg line - idk

we should hide all the extra crap like qemu output and syscall count behind '-d' or be able to adjust the verbosity of the output

Fails to build on MacOS

Maybe MacOS isn't supported yet. But right now I can't make build on mac because variables like netlink.TUNTAP_MODE_TAP are in a _linux.go file, which I think doesn't get compiled on mac.

$> make build
go build -o ops -v
github.com/nanovms/ops
# github.com/nanovms/ops
./network.go:45:14: undefined: netlink.TUNTAP_MODE_TAP
./network.go:188:12: undefined: dhcp4client.NewPacketSock
make: *** [build] Error 2

support for root filepaths

we briefly discussed this on the phone and it wasn't clear to me if something needed to change on nanos or if this is just a nvm thing but we'll want support for root filepaths - my line of thinking on this is to do the same thing that debian does and treat cwd as root and let the user do what they wish

for instance with ruby there's a ton of stuff that looks for '/usr/lib/ruby/' and then there's the '/etc' stuff and everything else - i think right now everything is being stuffed into '/myapp'

one-click install for osx/linux

linux is rather straight-forward:

wget https://storage.googleapis.com/uniboot/release/nvm
cp nvm /usr/local/bin/.

osx is a bit more involved as tuntap-osx && intel hax pkgs need to be installed along w/qemu if it's not there already - don't include the csrutil instructions - just figure out what version of osx they are running and download the appropriate signed build

https://github.com/deferpanic/virgo

java failing w/weird not msg

this is more than likely a product of my env but whatever it is we should fail a little bit more gracefully

➜  jt nvm run -a "HelloWorld" -c config.json -p 8080 /home/eyberg/jt/java                                                                                     
(children:(not:(contents:(host:not))usr:(children:(lib:(children:(libc.so.6:(contents:(host:/usr/lib/libc.so.6))))))lib64:(children:(ld-linux-x86-64.so.2:(contents:(host:/lib64/ld-linux-x86-64.so.2))))jt:(children:(java:(contents:(host:/home/eyberg/jt/java))))kernel:(contents:(host:.staging/stage3)))
program:/jt/java
arguments:[java HelloWorld]
environment:())
2018/10/11 12:26:56 couldn't open file not

panic: exit status 255

goroutine 1 [running]:
main.panicOnError(...)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:57
main.buildImages(0x7ffe86e693b1, 0x14, 0x0, 0xc0000a6480)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:114 +0x186
main.runCommandHandler(0xc0000f6780, 0xc00012e230, 0x1, 0x7)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:96 +0x345
github.com/spf13/cobra.(*Command).execute(0xc0000f6780, 0xc00012e1c0, 0x7, 0x7, 0xc0000f6780, 0xc00012e1c0)
        /home/eyberg/go/src/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000f6f00, 0x4, 0x0, 0xc0000f6c80)                                                                              
        /home/eyberg/go/src/github.com/spf13/cobra/command.go:852 +0x2fd                                                                                      
github.com/spf13/cobra.(*Command).Execute(0xc0000f6f00, 0xc0000dbf48, 0x1)
        /home/eyberg/go/src/github.com/spf13/cobra/command.go:800 +0x2b                                                                                       
main.main()                                                                                                                                                   
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:206 +0x668

ops gets

I am seeing the same error using ops that nanos saw and fixed with:
nanovms/nanos#31

qemu-system-x86_64 --version
QEMU emulator version 2.11.1(Debian 1:2.11+dfsg-1ubuntu7.9)

cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=18.04
DISTRIB_CODENAME=bionic
DISTRIB_DESCRIPTION="Ubuntu 18.04.1 LTS"

nvm w/out any commands and w/out sudo panics rather than showing help

panic: chmod mkfs: operation not permitted

goroutine 1 [running]:
main.panicOnError(0x9cb720, 0xc420080e70)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:54 +0x4a
main.downloadImages()
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:150 +0x2d2
main.main()
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:213 +0x2a6

memcached desires get/setrlimit

this is one of those cases where we might have to introduce minor patches to support something like this -> I don't see us supporting the limit syscalls anytime soon if ever and i don't see an easy way around this w/out just patching it - not a priority - just noting

nosyscall setrlimit
failed to set rlimit for open files. Try starting as root or requesting smaller maxconns value.
exit_groupexit status 1
eyberg@dungeon:~/mc$ nvm run -p 8083 -c config.json memcached ^C
eyberg@dungeon:~/mc$ cat config.json
{
    "Args":["-vvv", "-c", "5"],
"Env" : {"MAXCONNS": "5"}
}

https://github.com/memcached/memcached/blob/bb0980fbbafd4eb723f76918e7ca364360315c1b/memcached.c#L7580

ruby pkg needed

this looks like it's loading the ruby interpreter fine - just missing a ton of ruby include shit

booting image ...
qemu-system-x86_64 -drive file=image,format=raw,index=0 -display none -serial stdio -nodefaults -no-reboot -m 2G -device isa-debug-exit -drive file=image,format=raw,if=virtio -device virtio-net,netdev=n0 -netdev user,id=n0,hostfwd=tcp::8081-:8081
create fs
kernel complete
pages heap: 000000007fbaf000, length 00000000002f7000
physical memory:
   base 0000000000200000, length 000000007f600000
Using HPET clock source.
init net page alloc 0000000000f027320
read program complete: 00000020000000000 (children:(usr:(children:(lib:(children:(x86_64-linux-gnu:(children:(libgmp.so.10:(filelength:522664 extents:(0:(length:522664 offset:3788800))) libruby-2.3.so.2.3:(filelength:2554168 extents:(0:(length:2554168 offset:1234432))))))))) static:(children:(hw.rb:(filelength:12 extents:(0:(length:12 offset:1233920))))) lib:(children:(x86_64-linux-gnu:(children:(libm.so.6:(filelength:1088952 extents:(0:(length:1088952 offset:4519936))) libc.so.6:(filelength:1868984 extents:(0:(length:1868984 offset:5762560))) libpthread.so.0:(filelength:138696 extents:(0:(length:138696 offset:5623808))) libcrypt.so.1:(filelength:39224 extents:(0:(length:39224 offset:4480512))) libdl.so.2:(filelength:14608 extents:(0:(length:14608 offset:5608960))))))) lib64:(children:(ld-linux-x86-64.so.2:(filelength:162632 extents:(0:(length:162632 offset:4317696))))) ruby2.3:(filelength:6096 extents:(0:(length:6096 offset:4311552))) kernel:(filelength:1230528 extents:(0:(length:1230528 offset:3072)))) environment:() program:/ruby2.3 arguments:(1:hw.rb 0:ruby2.3))
assigned: 10.0.2.15
enq
open /etc/ld.so.cache - not found
open /lib/x86_64-linux-gnu/tls/libruby-2.3.so.2.3 - not found
open /lib/x86_64-linux-gnu/libruby-2.3.so.2.3 - not found
open /usr/lib/x86_64-linux-gnu/tls/libruby-2.3.so.2.3 - not found
open /lib/x86_64-linux-gnu/libgmp.so.10 - not found
nosyscall set_robust_list
open /proc/self/maps - not found
nosyscall getrandom
open /dev/urandom - not found
nosyscall ioctl
nosyscall ioctl
nosyscall ioctl
nosyscall getrandom
open /dev/urandom - not found
nosyscall pipe2
<main>: warning: Failed to create communication pipe for timer thread: No such file or directory
<main>: warning: pipe creation failed for timer: No such file or directory, scheduling broken
nosyscall geteuid
nosyscall getegid
nosyscall getuid
nosyscall geteuid
nosyscall getgid
nosyscall getegid
open /usr/local/lib/site_ruby/2.3.0/enc/encdb.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/encdb.so - not found
open /usr/local/lib/site_ruby/enc/encdb.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/encdb.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/encdb.so - not found
open /usr/lib/ruby/vendor_ruby/enc/encdb.so - not found
open /usr/lib/ruby/2.3.0/enc/encdb.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so - not found
open /usr/local/lib/site_ruby/2.3.0/enc/encdb.so.rb - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/encdb.so.rb - not found
open /usr/local/lib/site_ruby/enc/encdb.so.rb - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/encdb.so.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/encdb.so.rb - not found
open /usr/lib/ruby/vendor_ruby/enc/encdb.so.rb - not found
open /usr/lib/ruby/2.3.0/enc/encdb.so.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so.rb - not found
open /usr/local/lib/site_ruby/2.3.0/enc/encdb.so.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/encdb.so.so - not found
open /usr/local/lib/site_ruby/enc/encdb.so.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/encdb.so.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/encdb.so.so - not found
open /usr/lib/ruby/vendor_ruby/enc/encdb.so.so - not found
open /usr/lib/ruby/2.3.0/enc/encdb.so.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/encdb.so.so - not found
open /usr/local/lib/site_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/site_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/site_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/site_ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so.so - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/local/lib/site_ruby/2.3.0/unicode_normalize.rb - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/unicode_normalize.rb - not found
open /usr/local/lib/site_ruby/unicode_normalize.rb - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/unicode_normalize.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/unicode_normalize.rb - not found
open /usr/lib/ruby/vendor_ruby/unicode_normalize.rb - not found
open /usr/lib/ruby/2.3.0/unicode_normalize.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/unicode_normalize.rb - not found
open /usr/local/lib/site_ruby/2.3.0/unicode_normalize.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/unicode_normalize.so - not found
open /usr/local/lib/site_ruby/unicode_normalize.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so - not found
open /usr/local/lib/site_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so.rb - not found
open /usr/local/lib/site_ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/enc/ansi_x3_4_1968.so.so - not found
open /usr/local/lib/site_ruby/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/ruby/vendor_ruby/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/enc/ansi_x3_4_1968.so.so - not found
open /usr/local/lib/site_ruby/2.3.0/unicode_normalize.rb - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/unicode_normalize.rb - not found
open /usr/local/lib/site_ruby/unicode_normalize.rb - not found
open /usr/lib/ruby/vendor_ruby/2.3.0/unicode_normalize.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/vendor_ruby/2.3.0/unicode_normalize.rb - not found
open /usr/lib/ruby/vendor_ruby/unicode_normalize.rb - not found
open /usr/lib/ruby/2.3.0/unicode_normalize.rb - not found
open /usr/lib/x86_64-linux-gnu/ruby/2.3.0/unicode_normalize.rb - not found
open /usr/local/lib/site_ruby/2.3.0/unicode_normalize.so - not found
open /usr/local/lib/x86_64-linux-gnu/site_ruby/unicode_normalize.so - not found
open /usr/local/lib/site_ruby/unicode_normalize.so - not found

HPET error when running a basic node example

When running a very basic example of a nodejs code i get the follow error at the bottom. Below here is the node code and config.

ex.js

console.log("Hello World!");

config.js

{
  "Files":["ex.js"],
  "Args":["node","ex.js"]
}
$ ../ops run -p 8080 -c config.js ../.packages/node_v11.15.0.tar.gz
/var/folders/ty/kn8nzb0n3qj2gfmw3qc92hd40000gn/T/resolv=>/etc/resolv.conf
/var/folders/ty/kn8nzb0n3qj2gfmw3qc92hd40000gn/T/hostname=>/proc/sys/kernel/hostname
ex.js=>ex.js
../.packages/node_v11.15.0.tar.gz=>/.packages/node_v11.15.0.tar.gz
Finding dependent shared libs
booting image ...
pages heap: 000000007fb7d000, length 00000000002f7000
physical memory:
   base 0000000000200000, length 000000007f600000
Error: No increment HPET main counter
HPET initialization failed; no timer source
exit status 1

When trying to do the same thing with the load command i get a different error.

../ops load node_v11.15.0 -p 8080 -c config.js
Extracting /Users/<user>/go/src/github.com/nanovms/ops/.packages/node_v11.15.0.tar.gz...
/var/folders/ty/kn8nzb0n3qj2gfmw3qc92hd40000gn/T/resolv=>/etc/resolv.conf
/var/folders/ty/kn8nzb0n3qj2gfmw3qc92hd40000gn/T/hostname=>/proc/sys/kernel/hostname
ex.js=>ex.js
node=>node
.staging/node_v11.15.0/node=>node_v11.15.0/node
.staging/node_v11.15.0/package.manifest=>node_v11.15.0/package.manifest
.staging/node_v11.15.0/sysroot/lib/x86_64-linux-gnu/libc.so.6=>lib/x86_64-linux-gnu/libc.so.6
.staging/node_v11.15.0/sysroot/lib/x86_64-linux-gnu/libdl.so.2=>lib/x86_64-linux-gnu/libdl.so.2
.staging/node_v11.15.0/sysroot/lib/x86_64-linux-gnu/libgcc_s.so.1=>lib/x86_64-linux-gnu/libgcc_s.so.1
.staging/node_v11.15.0/sysroot/lib/x86_64-linux-gnu/libm.so.6=>lib/x86_64-linux-gnu/libm.so.6
.staging/node_v11.15.0/sysroot/lib/x86_64-linux-gnu/libpthread.so.0=>lib/x86_64-linux-gnu/libpthread.so.0
.staging/node_v11.15.0/sysroot/lib/x86_64-linux-gnu/librt.so.1=>lib/x86_64-linux-gnu/librt.so.1
.staging/node_v11.15.0/sysroot/lib64/ld-linux-x86-64.so.2=>lib64/ld-linux-x86-64.so.2
.staging/node_v11.15.0/sysroot/usr/lib/x86_64-linux-gnu/libstdc++.so.6=>usr/lib/x86_64-linux-gnu/libstdc++.so.6
2019/01/10 12:04:19 couldn't open file node

*exec.ExitError exit status 255
/Users/<user>/go/src/github.com/nanovms/ops/lepton/image.go:39 (0x12be572)
	BuildImageFromPackage: if err := buildImage(&c, m); err != nil {
/Users/<user>/go/src/github.com/nanovms/ops/ops.go:189 (0x131f48d)
	buildFromPackage: err = api.BuildImageFromPackage(packagepath, *c)
/Users/<user>/go/src/github.com/nanovms/ops/ops.go:264 (0x1320251)
	loadCommandHandler: buildFromPackage(path.Join(".staging", args[0]), c)
/Users/<user>/go/src/github.com/spf13/cobra/command.go:766 (0x131535c)
	(*Command).execute: c.Run(c, argWoFlags)
/Users/<user>/go/src/github.com/spf13/cobra/command.go:852 (0x1315efd)
	(*Command).ExecuteC: err = cmd.execute(flags)
/Users/<user>/go/src/github.com/spf13/cobra/command.go:800 (0x1315bdb)
	(*Command).Execute: _, err := c.ExecuteC()
/Users/<user>/go/src/github.com/nanovms/ops/ops.go:470 (0x13227df)
	main: rootCmd.Execute()
/usr/local/Cellar/go/1.11.1/libexec/src/runtime/proc.go:201 (0x102dbf7)
	main: fn()
/usr/local/Cellar/go/1.11.1/libexec/src/runtime/asm_amd64.s:1333 (0x1058fc1)
	goexit: BYTE	$0x90	// NOP

panic: exit status 255

goroutine 1 [running]:
main.panicOnError(0x1448040, 0xc0001ec000)
	/Users/<user>/go/src/github.com/nanovms/ops/ops.go:45 +0xde
main.buildFromPackage(0xc00018b8e0, 0x16, 0xc00009a140)
	/Users/<user>/go/src/github.com/nanovms/ops/ops.go:190 +0xcb
main.loadCommandHandler(0xc0000b7900, 0xc000098230, 0x1, 0x5)
	/Users/<user>/go/src/github.com/nanovms/ops/ops.go:264 +0x661
github.com/spf13/cobra.(*Command).execute(0xc0000b7900, 0xc0000981e0, 0x5, 0x5, 0xc0000b7900, 0xc0000981e0)
	/Users/<user>/go/src/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000b7b80, 0x8, 0x0, 0xc0000b7900)
	/Users/<user>/go/src/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0xc0000b7b80, 0xc0000a7f18, 0x1)
	/Users/<user>/go/src/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/Users/<user>/go/src/github.com/nanovms/ops/ops.go:470 +0xdaf

Can't read encodings

Running python works only with -S flag:

-S
Disable the import of the module site and the site-dependent manipulations of sys.path that it entails.

When removing this flag, the interpreter tries to load utf-8 encoding and fails, resulting in not being able to interpret text files:

qemu-system-x86_64 -drive file=image,format=raw,index=0 -display none -serial stdio -nodefaults -no-reboot -m 2G -device isa-debug-exit -drive file=image,format=raw,if=virtio -device virtio-net,netdev=n0 -netdev user,id=n0,hostfwd=tcp::8083-:8083
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
create fs
kernel complete
pages heap: 000000007fba8000, length 00000000002f7000
physical memory:
   base 0000000000200000, length 000000007f600000
assigned: 10.0.2.15
open /etc/ld.so.cache - not found
main-loop: WARNING: I/O thread spun for 1000 iterations
# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
open /Lib/site.x86_64-linux-gnu.so - not found
open /Lib/site.so - not found
open /Lib/sitemodule.so - not found
# /Lib/site.pyc has bad mtime
  File "/Lib/site.py", line 243
    I"""Append module search paths for third-party packages to sys.path.
             ^
SyntaxError: invalid syntax
# clear __builtin__._
# clear sys.path
# clear sys.argv
# clear sys.ps1
{
  "Files":["pex/ex.py", "lib/x86_64-linux-gnu/tls/libpthread.so.0", "lib/x86_64-linux-gnu/tls/libc.so.6", "lib/x86_64-linux-gnu/tls/libdl.so.2", "lib/x86_64-linux-gnu/tls/libutil.so.1", "lib/x86_64-linux-gnu/tls/libz.so.1", "lib/x86_64-linux-gnu/tls/libm.so.6", 
    "lib/x86_64-linux-gnu/tls/libreadline.so.5",
    "lib/x86_64-linux-gnu/tls/libtinfo.so.5",
    "lib/x86_64-linux-gnu/tls/libnss_compat.so.2",
    "lib/x86_64-linux-gnu/tls/libexpat.so.1",
    "usr/lib/locale/LC_CTYPE",
    "usr/lib/locale/C.UTF-8/LC_CTYPE",
    "usr/lib/locale/C.UTF-8/LC_NAME",
    "usr/lib/locale/locale-archive",
"usr/lib/python2.7/encodings/aliases.py",
"usr/lib/python2.7/encodings/mac_croatian.py",
"usr/lib/python2.7/encodings/cp865.py",
"usr/lib/python2.7/encodings/gb2312.pyc",
"usr/lib/python2.7/encodings/utf_16_be.pyc",
"usr/lib/python2.7/encodings/iso2022_jp_3.pyc",
"usr/lib/python2.7/encodings/iso8859_14.pyc",
"usr/lib/python2.7/encodings/iso8859_4.pyc",
"usr/lib/python2.7/encodings/quopri_codec.pyc",
"usr/lib/python2.7/encodings/iso8859_1.pyc",
"usr/lib/python2.7/encodings/utf_8.pyc",
"usr/lib/python2.7/encodings/cp1252.py",
"usr/lib/python2.7/encodings/iso8859_15.py",
"usr/lib/python2.7/encodings/cp1255.pyc",
"usr/lib/python2.7/encodings/euc_jp.pyc",
"usr/lib/python2.7/encodings/euc_jp.py",
"usr/lib/python2.7/encodings/shift_jisx0213.pyc",
"usr/lib/python2.7/encodings/shift_jis.py",
"usr/lib/python2.7/encodings/cp1026.pyc",
"usr/lib/python2.7/encodings/utf_32_le.pyc",
"usr/lib/python2.7/encodings/utf_16.py",
"usr/lib/python2.7/encodings/iso8859_7.pyc",
"usr/lib/python2.7/encodings/latin_1.pyc",
"usr/lib/python2.7/encodings/iso2022_jp_1.pyc",
"usr/lib/python2.7/encodings/base64_codec.py",
"usr/lib/python2.7/encodings/string_escape.py",
"usr/lib/python2.7/encodings/mac_greek.pyc",
"usr/lib/python2.7/encodings/cp1257.pyc",
"usr/lib/python2.7/encodings/shift_jis_2004.pyc",
"usr/lib/python2.7/encodings/cp869.py",
"usr/lib/python2.7/encodings/gbk.py",
"usr/lib/python2.7/encodings/cp932.pyc",
"usr/lib/python2.7/encodings/mac_arabic.pyc",
"usr/lib/python2.7/encodings/mac_iceland.py",
"usr/lib/python2.7/encodings/iso8859_9.pyc",
"usr/lib/python2.7/encodings/cp855.pyc",
"usr/lib/python2.7/encodings/cp864.py",
"usr/lib/python2.7/encodings/hex_codec.py",
"usr/lib/python2.7/encodings/cp875.py",
"usr/lib/python2.7/encodings/punycode.py",
"usr/lib/python2.7/encodings/utf_16_be.py",
"usr/lib/python2.7/encodings/mac_centeuro.pyc",
"usr/lib/python2.7/encodings/cp1256.py",
"usr/lib/python2.7/encodings/cp1140.py",
"usr/lib/python2.7/encodings/iso2022_jp_2.pyc",
"usr/lib/python2.7/encodings/ptcp154.pyc",
"usr/lib/python2.7/encodings/cp852.pyc",
"usr/lib/python2.7/encodings/cp500.pyc",
"usr/lib/python2.7/encodings/ascii.pyc",
"usr/lib/python2.7/encodings/unicode_escape.py",
"usr/lib/python2.7/encodings/iso2022_jp_2004.py",
"usr/lib/python2.7/encodings/iso8859_4.py",
"usr/lib/python2.7/encodings/iso8859_3.py",
"usr/lib/python2.7/encodings/euc_jis_2004.pyc",
"usr/lib/python2.7/encodings/utf_16.pyc",
"usr/lib/python2.7/encodings/cp437.py",
"usr/lib/python2.7/encodings/gb18030.pyc",
"usr/lib/python2.7/encodings/iso8859_16.py",
"usr/lib/python2.7/encodings/cp037.pyc",
"usr/lib/python2.7/encodings/cp857.py",
"usr/lib/python2.7/encodings/cp862.py",
"usr/lib/python2.7/encodings/cp1253.py",
"usr/lib/python2.7/encodings/cp855.py",
"usr/lib/python2.7/encodings/latin_1.py",
"usr/lib/python2.7/encodings/cp862.pyc",
"usr/lib/python2.7/encodings/cp950.py",
"usr/lib/python2.7/encodings/utf_32_le.py",
"usr/lib/python2.7/encodings/uu_codec.pyc",
"usr/lib/python2.7/encodings/mac_cyrillic.pyc",
"usr/lib/python2.7/encodings/cp424.pyc",
"usr/lib/python2.7/encodings/utf_8_sig.py",
"usr/lib/python2.7/encodings/utf_16_le.py",
"usr/lib/python2.7/encodings/unicode_escape.pyc",
"usr/lib/python2.7/encodings/cp1251.pyc",
"usr/lib/python2.7/encodings/cp1253.pyc",
"usr/lib/python2.7/encodings/string_escape.pyc",
"usr/lib/python2.7/encodings/cp437.pyc",
"usr/lib/python2.7/encodings/iso2022_jp_ext.pyc",
"usr/lib/python2.7/encodings/utf_32.pyc",
"usr/lib/python2.7/encodings/utf_7.pyc",
"usr/lib/python2.7/encodings/utf_32.py",
"usr/lib/python2.7/encodings/cp1250.py",
"usr/lib/python2.7/encodings/shift_jis.pyc",
"usr/lib/python2.7/encodings/iso2022_jp_2.py",
"usr/lib/python2.7/encodings/cp949.py",
"usr/lib/python2.7/encodings/euc_kr.py",
"usr/lib/python2.7/encodings/cp861.pyc",
"usr/lib/python2.7/encodings/iso2022_jp_ext.py",
"usr/lib/python2.7/encodings/hz.pyc",
"usr/lib/python2.7/encodings/johab.py",
"usr/lib/python2.7/encodings/gb2312.py",
"usr/lib/python2.7/encodings/rot_13.pyc",
"usr/lib/python2.7/encodings/cp737.py",
"usr/lib/python2.7/encodings/iso8859_5.py",
"usr/lib/python2.7/encodings/cp1140.pyc",
"usr/lib/python2.7/encodings/cp1026.py",
"usr/lib/python2.7/encodings/cp858.py",
"usr/lib/python2.7/encodings/iso8859_11.py",
"usr/lib/python2.7/encodings/ascii.py",
"usr/lib/python2.7/encodings/cp1006.py",
"usr/lib/python2.7/encodings/koi8_r.py",
"usr/lib/python2.7/encodings/utf_32_be.py",
"usr/lib/python2.7/encodings/iso2022_kr.py",
"usr/lib/python2.7/encodings/iso8859_10.py",
"usr/lib/python2.7/encodings/cp737.pyc",
"usr/lib/python2.7/encodings/iso8859_16.pyc",
"usr/lib/python2.7/encodings/cp720.pyc",
"usr/lib/python2.7/encodings/iso8859_2.py",
"usr/lib/python2.7/encodings/euc_jis_2004.py",
"usr/lib/python2.7/encodings/mbcs.py",
"usr/lib/python2.7/encodings/mac_turkish.pyc",
"usr/lib/python2.7/encodings/mac_romanian.pyc",
"usr/lib/python2.7/encodings/cp1006.pyc",
"usr/lib/python2.7/encodings/iso2022_jp.py",
"usr/lib/python2.7/encodings/iso8859_10.pyc",
"usr/lib/python2.7/encodings/cp1251.py",
"usr/lib/python2.7/encodings/cp852.py",
"usr/lib/python2.7/encodings/quopri_codec.py",
"usr/lib/python2.7/encodings/cp037.py",
"usr/lib/python2.7/encodings/cp720.py",
"usr/lib/python2.7/encodings/cp1258.py",
"usr/lib/python2.7/encodings/johab.pyc",
"usr/lib/python2.7/encodings/hex_codec.pyc",
"usr/lib/python2.7/encodings/cp875.pyc",
"usr/lib/python2.7/encodings/cp1255.py",
"usr/lib/python2.7/encodings/mac_roman.pyc",
"usr/lib/python2.7/encodings/mac_cyrillic.py",
"usr/lib/python2.7/encodings/idna.pyc",
"usr/lib/python2.7/encodings/cp1258.pyc",
"usr/lib/python2.7/encodings/iso8859_5.pyc",
"usr/lib/python2.7/encodings/ptcp154.py",
"usr/lib/python2.7/encodings/uu_codec.py",
"usr/lib/python2.7/encodings/__init__.pyc",
"usr/lib/python2.7/encodings/cp863.pyc",
"usr/lib/python2.7/encodings/cp869.pyc",
"usr/lib/python2.7/encodings/utf_7.py",
"usr/lib/python2.7/encodings/cp858.pyc",
"usr/lib/python2.7/encodings/cp1254.pyc",
"usr/lib/python2.7/encodings/cp866.pyc",
"usr/lib/python2.7/encodings/mbcs.pyc",
"usr/lib/python2.7/encodings/iso8859_14.py",
"usr/lib/python2.7/encodings/bz2_codec.py",
"usr/lib/python2.7/encodings/cp424.py",
"usr/lib/python2.7/encodings/big5hkscs.py",
"usr/lib/python2.7/encodings/koi8_u.pyc",
"usr/lib/python2.7/encodings/base64_codec.pyc",
"usr/lib/python2.7/encodings/cp865.pyc",
"usr/lib/python2.7/encodings/iso8859_6.py",
"usr/lib/python2.7/encodings/cp861.py",
"usr/lib/python2.7/encodings/big5.pyc",
"usr/lib/python2.7/encodings/iso8859_11.pyc",
"usr/lib/python2.7/encodings/mac_turkish.py",
"usr/lib/python2.7/encodings/mac_roman.py",
"usr/lib/python2.7/encodings/mac_romanian.py",
"usr/lib/python2.7/encodings/mac_iceland.pyc",
"usr/lib/python2.7/encodings/bz2_codec.pyc",
"usr/lib/python2.7/encodings/iso8859_6.pyc",
"usr/lib/python2.7/encodings/charmap.pyc",
"usr/lib/python2.7/encodings/utf_16_le.pyc",
"usr/lib/python2.7/encodings/mac_greek.py",
"usr/lib/python2.7/encodings/cp856.pyc",
"usr/lib/python2.7/encodings/hp_roman8.pyc",
"usr/lib/python2.7/encodings/rot_13.py",
"usr/lib/python2.7/encodings/cp860.pyc",
"usr/lib/python2.7/encodings/cp1257.py",
"usr/lib/python2.7/encodings/cp850.py",
"usr/lib/python2.7/encodings/cp863.py",
"usr/lib/python2.7/encodings/iso2022_jp_3.py",
"usr/lib/python2.7/encodings/iso2022_jp.pyc",
"usr/lib/python2.7/encodings/cp864.pyc",
"usr/lib/python2.7/encodings/iso8859_8.pyc",
"usr/lib/python2.7/encodings/cp850.pyc",
"usr/lib/python2.7/encodings/iso8859_2.pyc",
"usr/lib/python2.7/encodings/mac_arabic.py",
"usr/lib/python2.7/encodings/gb18030.py",
"usr/lib/python2.7/encodings/koi8_u.py",
"usr/lib/python2.7/encodings/mac_farsi.py",
"usr/lib/python2.7/encodings/cp1254.py",
"usr/lib/python2.7/encodings/iso8859_3.pyc",
"usr/lib/python2.7/encodings/undefined.pyc",
"usr/lib/python2.7/encodings/iso8859_8.py",
"usr/lib/python2.7/encodings/utf_8.py",
"usr/lib/python2.7/encodings/idna.py",
"usr/lib/python2.7/encodings/hp_roman8.py",
"usr/lib/python2.7/encodings/cp1256.pyc",
"usr/lib/python2.7/encodings/hz.py",
"usr/lib/python2.7/encodings/utf_8_sig.pyc",
"usr/lib/python2.7/encodings/shift_jisx0213.py",
"usr/lib/python2.7/encodings/raw_unicode_escape.py",
"usr/lib/python2.7/encodings/cp949.pyc",
"usr/lib/python2.7/encodings/euc_jisx0213.py",
"usr/lib/python2.7/encodings/cp856.py",
"usr/lib/python2.7/encodings/big5.py",
"usr/lib/python2.7/encodings/zlib_codec.pyc",
"usr/lib/python2.7/encodings/__init__.py",
"usr/lib/python2.7/encodings/cp860.py",
"usr/lib/python2.7/encodings/palmos.py",
"usr/lib/python2.7/encodings/raw_unicode_escape.pyc",
"usr/lib/python2.7/encodings/undefined.py",
"usr/lib/python2.7/encodings/iso2022_kr.pyc",
"usr/lib/python2.7/encodings/iso8859_1.py",
"usr/lib/python2.7/encodings/euc_jisx0213.pyc",
"usr/lib/python2.7/encodings/mac_latin2.py",
"usr/lib/python2.7/encodings/punycode.pyc",
"usr/lib/python2.7/encodings/palmos.pyc",
"usr/lib/python2.7/encodings/charmap.py",
"usr/lib/python2.7/encodings/tis_620.py",
"usr/lib/python2.7/encodings/cp775.py",
"usr/lib/python2.7/encodings/cp1250.pyc",
"usr/lib/python2.7/encodings/mac_croatian.pyc",
"usr/lib/python2.7/encodings/cp932.py",
"usr/lib/python2.7/encodings/iso2022_jp_1.py",
"usr/lib/python2.7/encodings/iso8859_13.pyc",
"usr/lib/python2.7/encodings/mac_latin2.pyc",
"usr/lib/python2.7/encodings/utf_32_be.pyc",
"usr/lib/python2.7/encodings/zlib_codec.py",
"usr/lib/python2.7/encodings/cp775.pyc",
"usr/lib/python2.7/encodings/mac_farsi.pyc",
"usr/lib/python2.7/encodings/cp500.py",
"usr/lib/python2.7/encodings/euc_kr.pyc",
"usr/lib/python2.7/encodings/iso8859_7.py",
"usr/lib/python2.7/encodings/tis_620.pyc",
"usr/lib/python2.7/encodings/cp950.pyc",
"usr/lib/python2.7/encodings/unicode_internal.pyc",
"usr/lib/python2.7/encodings/cp874.pyc",
"usr/lib/python2.7/encodings/koi8_r.pyc",
"usr/lib/python2.7/encodings/iso2022_jp_2004.pyc",
"usr/lib/python2.7/encodings/cp866.py",
"usr/lib/python2.7/encodings/cp857.pyc",
"usr/lib/python2.7/encodings/gbk.pyc",
"usr/lib/python2.7/encodings/mac_centeuro.py",
"usr/lib/python2.7/encodings/cp874.py",
"usr/lib/python2.7/encodings/big5hkscs.pyc",
"usr/lib/python2.7/encodings/iso8859_15.pyc",
"usr/lib/python2.7/encodings/iso8859_9.py",
"usr/lib/python2.7/encodings/shift_jis_2004.py",
"usr/lib/python2.7/encodings/aliases.pyc",
"usr/lib/python2.7/encodings/cp1252.pyc",
"usr/lib/python2.7/encodings/unicode_internal.py",
"usr/lib/python2.7/encodings/iso8859_13.py",
    "usr/lib/x86_64-linux-gnu/gconv/gconv-modules",
    "etc/localtime",
"Lib/site.pyc",
"Lib/site.py"
    ],
  "Args":["python", "-v", "pex/ex.py"],
  "Env":{"PYTHONPATH": "/Lib:/usr/lib/python2.7", "PYTHONHOME":"/usr/lib/python2.7", "LANG":"C.UTF-8", "LANGUAGE":"en_US.UTF-8", "PYTHONIOENCODING":"UTF-8", "LC_ALL":"C.UTF-8"}
}

Tried with en_US.UTF-8 and with C.UTF-8, both give the same results...
Replacing python libs to python3.5 and running python3.5 gives:

import _thread # previously loaded ('_thread')
import '_thread' # <class '_frozen_importlib.BuiltinImporter'>
import _weakref # previously loaded ('_weakref')
import '_weakref' # <class '_frozen_importlib.BuiltinImporter'>
# installing zipimport hook
import 'zipimport' # <class '_frozen_importlib.BuiltinImporter'>
# installed zipimport hook
Fatal Python error: Py_Initialize: Unable to get the locale encoding
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'encodings'

node package needed

@mkhon reported having hello world working here (after merging a few nanos branches) - should go ahead and get an initial build for this

SSH terminated while setting up network

I built a digitial ocean droplet to setup Ops and give it a go. When i was setting up the network (sudo ops net setup), it ran for a little while and then disconnect my ssh connection and now I can't ssh back into my droplet. It seems setting up the network breaks ssh??

[root@nanovms-ops ops]$ sudo ./ops net setup
Timeout, server 165.227.174.121 not responding.

Ops fails on vagrant/virtualbox

Trying to setup Ops on vagrant/virtual box and get the follow error when trying to setup networking...

vagrant@ubuntu-xenial:~/go/src/github.com/nanovms/ops$ sudo ./ops net setup
panic: no DHCP packet received within 10s

goroutine 1 [running]:
main.netCommandHandler(0xc0000c6a00, 0xc00002adf0, 0x1, 0x1)
	/home/vagrant/go/src/github.com/nanovms/ops/ops.go:158 +0x136
github.com/spf13/cobra.(*Command).execute(0xc0000c6a00, 0xc00002add0, 0x1, 0x1, 0xc0000c6a00, 0xc00002add0)
	/home/vagrant/go/src/github.com/spf13/cobra/command.go:766 +0x2cc
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000c7180, 0x4, 0x0, 0xc0000c6f00)
	/home/vagrant/go/src/github.com/spf13/cobra/command.go:852 +0x2fd
github.com/spf13/cobra.(*Command).Execute(0xc0000c7180, 0xc0000aff40, 0x1)
	/home/vagrant/go/src/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
	/home/vagrant/go/src/github.com/nanovms/ops/ops.go:213 +0x7a9

getaddr() support

something to discuss on where we should be resolving dns

Name or service not known in /hw.php on line 3
Warning: file_get_contents(http://www.google.com): failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known in /hw.php on line 3

full pathname not loading correctly

eyberg@s1:~/tz$ nvm run -p 8080 tz
Downloading... 9376 completepanic: exec: "tz": executable file not found in $PATH

goroutine 1 [running]:
main.panicOnError(0x8813a0, 0xc420326020)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:55 +0x4a
main.buildImages(0x7ffcb68e374b, 0x2, 0x0)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:82 +0xdb
main.runCommandHandler(0xc420112780, 0xc4200c70b0, 0x1, 0x3)
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:64 +0xdd
github.com/spf13/cobra.(*Command).execute(0xc420112780, 0xc4200c7020, 0x3, 0x3, 0xc420112780, 0xc4200c7020)
        /home/eyberg/go/src/github.com/spf13/cobra/command.go:766 +0x2c1
github.com/spf13/cobra.(*Command).ExecuteC(0xc420112f00, 0x0, 0xc420112c80, 0xc420113050)
        /home/eyberg/go/src/github.com/spf13/cobra/command.go:852 +0x30a
github.com/spf13/cobra.(*Command).Execute(0xc420112f00, 0xc420091f50, 0x1)
        /home/eyberg/go/src/github.com/spf13/cobra/command.go:800 +0x2b
main.main()
        /home/eyberg/go/src/github.com/nanovms/nvm/nvm.go:164 +0x48d

if you specify the full pathname it works - prob. should just use that to eliminate confusion

perl package needed

just tried hello world perl and it seems to work on latest - for the perl package - we should have a 'sane' modules system in place

for instance -->

eyberg@dungeon:~/pl$ cat hw.pl
use LWP::Simple;
$content = get("http://nanovms.com");
die "Can't GET $url" if (! defined $content);

print $content;
Can't locate LWP/Simple.pm in @INC (you may need to install the LWP::Simple module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at hw.pl line 1.
BEGIN failed--compilation aborted at hw.pl line 1.
exit_groupexit status 1
eyberg@dungeon:~/pl$ ls /usr/lib/x86_64-linux-gnu/perl/5.22
arybase.pm     bits             Config.pod  Digest         errno.ph     GDBM_File.pm  IO.pm   MIME          ops.pm     SDBM_File.pm    Storable.pm  syslimits.ph  time.ph
asm            B.pm             CORE        DynaLoader.pm  Errno.pm     gnu           IPC     mro.pm        PerlIO     signal.ph       Sub          syslog.ph     Unicode
asm-generic    Compress         Cwd.pm      Encode         Fcntl.pm     _h2ph_pre.ph  lib.pm  NDBM_File.pm  POSIX.pm   Socket.pm       sys          threads       wait.ph
attributes.pm  Config_git.pl    Data        Encode.pm      features.ph  Hash          linux   ODBM_File.pm  POSIX.pod  stdarg.ph       Sys          threads.pm    xlocale.ph
auto           Config_heavy.pl  DB_File.pm  encoding.pm    File         I18N          List    Opcode.pm     re.pm      stdc-predef.ph  syscall.ph   Tie
B              Config.pm        Devel       endian.ph      Filter       IO            Math    O.pm          Scalar     stddef.ph       sysexits.ph  Time

introduce report/phone-home type of flag

essentially have a way to email dev@ or engineering@ with the binary (or some other way of posting stuff) so we can try and reproduce and figure out what's wrong w/a given app

vsphere/vcenter integration

not a priority but we've been asked about it..

main thing here would be the ability to swap the networking/storage drivers out (which some tools do to a certain extent already for other vms)

Compilation failure with go 1.6

Building on x86-64 ubuntu server 16.04.04 with fails:


nanovms@nanovms:~/ops$ make deps
go get github.com/spf13/cobra
go get github.com/vishvananda/netlink
# golang.org/x/sys/unix
../go/src/golang.org/x/sys/unix/ioctl.go:18: undefined: runtime.KeepAlive
../go/src/golang.org/x/sys/unix/ioctl.go:28: undefined: runtime.KeepAlive
Makefile:22: recipe for target 'deps' failed
make: *** [deps] Error 2


nanovms@nanovms:~/ops$ go version
go version go1.6.2 linux/amd64

argv/argc docs needed

not really sure what to say here but tijoy pointed out that some binaries expect the binary name as the first argument and some don't - I noticed this with both nginx && apache when I was trying to load them

for instance w/apache you'll see this ->

open /lib/x86_64-linux-gnu/libapr-1.so.0 - not found
open /etc/gai.conf - not found
httpd: Could not open configuration file /httpd.conf: Function not implemented
exit_groupexit status 1
eyberg@dungeon:~/ap$ ops run -p8083 -f -c config.json httpd^C
eyberg@dungeon:~/ap$ cat config.json
{
    "Files":["httpd.conf"],
    "Dirs": ["usr", "dev", "etc", "build", "logs"],
    "Args":["httpd -f", "/httpd.conf", "-DFOREGROUND"]
}

that error msg is actually a diff. error mgs it's finding it here but if we leave out the "httpd" part instead of finding the file it'll print this msg instead ->

open /lib/x86_64-linux-gnu/libapr-1.so.0 - not found
Usage: -f [-D name] [-d directory] [-f file]
          [-C "directive"] [-c "directive"]
          [-k start|restart|graceful|graceful-stop|stop]
          [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
  -D name            : define a name for use in <IfDefine name> directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed vhost settings
  -t -D DUMP_RUN_CFG : show parsed run settings
  -S                 : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
  -t -D DUMP_MODULES : show all loaded modules
  -M                 : a synonym for -t -D DUMP_MODULES
  -t -D DUMP_INCLUDES: show all included configuration files
  -t                 : run syntax check for config files
  -T                 : start without DocumentRoot(s) check
  -X                 : debug mode (only one worker, do not detach)
exit_groupexit status 1

we should prob. think about documenting this on the "run your own binary" as a faq or something until we drill more into it

separate 'release' builds and non-release builds

essentially we don't want to break anyone that might be using this in the future if master for whatever reason doesn't work - i don't know what we want to do here but some method of tagging a 'goodish' build would be good - for now we could manually cp in old builds into a release folder and use that and then generate each new build by the day and auto-delete after say 30 days or whatever

auto-add certs

for example go explicitly looks in these locations based on an env var

https://golang.org/src/crypto/x509/root_linux.go

I'd prob. opt to do this for everything as I can't see a reason for running something if it can't talk to the outside world and if it's going to talk to the outside world we should at least pretend root ca's aren't completely owned

nvm is hanging when trying to forcefeed mkfs a 200k manifest (python)

was trying out the python

cat ~/py2.7/config.json
{
    "Args":["test.py"],
    "Files":["test.py"],
    "Dirs":["usr"]
}
mkdir -p usr/
cp -R /usr/lib/python2.7/* usr/lib/python2.7/.

i traced it back to mkfs segfaulting on an invalid paren

eyberg@dungeon:~/tmp$ ./mkfs tempimage < dat1
parse error unknown property descriminator (
metadata (none)
Segmentation fault (core dumped)

so there are 2 issues here:

  1. mkfs doesn't like the manifest being un-balanced - we should verify if that's the case and if it needs to be fixed nvm side do it there - if it needs to be fixed mkfs side do it there

  2. we shouldn't sit and spin on a broken pipe - I believe a .wait() will catch this

push to google cloud

some further guidance:

-- project
-- bucket
-- name can inherit from project
-- use default machine types for now (although

  • i'd also think about a way of grabbing serial output to the shell - maybe that's an 'ops remote project logs' or something like that...

it'd prob. be useful to take a look @ https://cloud.google.com/community/tutorials/managing-gcp-projects-with-terraform && https://www.terraform.io/docs/providers/google/getting_started.html to understand what would be necessary to have the most hands-off credentials exp

need a way to provide user w/pre-cached builds

some initial guidance:

  • create a 'packages' subfolder in google cloud that can house a package

(i'd just default to this schema for now: https://hub.docker.com/_/node )

I'd just start by uploading one like barebones php and then we can start working out the kinks

now that php is 'working'

nanovms/nanos#219
nanovms/nanos#143

we'll want to provide some pre-made images for the end-user - for things like interpreters/databases/etc.. - basically things that we won't expect the user to provide in the future (and it also makes support way the hell easier)

open /etc/ld.so.cache - not found
open /lib/x86_64-linux-gnu/tls/libresolv.so.2 - not found
open /lib/x86_64-linux-gnu/libxml2.so.2 - not found
open /usr/lib/x86_64-linux-gnu/tls/libxml2.so.2 - not found
open /lib/x86_64-linux-gnu/libssl.so.1.1 - not found
open /lib/x86_64-linux-gnu/libcrypto.so.1.1 - not found
open /lib/x86_64-linux-gnu/libicui18n.so.57 - not found
open /lib/x86_64-linux-gnu/libicuuc.so.57 - not found
open /lib/x86_64-linux-gnu/libicudata.so.57 - not found
open /lib/x86_64-linux-gnu/libstdc++.so.6 - not found
nosyscall set_robust_list
nosyscall madvise
open /etc/localtime - not found
open /etc/php/7.0/cli/php-cli.ini - not found
open /etc/php/7.0/cli/php.ini - not found
open /etc/php/7.0/cli/conf.d - not found

for instance there's a few /etc files that should be present, a few libs, etc.

I don't have a strong direction here but by looking at the old mcp 'new image creation' UI you can see we provide common env vars, tls certs, etc.

I'm thinking if you set a variable in the config.json like 'lang: php7' or something like that instead of loading a binary up locally that'd be a cue for us to slurp down a known working image

one of the things that was brought up earlier was that right now we don't? have the capacity of splitting the image itself up? like - common known/needed files vs user contributed stuff?

eval aws firecracker

just from me glancing at the docs it looks very similar to gvisor and it relies on known good kernels which to me implies they are doing guest introspection - meaning it won't work but worth at least looking more into and seeing if it's something that down the road makes more sense

nvm should have a way either through metadata or cli to take arguments

I just tried cockroach and it seems to load w/out crashing but the first argument 'start' needs to somehow be passed in as an argument

 nvm run -p 8080 /home/eyberg/cr/cockroach-v2.0.6.linux-amd64/cockroach
(children:(cockroach-v2.0.6.linux-amd64:(children:(cockroach:(contents:(host:/home/eyberg/cr/cockroach-v2.0.6.linux-amd64/cockroach))))kernel:(contents:(host:staging/stage3))lib:(children:(x86_64-linux-gnu:(children:(libncurses.so.5:(contents:(host:/lib/x86_64-linux-gnu/libncurses.so.5))libc.so.6:(contents:(host:/lib/x86_64-linux-gnu/libc.so.6))libdl.so.2:(contents:(host:/lib/x86_64-linux-gnu/libdl.so.2))libtinfo.so.5:(contents:(host:/lib/x86_64-linux-gnu/libtinfo.so.5))librt.so.1:(contents:(host:/lib/x86_64-linux-gnu/librt.so.1))libpthread.so.0:(contents:(host:/lib/x86_64-linux-gnu/libpthread.so.0))libm.so.6:(contents:(host:/lib/x86_64-linux-gnu/libm.so.6))))))lib64:(children:(ld-linux-x86-64.so.2:(contents:(host:/lib64/ld-linux-x86-64.so.2)))))
program:/cockroach-v2.0.6.linux-amd64/cockroach
arguments:[cockroach]
environment:())
booting image ...
[-drive file=image,format=raw,index=0 -display none -serial stdio -nodefaults -no-reboot -m 2G -device isa-debug-exit -drive file=image,format=raw,if=virtio -device virtio-net,netdev=n0 -netdev user,id=n0,hostfwd=tcp::8080-:8080]
warning: TCG doesn't support requested feature: CPUID.01H:ECX.vmx [bit 5]
create fs
qemu-system-x86_64: terminating on signal 2

add mach-o mkfs

if we can add a macho-o mkfs (w/platform detection) so that this can run on osx && linux that'd be sweet

ops <--> pkg release tracking

I think it's prob. worth putting into the package metadata the git hash or some other identifiable thing of what version of nanos ops was built with when building the package

if i'm a node pkg user and I report a problem but it's 2wks out of sync and we don't know what version of ops they were using or worse what version of the blessed package we were using it's going to be hard to state when/where it got broke

  • so I'm thinking git hash on any pkg meta-data
  • #169 - md5 pkg tarball?
  • md5 boot/staging <-- whatever here

docs

whenever we open source this i think it'll make sense to have some good docs in place - i saw this suggested on the gvisor list and looks like a good start (also mcp)

https://book.kubebuilder.io/beyond_basics/boilerplate.html
https://www.gitbook.com/?t=2
https://golang.github.io/dep/docs/introduction.html
https://www.backplane.io/docs
https://serverless.com/framework/docs/

  • getting started page
  • installation
  • about
  • faq
  • networking
  • language support
  • packages
  • osx specific instructions <-- need a better name for this but in general need a page to talk about the fact that we use elf and diff. between mach-o yadda yadda yadda

disable ipv6

for now let's just disable ipv6 - it appears that dns will always try that first

Could not get IPs: lookup google.com on [::1]:53: dial udp [::1]:53: socket: address family not supported by protocol

i saw this happening with a rust webserver too - it would crash trying to do ipv6

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.