[Bug 1505670] Re: python exceptions bleeding into stdout
This bug was fixed in the package squid-deb-proxy - 0.8.14ubuntu0.18.04.1 --- squid-deb-proxy (0.8.14ubuntu0.18.04.1) bionic; urgency=medium * apt-avahi-discover: write errors to stderr instead of stdout so that stdout can be captured correctly. Thanks to . Note that this is being fixed differently (stderr and not syslog) in the stable releases. LP: #1505670. -- Miriam España Acebal Thu, 14 Oct 2021 16:48:09 +0200 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
This bug was fixed in the package squid-deb-proxy - 0.8.15ubuntu0.20.04.1 --- squid-deb-proxy (0.8.15ubuntu0.20.04.1) focal; urgency=medium * apt-avahi-discover: write errors to stderr instead of stdout so that stdout can be captured correctly. Thanks to . Note that this is being fixed differently (stderr and not syslog) in the stable releases. LP: #1505670. -- Miriam España Acebal Thu, 14 Oct 2021 13:41:22 +0200 ** Changed in: squid-deb-proxy (Ubuntu Focal) Status: Fix Committed => Fix Released ** Changed in: squid-deb-proxy (Ubuntu Bionic) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
This bug was fixed in the package squid-deb-proxy - 0.8.15ubuntu0.21.04.1 --- squid-deb-proxy (0.8.15ubuntu0.21.04.1) hirsute; urgency=medium * apt-avahi-discover: write errors to stderr instead of stdout so that stdout can be captured correctly. Thanks to . Note that this is being fixed differently (stderr and not syslog) in the stable releases. LP: #1505670. -- Miriam España Acebal Tue, 05 Oct 2021 13:23:08 +0200 ** Changed in: squid-deb-proxy (Ubuntu Hirsute) Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
Thanks a lot, Christian, for the verification and all the previous help on this! -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
Hirsute Check after cacher is down in the host +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local +;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local +;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local =;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; =;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; =;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;314 ubuntu@h-deb-proxy:~$ curl 192.168.122.1:3142 curl: (7) Failed to connect to 192.168.122.1 port 3142: Connection refused ubuntu@h-deb-proxy:~$ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.9/asyncore.py|read|83] [/usr/lib/python3.9/asyncore.py|handle_read_event|417] [/usr/lib/python3.9/asyncore.py|handle_connect_event|425]) error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.9/asyncore.py|read|83] [/usr/lib/python3.9/asyncore.py|handle_read_event|417] [/usr/lib/python3.9/asyncore.py|handle_connect_event|425]) error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.9/asyncore.py|read|83] [/usr/lib/python3.9/asyncore.py|handle_read_event|417] [/usr/lib/python3.9/asyncore.py|handle_connect_event|425]) Upgrade ubuntu@h-deb-proxy:~$ sudo apt install squid-deb-proxy-client Reading package lists... Done Building dependency tree... Done Reading state information... Done The following package was automatically installed and is no longer required: net-tools Use 'sudo apt autoremove' to remove it. The following packages will be upgraded: squid-deb-proxy-client 1 upgraded, 0 newly installed, 0 to remove and 14 not upgraded. Need to get 4876 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu hirsute-proposed/universe amd64 squid-deb-proxy-client all 0.8.15ubuntu0.21.04.1 [4876 B] Fetched 4876 B in 1s (4131 B/s) (Reading database ... 99104 files and directories currently installed.) Preparing to unpack .../squid-deb-proxy-client_0.8.15ubuntu0.21.04.1_all.deb ... Unpacking squid-deb-proxy-client (0.8.15ubuntu0.21.04.1) over (0.8.15build1) ... Setting up squid-deb-proxy-client (0.8.15ubuntu0.21.04.1) ... Scanning processes... Scanning candidates... Scanning linux images... Restarting services... Service restarts being deferred: /etc/needrestart/restart.d/dbus.service systemctl restart systemd-logind.service systemctl restart unattended-upgrades.service No containers need to be restarted. User sessions running outdated binaries: ubuntu @ session #1: sshd[759] ubuntu @ user manager service: systemd[762] Test with new version ubuntu@h-deb-proxy:~$ /usr/share/squid-deb-proxy-client/apt-avahi- discover 2>/dev/null No more errors bleed into the output, mark verified ** Tags removed: verification-needed verification-needed-bionic verification-needed-focal verification-needed-hirsute ** Tags added: verification-done verification-done-bionic verification-done-focal verification-done-hirsute -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
Focal Check after cacher is down in the host +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local +;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local +;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local =;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; =;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; =;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; ubuntu@f-deb-proxy:~$ curl 192.168.122.1:3142 curl: (7) Failed to connect to 192.168.122.1 port 3142: Connection refused ubuntu@f-deb-proxy:~$ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.8/asyncore.py|read|83] [/usr/lib/python3.8/asyncore.py|handle_read_event|417] [/usr/lib/python3.8/asyncore.py|handle_connect_event|425]) error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.8/asyncore.py|read|83] [/usr/lib/python3.8/asyncore.py|handle_read_event|417] [/usr/lib/python3.8/asyncore.py|handle_connect_event|425]) error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.8/asyncore.py|read|83] [/usr/lib/python3.8/asyncore.py|handle_read_event|417] [/usr/lib/python3.8/asyncore.py|handle_connect_event|425]) Upgrade ubuntu@f-deb-proxy:~$ sudo apt install squid-deb-proxy-client Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: squid-deb-proxy-client 1 upgraded, 0 newly installed, 0 to remove and 16 not upgraded. Need to get 4948 B of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu focal-proposed/universe amd64 squid-deb-proxy-client all 0.8.15ubuntu0.20.04.1 [4948 B] Fetched 4948 B in 1s (4189 B/s) (Reading database ... 94694 files and directories currently installed.) Preparing to unpack .../squid-deb-proxy-client_0.8.15ubuntu0.20.04.1_all.deb ... Unpacking squid-deb-proxy-client (0.8.15ubuntu0.20.04.1) over (0.8.15) ... Setting up squid-deb-proxy-client (0.8.15ubuntu0.20.04.1) ... Test with new version ubuntu@f-deb-proxy:~$ /usr/share/squid-deb-proxy-client/apt-avahi- discover 2>/dev/null No more errors bleed into the output, mark verified -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
Bionic Check after cacher is down in the host +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local =;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; ubuntu@b-deb-proxy:~$ curl 192.168.122.1:3142 curl: (7) Failed to connect to 192.168.122.1 port 3142: Connection refused ubuntu@b-deb-proxy:~$ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python2.7/asyncore.py|read|83] [/usr/lib/python2.7/asyncore.py|handle_read_event|446] [/usr/lib/python2.7/asyncore.py|handle_connect_event|454]) Upgrade ubuntu@b-deb-proxy:~$ sudo apt install squid-deb-proxy-client Reading package lists... Done Building dependency tree Reading state information... Done The following packages will be upgraded: squid-deb-proxy-client 1 upgraded, 0 newly installed, 0 to remove and 17 not upgraded. Need to get 4820 B of archives. After this operation, 2048 B of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu bionic-proposed/universe amd64 squid-deb-proxy-client all 0.8.14ubuntu0.18.04.1 [4820 B] Fetched 4820 B in 0s (55.6 kB/s) (Reading database ... 91938 files and directories currently installed.) Preparing to unpack .../squid-deb-proxy-client_0.8.14ubuntu0.18.04.1_all.deb ... Unpacking squid-deb-proxy-client (0.8.14ubuntu0.18.04.1) over (0.8.14) ... Setting up squid-deb-proxy-client (0.8.14ubuntu0.18.04.1) ... Test with new version ubuntu@b-deb-proxy:~$ /usr/share/squid-deb-proxy-client/apt-avahi- discover 2>/dev/null No more errors bleed into the output, mark verified -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Also affects: squid-deb-proxy (Ubuntu Trusty) Importance: Undecided Status: New ** Changed in: squid-deb-proxy (Ubuntu Trusty) Status: New => Won't Fix ** Changed in: squid-deb-proxy (Ubuntu Trusty) Importance: Undecided => Low ** Also affects: squid-deb-proxy (Ubuntu Xenial) Importance: Undecided Status: New ** Changed in: squid-deb-proxy (Ubuntu Xenial) Status: New => Won't Fix ** Changed in: squid-deb-proxy (Ubuntu Xenial) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Changed in: squid-deb-proxy (Ubuntu Bionic) Importance: Undecided => Low ** Changed in: squid-deb-proxy (Ubuntu Focal) Importance: Undecided => Low ** Changed in: squid-deb-proxy (Ubuntu Hirsute) Importance: Undecided => Low -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
Following discussion, I'm adjusting the Bionic package version string from 0.8.14ubuntu1 to 0.8.14ubuntu0.18.04.1 to avoid any potential conflict with a future ESM update to this package in Xenial. ** Changed in: squid-deb-proxy (Ubuntu Hirsute) Status: In Progress => Fix Committed ** Tags added: verification-needed verification-needed-hirsute -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Description changed: [Impact] As @cell explains, the problem here is that the errors are going to stdout, not to stderr. This means apt's Acquire::http::ProxyAutoDetect is not able to figure out what the proxy URL is. [Test Plan] The idea is to create a VM with several interfaces, to cache them plus to check configuration and do the discovery. Here you can see the test for Focal, but it has been the same behaviour for Hirsute, Bionic and Impish. Note: In comment #22 there's a very straightforward test (Impish) without the need for extra ifaces. Steps to reproduce (thanks to @cpaelzer and @sergiodj): - # 1 - # Creating VM and the IPv4 addresses + #0 + # On the test Host install apt-cacher-ng + # you need to do so before creating the guest VM to propagate + # and configure correctly when spawned + $ sudo apt install apt-cacher-ng + + + # 1 + # On the Host, create the IPv4 addresses and the VM. Stop the VM to + # attach the ifaces and start again the VM to log in. $ for i in 1 2 3 4; do lxc network create testnet${i}; done $ lxc network list $ lxc launch ubuntu-daily:focal test-bug1505670-focal --vm $ lxc stop test-bug1505670-focal $ for i in 1 2 3 4; do lxc network attach testnet${i} test-bug1505670-focal; done $ lxc start test-bug1505670-focal $ lxc shell test-bug1505670-focal - $ sudo apt update - - #2 + + # Now at the VM, install prereq packages + $ sudo apt update + $ sudo apt install avahi-utils squid-deb-proxy-client + + #3 # check if all are interfaces are configured $ ip a # (you might need to edit netplan or E/N/I to e.g. dhcp on all of them) to have the following content (check the names of your interfaces from the 'ip a' command above and change them if needed): $ vim /etc/netplan/50-cloud-init.yaml network: version: 2 renderer: networked ethernet: enp5s0: dhcp4: true enp6s0: dhcp4: true enp7s0: dhcp4: true enp8s0: dhcp4: true enp09s0: dhcp4: true #apply the changes to the ifaces: $ sudo netplan apply - # 3 - #Caching - $ sudo apt install -y apt-cacher-ng # 4 # avahi probes all ifaces $ avahi-browse -kprtf _apt_proxy._tcp +;enp8s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp7s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp6s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp6s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp5s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;enp5s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local +;lo;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local =;enp8s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;fd42:701b:b04:c7ab:216:3eff:feda:f1e7;3142; =;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;10.8.60.155;3142; =;enp7s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;fd42:3406:c5ba:899a:216:3eff:fecd:de74;3142; =;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;10.232.244.137;3142; =;enp6s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;fd42:bddd:a962:e084:216:3eff:fe11:a50c;3142; =;enp6s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;10.115.171.242;3142; =;enp5s0;IPv6;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;fd42:ce31:bcba:21af:216:3eff:fe79:c522;3142; =;enp5s0;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;10.47.127.209;3142; =;lo;IPv4;apt-cacher-ng\032proxy\032on\032test-bug1505670-focal;_apt_proxy._tcp;local;test-bug1505670-focal.local;127.0.0.1;3142; +;enp8s0;IPv6;apt-cacher-ng\032proxy\032on\032Camelot-TITAN;_apt_proxy._tcp;local +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Camelot-TITAN;_apt_proxy._tcp;local +;enp6s0;IPv6;apt-cacher-ng\032proxy\032on\032Camelot-TITAN;_apt_proxy._tcp;local +;enp7s0;IPv6;apt-cacher-ng\032proxy\032on\032Camelot-TITAN;_apt_proxy._tcp;local
[Bug 1505670] Re: python exceptions bleeding into stdout
** Description changed: [Impact] - As @cell explains, the problem here is that the errors are going to stdout, - not to stderr. This means apt's Acquire::http::ProxyAutoDetect is not able - to figure out what the proxy URL is. + As @cell explains, the problem here is that the errors are going to + stdout, not to stderr. This means apt's Acquire::http::ProxyAutoDetect + is not able to figure out what the proxy URL is. [Test Plan] - Steps to reproduce (by @cpaelzer ... thanks a lot!) - - #0 - # On the test Host install apt-cacher-ng - # you need to do so before creating the guest to propagate - # and configure correctly when spawned - $ sudo apt install apt-cacher-ng - - #1 - # create a VM guest or container with at least three IPv4 adresses - # In the example below I used 4 virtio net in KVM all with DHCP configured - + The idea is to create a VM with several interfaces, to cache them plus + to check configuration and do the discovery. + + Note: In comment #22 there's a very straightforward test without need + of extra ifaces. + + Steps to reproduce (thanks to @cpaelzer and @sergiodj): + + # 1 + # Creating VM and the IPv4 addresses + + $ for i in 1 2 3 4; do lxc network create testnet${i}; done + $ lxc network list + $ lxc launch ubuntu-daily:focal test-bug1505670-focal --vm + $ lxc stop test-bug1505670-focal + $ for i in 1 2 3 4; do lxc network attach testnet${i} test-bug1505670-focal; done + $ lxc start test-bug1505670-focal + $ lxc shell test-bug1505670-focal + $ sudo apt update + #2 - # install prereq packages - $ sudo apt install avahi-utils squid-deb-proxy-client - - #3 - # check if all are interfaces are configured and avahi probes them all - # (you might need to edit netplan or E/N/I to e.g. dhcp on all of them) - $ avahi-browse -kprtf _apt_proxy._tcp - +;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local - +;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local - +;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local - +;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local - +;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - +;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local - =;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; - =;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; - =;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; - =;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; - =;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000; - =;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe73:b27d;8000; - =;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000; - =;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe4e:2923;8000; - =;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.125;8000; - =;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.202;8000; - =;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.186;8000; - =;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.42;8000; - =;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;127.0.0.1;8000; - - #5 + # check if all are interfaces are configured + $ ip a + + # (you might need to edit netplan or E/N/I to e.g. dhcp on all of them) to have the following content (check the names of your interfaces from the 'ip a' command above and change them if needed): + + $ vim /etc/netplan/50-cloud-init.yaml + + network: + version: 2 + renderer:
[Bug 1505670] Re: python exceptions bleeding into stdout
** Merge proposal linked: https://code.launchpad.net/~mirespace/ubuntu/+source/squid-deb-proxy/+git/squid-deb-proxy/+merge/410288 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Merge proposal linked: https://code.launchpad.net/~mirespace/ubuntu/+source/squid-deb-proxy/+git/squid-deb-proxy/+merge/410286 ** Merge proposal linked: https://code.launchpad.net/~mirespace/ubuntu/+source/squid-deb-proxy/+git/squid-deb-proxy/+merge/410287 -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Description changed: + [Impact] + + As @cell explains, the problem here is that the errors are going to stdout, + not to stderr. This means apt's Acquire::http::ProxyAutoDetect is not able + to figure out what the proxy URL is. + + [Test Plan] + + Steps to reproduce (by @cpaelzer ... thanks a lot!) + + #0 + # On the test Host install apt-cacher-ng + # you need to do so before creating the guest to propagate + # and configure correctly when spawned + $ sudo apt install apt-cacher-ng + + #1 + # create a VM guest or container with at least three IPv4 adresses + # In the example below I used 4 virtio net in KVM all with DHCP configured + + #2 + # install prereq packages + $ sudo apt install avahi-utils squid-deb-proxy-client + + #3 + # check if all are interfaces are configured and avahi probes them all + # (you might need to edit netplan or E/N/I to e.g. dhcp on all of them) + $ avahi-browse -kprtf _apt_proxy._tcp + +;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local + +;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local + +;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local + +;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local + +;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + +;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local + =;enp8s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; + =;enp9s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; + =;enp7s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; + =;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; + =;enp9s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000; + =;enp8s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe73:b27d;8000; + =;enp7s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe3a:53e7;8000; + =;enp1s0;IPv6;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;fe80::5054:ff:fe4e:2923;8000; + =;enp9s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.125;8000; + =;enp8s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.202;8000; + =;enp7s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.186;8000; + =;enp1s0;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;192.168.122.42;8000; + =;lo;IPv4;Squid\032deb\032proxy\032on\032i-deb-proxy;_apt_proxy._tcp;local;i-deb-proxy.local;127.0.0.1;8000; + + #5 + # After being announced stop the cacher on the host + $ sudo systemctl stop apt-cacher-ng.service + + #6 + Check it is now dead from the guests POV + $ curl 192.168.122.1:3142 + curl: (7) Failed to connect to 192.168.122.1 port 3142: Connection refused + + #7 + # Ensure that it is still announced in avahi in the guest + $ avahi-browse -kprtf _apt_proxy._tcp | grep '^=' | cut -d";" -f 4,8-9 | grep -v '::' + ... + apt-cacher-ng\032proxy\032on\032Keschdeichel;192.168.122.1;3142 + + ### Bad response: + + #8 + # Now run apt-avahi-discover which shows the python errors + # bleeding into the output even with stderr redirected + $ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null + error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.9/asyncore.py|read|83] [/usr/lib/python3.9/asyncore.py|handle_read_event|417] [/usr/lib/python3.9/asyncore.py|handle_connect_event|425]) + error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.9/asyncore.py|read|83] [/usr/lib/python3.9/asyncore.py|handle_read_event|417]
[Bug 1505670] Re: python exceptions bleeding into stdout
** Changed in: squid-deb-proxy (Ubuntu Bionic) Status: New => In Progress ** Changed in: squid-deb-proxy (Ubuntu Focal) Status: New => In Progress ** Changed in: squid-deb-proxy (Ubuntu Hirsute) Status: New => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
This bug was fixed in the package squid-deb-proxy - 0.8.15+nmu1ubuntu1 --- squid-deb-proxy (0.8.15+nmu1ubuntu1) impish; urgency=medium [ Michael Vogt ] * apt-avahi-discover: use syslog for logging in AptAvahiClient, thanks to Jason Pepas (jasonpe...@gmail.com). (LP: #1505670). -- Miriam España Acebal Tue, 05 Oct 2021 11:23:59 +0200 ** Changed in: squid-deb-proxy (Ubuntu Impish) Status: In Progress => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
After the test (all worked) and sponsored it to impish. Let us hope it slips in before the freeze happens. SRUs from there will again be prepared by Miriam. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
Testing in Impish without extra network interfaces: # works $ sudo apt install avahi-utils squid-deb-proxy-client $ avahi-browse -kprtf _apt_proxy._tcp +;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local =;enp1s0;IPv4;apt-cacher-ng\032proxy\032on\032Keschdeichel;_apt_proxy._tcp;local;Keschdeichel.local;192.168.122.1;3142; $ /usr/share/squid-deb-proxy-client/apt-avahi-discover http://192.168.122.1:3142/ # break it in the host by disabling cacher $ systemctl stop apt-cacher-ng.service # ensure it is gone $ curl 192.168.122.1:3142 # check the output now # redirect stderr to show it is not gone $ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null error: uncaptured python exception, closing channel ('192.168.122.1', 3142): 9223372036854775807 (:[Errno 111] Connection refused [/usr/lib/python3.9/asyncore.py|read|83] [/usr/lib/python3.9/asyncore.py|handle_read_event|417] [/usr/lib/python3.9/asyncore.py|handle_connect_event|425]) Upgrade: ubuntu@i-deb-proxy2:~$ sudo apt upgrade Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages were automatically installed and are no longer required: accountsservice language-selector-common libaccountsservice0 net-tools Use 'sudo apt autoremove' to remove them. The following packages have been kept back: libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libp11-kit0 libpython3.9 libpython3.9-minimal libpython3.9-stdlib python3-cffi-backend python3-gi python3.9 python3.9-minimal The following packages will be upgraded: squid-deb-proxy-client 1 upgraded, 0 newly installed, 0 to remove and 11 not upgraded. Need to get 9124 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://ppa.launchpad.net/mirespace/impish-squid-deb-proxy-lp1505670-apt-avahi-discover/ubuntu impish/main amd64 squid-deb-proxy-client all 0.8.15+nmu1ubuntu1.1~ppa-mirespace [9124 B] Fetched 9124 B in 1s (7007 B/s) (Reading database ... 95211 files and directories currently installed.) Preparing to unpack .../squid-deb-proxy-client_0.8.15+nmu1ubuntu1.1~ppa-mirespace_all.deb ... Unpacking squid-deb-proxy-client (0.8.15+nmu1ubuntu1.1~ppa-mirespace) over (0.8.15+nmu1) ... Setting up squid-deb-proxy-client (0.8.15+nmu1ubuntu1.1~ppa-mirespace) ... Scanning processes... Scanning candidates... Scanning linux images... Restarting services... Service restarts being deferred: /etc/needrestart/restart.d/dbus.service systemctl restart getty@tty1.service systemctl restart networkd-dispatcher.service systemctl restart systemd-logind.service systemctl restart unattended-upgrades.service No containers need to be restarted. User sessions running outdated binaries: ubuntu @ session #1: sshd[1208,1305] ubuntu @ user manager service: systemd[1211] # now no output bleeding through $ /usr/share/squid-deb-proxy-client/apt-avahi-discover 2>/dev/null # actually since there is no proxy left there is juts nothing now in this setup /usr/share/squid-deb-proxy-client/apt-avahi-discover # But as soon as the cacher is back up it works: $ /usr/share/squid-deb-proxy-client/apt-avahi-discover http://192.168.122.1:3142/ -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Changed in: squid-deb-proxy (Ubuntu Impish) Status: Confirmed => In Progress -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1505670] Re: python exceptions bleeding into stdout
** Summary changed: - "uncaptured python exception" + python exceptions bleeding into stdout -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1505670 Title: python exceptions bleeding into stdout To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/squid-deb-proxy/+bug/1505670/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs