YunoHost 4.3 testing

:rocket:

Testing yunomdns, the service does not start:

Sep 20 10:43:14 systemd[1]: Started YunoHost mDNS service.
Sep 20 10:43:15 yunomdns[4421]: Traceback (most recent call last):
Sep 20 10:43:15 yunomdns[4421]:   File "/usr/bin/yunomdns", line 139, in <module>
Sep 20 10:43:15 yunomdns[4421]:     zc = Zeroconf(interfaces=ips)
Sep 20 10:43:15 yunomdns[4421]:   File "/usr/lib/python3/dist-packages/zeroconf/_core.py", line 403, in __init__
Sep 20 10:43:15 yunomdns[4421]:     listen_socket, respond_sockets = create_sockets(interfaces, unicast, ip_version, apple_p2p=apple_p2p)
Sep 20 10:43:15 yunomdns[4421]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 346, in create_sockets
Sep 20 10:43:15 yunomdns[4421]:     normalized_interfaces = normalize_interface_choice(interfaces, ip_version)
Sep 20 10:43:15 yunomdns[4421]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 158, in normalize_interface_choice
Sep 20 10:43:15 yunomdns[4421]:     result += ip6_addresses_to_indexes(choice)
Sep 20 10:43:15 yunomdns[4421]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 124, in ip6_addresses_to_indexes
Sep 20 10:43:15 yunomdns[4421]:     result.append(ip6_to_address_and_index(adapters, iface))
Sep 20 10:43:15 yunomdns[4421]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 91, in ip6_to_address_and_index
Sep 20 10:43:15 yunomdns[4421]:     return (cast(Tuple[str, int, int], adapter_ip.ip), cast(int, adapter.index))
Sep 20 10:43:15 yunomdns[4421]: AttributeError: 'Adapter' object has no attribute 'index'
Sep 20 10:43:15 systemd[1]: yunomdns.service: Main process exited, code=exited, status=1/FAILURE
Sep 20 10:43:15 systemd[1]: yunomdns.service: Failed with result 'exit-code'.

I will have a look into the code.


@Aleks, solved by upgrading to zeroconf-0.36.6. :innocent:

sudo pip3 install zeroconf --upgrade (hopefully it does not break anything with next release)

1 Like

Uuuuuuh okay but we shouldn’t do this because it’s not straightfoward wether or not we (the yunohost project) will be able to upgrade the package via the .deb repo … This creates ambiguous situations where both lib versions are installed on the system

The right solution is that we should upgrade the version being server via our .deb repo …

1 Like

Hello,

I try to switchto Testing with the admin user but i can’t maybe due to permissions.

Then, i try to sudo curl https://install.yunohost.org/switchtoTesting | bash but same errors.

I haven’t try with root for now because i think most current users update/upgrade with the combo sudo | admin

Summary

admin@***:~$ curl https://install.yunohost.org/switchtoTesting | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 462 100 462 0 0 2552 0 --:–:-- --:–:-- --:–:-- 2538


Patching sources.list to enable testing repository…


sed: couldn’t open temporary file /etc/apt/sedbjPFxk: Permission denied
sed: couldn’t open temporary file /etc/apt/sources.list.d/sedqNQaWj: Permission denied
sed: couldn’t open temporary file /etc/apt/sources.list.d/sedRBBhSn: Permission denied
sed: couldn’t open temporary file /etc/apt/sources.list.d/sedio1xcn: Permission denied


Running ā€˜apt-get update’


Reading package lists… Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)


Running ā€˜apt-get dist-upgrade’


E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?


admin@***:~$ sudo curl https://install.yunohost.org/switchtoTesting | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 462 100 462 0 0 3447 0 --:–:-- --:–:-- --:–:-- 3447


Patching sources.list to enable testing repository…


sed: couldn’t open temporary file /etc/apt/sedOFQyDR: Permission denied
sed: couldn’t open temporary file /etc/apt/sources.list.d/sedJRkRYQ: Permission denied
sed: couldn’t open temporary file /etc/apt/sources.list.d/sedM7V4tR: Permission denied
sed: couldn’t open temporary file /etc/apt/sources.list.d/sednhg1LQ: Permission denied


Running ā€˜apt-get update’


Reading package lists… Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)


Running ā€˜apt-get dist-upgrade’


E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?
admin@***:~$

It’s on my Raspberry Pi 3B on which i’ve deployed YunoHost on a Debian Buster arm64 where i’ve restored a YunoHost backup (from the previous same deployment with a conventional 32 bits armhf one).
Details : 4.2.8.3 stable YunoHost with one main domain and 2 sub-domains, an admin and a user, 4 apps (Dolibarr, Galene, Mumble and phpMyAdmin) and an exotic ssh port.

lsb_release -a

Distributor ID: Debian
Description: Debian GNU/Linux 10 (buster)
Release: 10
Codename: buster

Do not hesitate to give me more information to go further :wink:

ppr

sudo command | other_command enable only sudo for command and not other_command

You need to set sudo on the other_command :

curl https://install.yunohost.org/switchtoTesting | sudo bash

(but you need to trust the provider of the bash script.
A more ā€œsecureā€ way would be

# download the `switchtoTesting` script : 
curl https://install.yunohost.org/switchtoTesting -o switchtoTesting.sh`
# read the script to be sure
# make it executable
chmod +x switchtoTesting.sh
# execute with sudo
sudo ./switchtoTesting.sh
2 Likes

Hi! first, thank you for this wonderful upgrade! :star_struck: :star_struck: :star_struck:

I just tried this feature, with my domain name informatiquelibre.fr registered at Gandi, but it fails to push the ipv6 and mail-related records the for the main domain (the only one I set for email in/out)

2021-09-21 12:09:10,682: INFO - [#################...] > create AAAA  / @
2021-09-21 12:09:13,172: ERROR - Failed to create record AAAA/maindomain.tld : list indices must be integers or slices, not str
2021-09-21 12:09:17,614: INFO - [###################.] > create  MX   / @
2021-09-21 12:09:19,071: ERROR - Failed to create record MX/maindomain.tld : list indices must be integers or slices, not str
2021-09-21 12:09:19,076: INFO - [####################] > create  TXT  / @
2021-09-21 12:09:20,375: ERROR - Failed to create record TXT/maindomain.tld : list indices must be integers or slices, not str
2021-09-21 12:09:20,412: WARNING - DNS records partially updated: some warnings/errors were reported.

The existing manually created DNS records have been deleted from Gandi DNS.

EDIT: every other records were successfully pushed, I checked on Gandi’s website.
EDIT2: I tried many times, no more luck. I guess Yunohost tries to put ā€œ@ā€ as a subdomain but Gandi don’t allow that? I finally set those records manually.

You can read full logs here : https://paste.yunohost.org/raw/hipudusuqu

(by the way, it is just fantastic Yunohost can manage remotely DNS records!! It would really help me for some project of mine…)

4 Likes

(python3-zeroconf got updated in our repo to version 0.36.6)

2 Likes

Hello,

It works with :

curl https://install.yunohost.org/switchtoTesting | sudo bash
Thanks !

ppr

:smiling_face_with_three_hearts:So…much…GOODNESS!!! :heart_eyes:

Wow! I love the idea of Yunohost being able to autoconfigure domains for the user, even if my personal registrar isn’t supported yet. This is a HUGE step forward! Being able to let apps have their own configuration screens is also a MASSIVE improvement! Extra security hardening is also the icing on the cake. YUM!

Thankyou Yunodevs, one and all! :heartpulse:

2 Likes

I want to help testing and i want first to learn how to do it safely.

Scenario: backing up then testing and reverting.

How would i restore a borked test, reinstalling yunohost stable and then restoring?

First it should be said to only test on a non production system with data that you would be fine being 100% corrupted, as there is a chance of exactly that happening.

That said, the easiest way would be to test in a virtual machine (eg. KVM or VirtualBox). That lets you save a snapshot at any time, then reverting is as simple as clicking on restore snapshot.

Yunohost does have a backup system however, as I understand it (correct me if I’m wrong here) it really only backs up the app files and the Yunohost specific files. I believe that it doesn’t actually back up Debians system files, so you can use it to restore the files of Yunohost or your apps, but not the overall operating system (unlike a VM snapshot). So, for example, a system file that gets upgraded and breaks something, won’t be downgrqaded again by Yunohosts Backup/Restore system.

Just out of curiosity… which version of Debian is Yunohost 4.3 based on?

Buster

(otherwise changing Debian’s version would have been reflected in the major version number)

2 Likes

Debian 10
The next version of yunohost will be on debian 11. Apps package are being modified to support debian 11, see https://dash.yunohost.org/appci/compare/stable...bullseye .

2 Likes

I have python3-zeroconf 0.36.6-1 but Yunomdns still fails.

Sep 23 15:19:32 salamandar.fr yunomdns[18132]: Traceback (most recent call last):
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:   File "/usr/bin/yunomdns", line 139, in <module>
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:     zc = Zeroconf(interfaces=ips)
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:   File "/usr/lib/python3/dist-packages/zeroconf/_core.py", line 410, in __init__
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:     listen_socket, respond_sockets = create_sockets(interfaces, unicast, ip_version, apple_p2p=apple_p2p)
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 346, in create_sockets
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:     normalized_interfaces = normalize_interface_choice(interfaces, ip_version)
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 158, in normalize_interface_choice
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:     result += ip6_addresses_to_indexes(choice)
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 124, in ip6_addresses_to_indexes
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:     result.append(ip6_to_address_and_index(adapters, iface))
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:   File "/usr/lib/python3/dist-packages/zeroconf/_utils/net.py", line 91, in ip6_to_address_and_index
Sep 23 15:19:32 salamandar.fr yunomdns[18132]:     return (cast(Tuple[str, int, int], adapter_ip.ip), cast(int, adapter.index))
Sep 23 15:19:32 salamandar.fr yunomdns[18132]: AttributeError: 'Adapter' object has no attribute 'index'
Sep 23 15:19:32 salamandar.fr systemd[1]: yunomdns.service: Main process exited, code=exited, status=1/FAILURE

Can you share the output of dpkg --list | grep zeroconf

ii  python3-zeroconf 0.36.6-1+ynh10 all \
     Pure Python implementation of multicast DNS service discovery (Python3)

(reformated for readability)

What about:

python3 -c "import zeroconf; print(zeroconf.__version__)"

0.36.6 :smiley:

Also __file__= /usr/lib/python3/dist-packages/zeroconf/__init__.py

Then I guess the bug ain’t related to zeroconf version …

Would be interesting to debug what’s the content of ips here, in case there’s anything special related to it:

 File "/usr/bin/yunomdns", line 139, in <module>
     zc = Zeroconf(interfaces=ips)