Closed Dinaamagdy closed 5 years ago
and sandbox method to fail with the following error
|| mkdir -p '/sandbox/var/log'
make[2]: Leaving directory '/tmp/builders/openresty/openresty/build/nginx-1.13.6'
make[1]: Leaving directory '/tmp/builders/openresty/openresty/build/nginx-1.13.6'
mkdir -p /sandbox/openresty/site/lualib /sandbox/openresty/site/pod /sandbox/openresty/site/manifest
ln -sf /sandbox/bin/openresty /sandbox/openresty/bin/openresty
+ rm -rf /tmp/builders/openresty
+ rm -f /sandbox/bin/lua
+ ln -s /sandbox/openresty/luajit/bin/luajit /sandbox/bin/lua
Wed 26 13:42:34 uilderBaseClass.py - 318 - builderopenresty:builderopenresty : sandbox profile path in:/sandbox/env.sh
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/sandbox/lib/jumpscale/Jumpscale/builder/system/BuilderBaseClass.py", line 166, in wrapper_action
res = self.apply_method(func, kwargs)
File "/sandbox/lib/jumpscale/Jumpscale/builder/system/BuilderBaseClass.py", line 93, in apply_method
return func(**kwargs)
File "/sandbox/lib/jumpscale/Jumpscale/builder/web/BuilderTraefik.py", line 109, in sandbox
j.builders.web.openresty.sandbox(reset=reset)
File "/sandbox/lib/jumpscale/Jumpscale/builder/system/BuilderBaseClass.py", line 166, in wrapper_action
res = self.apply_method(func, kwargs)
File "/sandbox/lib/jumpscale/Jumpscale/builder/system/BuilderBaseClass.py", line 93, in apply_method
return func(**kwargs)
File "/sandbox/lib/jumpscale/Jumpscale/builder/web/BuilderOpenResty.py", line 127, in sandbox
self._copy(dir_src, dir_dest)
File "/sandbox/lib/jumpscale/Jumpscale/builder/system/BuilderBaseClass.py", line 416, in _copy
createdir=True,
File "/sandbox/lib/jumpscale/Jumpscale/builder/tools/BuilderTools.py", line 115, in copyTree
createdir=createdir,
File "/sandbox/lib/jumpscale/Jumpscale/sal/fs/SystemFS.py", line 265, in copyDirTree
if ":" not in src and j.sal.fs.isDir(src):
File "/sandbox/lib/jumpscale/Jumpscale/sal/fs/SystemFSDecorators.py", line 154, in wrapper
raise ValueError(msg)
ValueError: Argument path in j.sal.fs.isDir expects an existing path value! /sandbox/bin/resty does not exist.
Argument path in j.sal.fs.isDir expects an existing path value! /sandbox/bin/resty does not exist.
later no immediate requirement
install and start updated, start doesnt redo install unless install wasn't complete https://github.com/threefoldtech/jumpscaleX/commit/e6c9d19df39af9a5d0cf7264db7daff968736028
In Traefik builder, in sandbox() , openresty.sandbox()
is called. The error /sandbox/bin/resty does not exist
is because resty is added using lua builder, and so sandboxing resty should be done in lua builder instead of openresty builder.
Fix in openresty: https://github.com/threefoldtech/jumpscaleX/commit/bcd69a618d68dcbd20c75228251b6f9446f616c2 [development_jumpscale]
command run with no error: j.builders.web.traefik.sandbox()
First part verified, build, install and start are now working fine:
Will test the sandbox now
snadbox is verified and flist was uploaded and i create a container by the generated flist, then i checked the binary inside created container as below and was working
/sandbox/bin/traefik
root@testtearfik:~# ls /sandbox/bin/traefik -l
-rwxr-x--- 1 root root 69963136 Jul 29 14:16 /sandbox/bin/traefik
root@testtearfik:~# /sandbox/bin/traefik --help
traefik is a modern HTTP reverse proxy and load balancer made to deploy microservices with ease.
Complete documentation is available at https://traefik.io
Usage: traefik [flags] <command> [<arguments>]
Use "traefik <command> --help" for help on any command.
jsx version
3BOTDEVEL:zbudle2:jumpscaleX: git log -1
commit 61d8182b39eb4ce9a10ecd8c0c88213a50637193 (grafted, HEAD -> development_jumpscale, origin/development_jumpscale)
Author: Waleed Hammam <waleed.hammam@gmail.com>
Date: Mon Jul 29 15:37:23 2019 +0200
add default branch checkout for other repos if passed is failed
Steps
j.builder.web.traefik.build() j.builder.web.traefik.install() j.builder.web.traefik.start()
Issue
always start method , install things again and clone traefik again as shown