-
Notifications
You must be signed in to change notification settings - Fork 56
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
[BUG] Graphite does not open the default topology file #1186
Comments
Unfortunately, we're in the 'it works for me' territory here :( I pulled down the latest graphite image just to be on the safe side and it works. Here's what Docker has to say about the image:
On the odd chance that it might be a browser problem: what browser are you using? I'm on recent Chrome. Also, what netlab version are you using? The latest versions display the URL to use, so you can just click on it. Make sure the URL ends in graphite, for example As for the netlab connect FUBAR, it's a bug. Opening an issue. Thanks a million for reporting it! |
Good. Also, the screen is definitely coming from Graphite, but it looks like its configuration file is broken. Could you please create a tar archive of the whole directory after the lab is started (tar cvf filename .) and post it? I'd like to see what Graphite configuration file netlab creates. Thank you! |
Hello again! Sure! Here it is. Best Regards, Pedro |
Thank you. Everything looks normal, the Graphite JSON configuration file is identical to the one I have. I'm stumped... Let's try to throw some spaghetti at the wall ;) because I have no better idea. Do docker ps to see what containers are running, find the container with graphite in its name (should be basic-OSPF_graphite), and do docker inspect containername to see whether the config file is mapped correctly. Also, if you do docker exec basic-OSPF_graphite cat /htdocs/default/default.json you should see the configuration file from within the container. That one should match graphite/graphite-default.json. |
Hello Ivan, Thank you for your patience. In fact everything looks ok. The file is correctly mapped on the container as expected. If it is working with your setup...I don't really understand. Just to let you know that I have the same issue on other topologies as well. Best Regards, Pedro |
OK, managed to reproduce the bug: if I run Chrome in incognito mode, I get the same screen. Definitely a Graphite issue, now I have to figure out if we can work around it. |
Totally weird: Graphite versions 0.4.x consistently broke, but not until I disabled the browser cache (which is what happened in the incognito mode). As a workaround, I downgraded the netreplica/graphite image to version 0.3.0 until I figure out what's going on. Implemented in e538af9 |
@pmsobral to test this fix, run netlab from a local Git repository. Installation details @ https://netlab.tools/install/clone/ You might have to clear the browser cache as well. |
Thank you! |
Describe the bug
Graphite not working as expected
To Reproduce
Deploy the basic OSPF topology presented below :
Expected behavior
Everything works as expected except graphite.
Connecting through the web browser presents an empty graph.
Lab topology
provider: clab
defaults.device: eos
module: [ ospf ]
nodes: [ r1, r2 ]
links: [ r1, r2, r1-r2 ]
tools:
graphite:
Output
redes@RedesVM:~/netlab/basic-OSPF$ netlab create
[CREATED] provider configuration file: clab.yml
[CREATED] transformed topology dump in YAML format in netlab.snapshot.yml
[CREATED] graphite configuration directory
[CREATED] graphite/graphite-default.json rendering "graphite" format
[GROUPS] group_vars for all
[GROUPS] group_vars for modules
[GROUPS] group_vars for eos
[HOSTS] host_vars for r1
[HOSTS] host_vars for r2
[CREATED] minimized Ansible inventory hosts.yml
[CREATED] Ansible configuration file: ansible.cfg
Version
netlab version 1.8.2
Additional context
redes@RedesVM:~/netlab/basic-OSPF$ netlab connect graphite
Traceback (most recent call last):
File "/home/redes/.local/bin/netlab", line 12, in
netsim.cli.lab_commands(file)
File "/home/redes/.local/lib/python3.10/site-packages/netsim/cli/init.py", line 321, in lab_commands
mod.run(sys.argv[arg_start:]) # type: ignore
File "/home/redes/.local/lib/python3.10/site-packages/netsim/cli/connect.py", line 232, in run
connect_to_tool(host,rest,topology,log_level)
File "/home/redes/.local/lib/python3.10/site-packages/netsim/cli/connect.py", line 190, in connect_to_tool
msg = external_commands.get_tool_message(tool,topology)
File "/home/redes/.local/lib/python3.10/site-packages/netsim/cli/external_commands.py", line 261, in get_tool_message
return strings.eval_format(msg,topology)
File "/home/redes/.local/lib/python3.10/site-packages/netsim/utils/strings.py", line 110, in eval_format
return str(eval(ex,dict(data))) # An awful hack to use f-string specified in a string variable
File "", line 1, in
NameError: name 'sys' is not defined
The text was updated successfully, but these errors were encountered: