Jump to content


Photo

OpenPLi-py3


  • Please log in to reply
1139 replies to this topic

Re: OpenPLi-py3 #801 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 26 February 2023 - 15:24

 

Hope somebody can test and confirm if can reproduce the bug and apply fix for it.

We are aware of this issue and will have a fix in the next few days.

 

 
I can confirm that I also have a problem with fixed IP and fixed DNS servers.

But why do you think it will be solved in the next few days?
I see that there has been a discussion about this issue, but it is still open and there is no indication that anything will be resolved soon.



Re: OpenPLi-py3 #802 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 17:59

There is a WLAN connection problem if DHCP is disabled since the last two releases (24th and 26th of Feb) on Ultimo 4K. The problem is that after each restart of the box, the DNS is reset to 0.0.0.0. and you'll have to enter it each time manually again and again if you want internet working. If DHCP is enabled all is OK.

 So, if manual network settings are set, the connection is OK, but no internet unless you enter manually the DNS. Then all is OK until you restart the box. After the restart, it shows the box is connected, but due to DNS reset to 0.0.0.0. no internet until you enter it again. Hope somebody can test and confirm if can reproduce the bug and apply fix for it.

 

OpenResolv is added to the image to deal with this, but you don't get that installed when you update an older image.

 

So either flash the latest image, or install the openresolv package from the feed.


Edited by neo, 26 February 2023 - 18:00.


Re: OpenPLi-py3 #803 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 26 February 2023 - 18:18

Maybe I'm missing something, but simply installing the openresolv package from the feed doesn't solve the problem.
You need to implement resolvconf usage in the code.


Re: OpenPLi-py3 #804 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 18:53

openresolv is a resolvconf implementation. It will take the DNS information retrieved from dhcp and populate /etc/resolv.conf with it.

 

For DNS information entered manually, that issue was brought up by WanWizard and is hopefully on the way of being solved now.

 

( static DNS has to be confgured in /etc/network/interfaces, openresolv will use those too when populating resolv.conf )


Edited by neo, 26 February 2023 - 18:57.


Re: OpenPLi-py3 #805 Beeker

  • PLi® Contributor
  • 1,586 posts

+202
Excellent

Posted 26 February 2023 - 21:55

Tested with clean flash and it doesn't work.

There's no DNS in /etc/network/interface.

/etc/resolv.conf file is gone and /var/run/resolv.conf is empty when DHCP is disabled.

 

So where are DNS addresses? Answer: Nowhere.


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-py3 #806 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 22:08

Who, halt, stop.

 

There are two different situations:

  1. you are using DHCP and the DNS assigned to you by DHCP

    In this case, openresolv works with dhcpc to get the DNS records from DHCP and populate resolv.conf with it
     
  2. you are using fixed DNS entries

    In this case, they have to be stored in /etc/network/interfaces, by the Enigma2 GUI.
    This part is as I understand a work in progress ( by Dimitrij ? )

So if you need hardcoded DNS entries now, you need to manually add them to /etc/network/interfaces yourself if the GUI doesn't do that yet.

 

It should look like this:

auto eth0
iface eth0 inet static
	address 192.168.77.12
	netmask 255.255.255.0
	gateway 192.168.77.1
	dns-nameservers 8.8.8.8

openresolv will then create a resolv.conf in /var/run, with a symlink in /etc, containing

# Generated by resolvconf
nameserver 8.8.8.8

Edited by neo, 26 February 2023 - 22:08.


Re: OpenPLi-py3 #807 Beeker

  • PLi® Contributor
  • 1,586 posts

+202
Excellent

Posted 26 February 2023 - 22:12

Yeah. Point is, openresolve doesn't change a thing.


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-py3 #808 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 22:28

Doesn't change a thing when what?

 

It can't magically fix an incorrect configuration, no.



Re: OpenPLi-py3 #809 Beeker

  • PLi® Contributor
  • 1,586 posts

+202
Excellent

Posted 26 February 2023 - 22:40

Installing openresolv doesn't fix the problem to the users for now.

And it doesn't change the behavior of the network setup.

 

Like Taapat said, it requires changes to code in Enigma2, but that discussing is still open.


Edited by Beeker, 26 February 2023 - 22:41.

Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-py3 #810 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 26 February 2023 - 22:41

I hope someone will also think about backwards compatibility how to transfer dns from /etc/resolv.conf to /etc/network/interfaces when using fixed dns.
Otherwise, when installing a new image with previous settings, automatic backup will not restore plugins from the feed, because the Internet will not work after installing the image.


Re: OpenPLi-py3 #811 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 22:43

@Beeker,

 

Did I say anything different?

 

for fixed/hardcoded DNS, current workaround is manually adding it to /etc/network/interfaces, until someone addresses the NetworkSetup screens and code.

 

The downsides of running a develop image.


Edited by neo, 26 February 2023 - 22:43.


Re: OpenPLi-py3 #812 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 22:44

I hope someone will also think about backwards compatibility how to transfer dns from /etc/resolv.conf to /etc/network/interfaces when using fixed dns.

Otherwise, when installing a new image with previous settings, automatic backup will not restore plugins from the feed, because the Internet will not work after installing the image.

 

That might be a challenge, as I don't think you can't see which entries in resolv.conf where added by dhcpc, and which where added manually.

 

Maybe WanWizard has already looked at that?


Edited by neo, 26 February 2023 - 22:45.


Re: OpenPLi-py3 #813 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 26 February 2023 - 23:00

I think it is not a problem to recognize a manually added nameserver:
1. Openresolv will generate a file with the comment # Generated by resolvconf
 
2. Now /etc/resolv.conf is a link, there was a file before it.
But I don't think it's necessary in enigma.
 
It is necessary to implement in autobackup the possibility to transfer dns settings from the file /etc/resolv.conf, if it exists, to /etc/network/interfaces.
Because such a problem should appear only at the moment when you restore the settings from the previous image to the new one.
 
If you have a problem now, after update develop image from feed, then as you write, it is the downsides of running a develop image.

Edited by Taapat, 26 February 2023 - 23:00.


Re: OpenPLi-py3 #814 Beeker

  • PLi® Contributor
  • 1,586 posts

+202
Excellent

Posted 26 February 2023 - 23:01

@Beeker,

 

Did I say anything different?

 

for fixed/hardcoded DNS, current workaround is manually adding it to /etc/network/interfaces, until someone addresses the NetworkSetup screens and code.

 

The downsides of running a develop image.

That's what I mean.

Users must edit/copy files instead of installing openresolv to fix their problem.


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-py3 #815 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 26 February 2023 - 23:37

No, not "instead of", it is "and/and".

 

Without openresolv, the DNS entries from interfaces aren't written to resolv.conf and it will still not work.



Re: OpenPLi-py3 #816 Beeker

  • PLi® Contributor
  • 1,586 posts

+202
Excellent

Posted 27 February 2023 - 00:06

One problem found in network.py

dns-nameserver must be dns-nameservers.

iff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py
index 04e20e745..8afcc9bd6 100644
--- a/lib/python/Components/Network.py
+++ b/lib/python/Components/Network.py
@@ -117,7 +117,7 @@ class Network:
                                fp.write(iface["predown"])
                        if iface["dns-nameserver"]:
                                for nameserver in iface["dns-nameserver"]:
-                                       fp.write("      dns-nameserver %d.%d.%d.%d\n" % tuple(nameserver))
+                                       fp.write("      dns-nameservers %d.%d.%d.%d\n" % tuple(nameserver))
                        fp.write("\n")
                fp.close()
                self.configuredNetworkAdapters = self.configuredInterfaces

As test tested

diff --git a/lib/python/Components/Network.py b/lib/python/Components/Network.py
index 04e20e745..aecc08598 100644
--- a/lib/python/Components/Network.py
+++ b/lib/python/Components/Network.py
@@ -109,6 +109,7 @@ class Network:
                                        fp.write("      netmask %d.%d.%d.%d\n" % tuple(iface['netmask']))
                                        if 'gateway' in iface:
                                                fp.write("      gateway %d.%d.%d.%d\n" % tuple(iface['gateway']))
+                                       fp.write("      dns-nameservers 8.8.8.8\n")
                        if "configStrings" in iface:
                                fp.write(iface["configStrings"])
                        if iface["preup"] and "configStrings" not in iface:
@@ -117,7 +118,7 @@ class Network:
                                fp.write(iface["predown"])
                        if iface["dns-nameserver"]:
                                for nameserver in iface["dns-nameserver"]:
-                                       fp.write("      dns-nameserver %d.%d.%d.%d\n" % tuple(nameserver))
+                                       fp.write("      dns-nameservers %d.%d.%d.%d\n" % tuple(nameserver))
                        fp.write("\n")
                fp.close()
                self.configuredNetworkAdapters = self.configuredInterfaces

Now I see dns-nameserver in interfaces

# automatically generated by enigma2
# do NOT change manually!

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
	address 192.168.1.72
	netmask 255.255.255.0
	gateway 192.168.1.254
	dns-nameservers 8.8.8.8


But no  /etc/resolv.conf. No file, no symlink.


Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-py3 #817 Beeker

  • PLi® Contributor
  • 1,586 posts

+202
Excellent

Posted 27 February 2023 - 00:58

Actually no big deal because DNS is working.

Now we only have to store the DNS adresses to a file what will not be deleted after a reboot, or (cleaner) in settings file.

 

Also what to do with simplescript Busybox? What write the DNS adresses to /etc/resolv.conf when DHCP is enabled.

https://github.com/O...x/simple.script

 

Have feeling that it doesn't do anything when openresolv is installed (not sure).


Edited by Beeker, 27 February 2023 - 00:59.

Dreambox dm920, Uclan Ustym4Kpro, Gigablue UHD TRIO 4K and Dreambox dm8000. Wavefrontier T55 13.0|19.2|23.5|28.2 + Ziggo.


Re: OpenPLi-py3 #818 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 27 February 2023 - 01:02

But no  /etc/resolv.conf. No file, no symlink.

 

It is created by openresolv, when the network is started (or restarted).

 

It is not the task of Enigma to meddle in linux network services.



Re: OpenPLi-py3 #819 neo

  • PLi® Contributor
  • 715 posts

+48
Good

Posted 27 February 2023 - 01:04

Have feeling that it doesn't do anything when openresolv is installed (not sure).

 

It correctly deals with that, on lines 13 and 46 (the binary of openresolv is called resolvconf, as it replaces that).



Re: OpenPLi-py3 #820 Taapat

  • PLi® Core member
  • 2,345 posts

+121
Excellent

Posted 27 February 2023 - 08:21

One problem found in network.py
dns-nameserver must be dns-nameservers.


In fact, for several nameservers, the correct format is:

dns-nameservers 8.8.8.8 4.4.4.4

Not multiple lines with dns-nameservers, as suggested in the code.




19 user(s) are reading this topic

0 members, 19 guests, 0 anonymous users