Closed ingobaab closed 1 year ago
I had not yet tried 127.0.0.1 or 0.0.0.0 to see if either of these addresses would work, but I was able to use both to add the host.
I am curious about the 502 error you are now getting. Can you check to see what is in the server table. There should be a database file created in instance/db.sqlite3.
Can you find what is in your server table by opening the database and running an select statement to view the records?
matthew@matthew-Inspiron-7573:~/penninglabs/lxconsole$ sqlite3 instance/db.sqlite3
sqlite> select * from server;
1|127.0.0.1|8443|matthew-Inspiron-7573||0|0
2|0.0.0.0|8443|matthew-Inspiron-7573||0|0
sqlite> .exit
Also, take a look at your lxc config show
command to see what your core.https_address value is.
Hello Metthew, after "trying it simply again", I managed to login, see:
(I did not find what this former 502-error was, did not change anything, imho - weird..)
I now can visit all menu-items, expect the important one 'containers' (all other menus are working fine!):
Forgive me the lot of screenshots, but maybe it helps? I am really "a big fan" of your software, nice..
After commenting out some lines (around line 180) "with something disk", I managed to get the list of containers into my browser.. maybe and hopefully it helps you to find, what goes wrong here - I do not know any python btw :)
I see what I did wrong on the disk issue. I need to change "if disk:" to "if 'disk' in locals(): " I will push an update for that. But will first look to see if I did that same mistake elsewhere in the code too for other variables.
Hi Matthew, just to finish that: And many thanks for all your help - and the great software. I would like "to ask around" more things.. Should I open more tickets (i.e. my snapshot under the container-view shows a size of "-0.00 MB") or I would like to ask how exactly the "CPU" and "Memory" (values in %) "are calculated" / how to interpret this values.. Please advice, (..and close this one). Amazing, what you did and do! Keep it up. -Ingo
Thanks! I updated the code similar to what you have. I made sure network and memory also did not have a opportunity to throw an undefined variable as well.
You are right the CPU and memory for containers are different that what I did for LXD Dashboard. Previously I was reading the /proc/stat from within the container to determine CPU usage, but determined this was not correct for containers as within the container it gives the reading for the host, not the container itself. The LXD api provides the container's usage in nanoseconds so I am now retrieving the host's usage from /proc/stat and determining how much CPU time the container used as a percentage of the host. I will be providing a detailed post on this. I do have a comment about this on line 1031 of lxconsole/templates/container.html.
Similar for memory usage, when I was reading the free
output this again was giving me the host information while in a container. The percentage now is based on what is reported by the LXD API compared to the host's memory.
Yes, please open tickets are you find problems. Thank you, your testing has already helped a lot.
just for reference:
Hi Matthew, can you help with this issue - see screenshot? I would like to test your new python based dashboard for LCD/LXC. I added the lxconsole.crt before to my lxd:
What else can or should I provide, - to find 'my installation issue' here?