-
Notifications
You must be signed in to change notification settings - Fork 153
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
No networks shown in LXDUI, even though it can create one with no problems #330
Comments
try this
|
Thank you for responding @mopo3ilo , but unfortunately, your patch did not help...I still do not see anything shown in my network page - only when I click on JSON button there I get my network config. Thank you. |
Restart service, ctrl+shift+r page? |
Well, like I said, I restarted the whole VM with LXDUI and it did not help. Not sure what 'ctrl+shift+r' would be in this case... The thing is that I was able to debug the page and code up to the point and I see that I can get a list of networks internally but the for loop does not seem to parse it properly, and so it fails to create the table (basically the the section where your patch is applied). |
It seems I spoke too soon...after revisiting your patch and my changed files, I realized that I had a bad character in one place, and html file would not render completely, essentially breaking the display of networks. So, thank you very much Oleg, appreciate the help. Cheers, Andrea |
When opening Networks page in LXDUI, I always get an empty table, even though LXDUI can create new bridged network just fine. Even after that, the newly created network is not present and table stays empty.
I have been digging through the code and found out that LXCNetwork.py does actually get a list of networks from LXD API call, and populates the JSON that is then passed on to blueprint.py which should dynamically fill the network.html page with proper content - but that content is not injected into the html page and Network page stays with just an empty table.
Here's a part of the generated JSON:
res=[{'config': {'ipv4.address': '192.168.192.1/24', 'ipv4.dhcp.ranges': '192.168.192.2-192.168.192.250', 'ipv4.nat': 'true', 'ipv6.address': 'fd42:1a24:382f:2ece::1/64', 'ipv6.nat': 'true'}, 'description': '', 'name': 'lxdbr0', 'type': 'bridge', 'used_by': ['/1.0/profiles/NATed'], 'managed': True, 'status': 'Created', 'locations': ['none']}, {'config': {'ipv4.address': '10.20.30.1/24', 'ipv4.dhcp.ranges': '10.20.30.2-10.20.30.254', 'ipv4.nat': 'true', 'ipv6.address': 'fd42:411d:6e00:d25f::1/64', 'ipv6.nat': 'true'}, 'description': '', 'name': 't0', 'type': 'bridge', 'used_by': None, 'managed': True, 'status': 'Created', 'locations': ['none']},...
t0 in here is the test network that LXDUI generated fine, and lxdbr0 is the one I created directly with lxc command.
HTML template is in /usr/local/lib/python3.6/dist-packages/app/ui/templates/network.html (I installed LXDUI with pip3 on Ubuntu 18.04) and this is the table definition that does not get populated:
So, for loop obviously does nothing and elements get no content.
Funny thing is that even if I change the network.html directly and put some chars into elements, they do not get shown.
Also funny thing is that JSON button on Networks page gives quite the correct output for all the networks that exist on the system.
Does anyone have a clue how this can be fixed? Is there some special prerequisite, permission, group ownership or anything that would make it work?
Finally, is this project still alive at all and being maintained, at least a bit? I like it because it's quite lightweight and quick to install and does most of the things for daily click-click operations, but not having any output for networks is just too big of a bug for such a simple project.
Thank you.
The text was updated successfully, but these errors were encountered: