threefoldtecharchive / jumpscaleX_core

Apache License 2.0
1 stars 6 forks source link

Cannot start threebot from sdk #907

Open tobiaschielens opened 4 years ago

tobiaschielens commented 4 years ago

I tried to start the threebot using the v10.7 sdk. I got the following error: image

The logs: cat /home/tobias/sandbox/reports/jsxreport_10101416.log Traceback (most recent call last): File "threesdk/shell.py", line 404, in patched_execute File "", line 1, in File "threesdk/threebot.py", line 20, in start File "threesdk/container.py", line 132, in start File "threesdk/lib/SDKContainers.py", line 198, in get File "threesdk/InstallTools.py", line 5170, in container_get File "threesdk/InstallTools.py", line 5555, in container_running File "threesdk/InstallTools.py", line 5581, in name AttributeError: 'DockerContainer' object has no attribute 'config'

BolaNasr commented 4 years ago

i tried latest sdk , and it works fine First pull image Screenshot from 2020-07-13 11-47-22

Then start Threebot image

and my admin dashboard image

xmonader commented 4 years ago

@tobiaschielens please post the following

1- docker inspect 3bot 2- git log in the jumpscaleX_core 3- attach a copy of the InstallTools file

Also would be very helpful if you can try executing the following

In [2]: import threesdk                            

In [3]: threesdk.container.list()                                                      
 - 3bot       : localhost       : threefoldtech/3bot2       (sshport:9000)

In [6]: threesdk.InstallTools.DockerFactory.containers_running()                       
Out[6]: ['3bot']

In [8]: threesdk.InstallTools.DockerFactory.containers_names()                         
Out[8]: ['3bot']

In [9]: b=threesdk.InstallTools.DockerFactory.container_get("3bot")                    

In [10]: b.name                                                                        
Out[10]: '3bot'

In [11]: b.config.name                                                                 
Out[11]: '3bot'

In [12]: b.config                                                                      
Out[12]: {'name': '3bot', 'ports': None, 'path_vardir': '/sandbox/var/containers/3bot', 'path_config': '/sandbox/var/containers/3bot/docker_config.toml', 'portrange': 0, 'image': 'threefoldtech/3bot2', 'startupcmd': '/sbin/my_init', 'ipaddr': 'localhost', 'sshport': 9000, 'portrange_txt': '-p 9005-9009:8005-8009 -p 7000:80 -p 5000:8888 -p 4000:443 -p 9001:9001/udp -p 9000:22'}
tobiaschielens commented 4 years ago

It seems like I am able to get further in the process with the 10.7 release. Now running into the following error: image

xmonader commented 4 years ago

@tobiaschielens can you execute the command manually docker exec ... and send the results please.

tobiaschielens commented 4 years ago

Apparently the contents /sandbox/var/containers forces to pull the old 3bot bot container instead of the new 3bot2 container. By removing the contents of /sandbox/var/containers the issue is resolved