Skip to content
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

Open Beta v7.0 | Please help testing and hardening the upcoming release #4121

Closed
MichaIng opened this issue Feb 18, 2021 · 20 comments · Fixed by #4110, #4132, #4146, #4152 or #4126
Closed

Open Beta v7.0 | Please help testing and hardening the upcoming release #4121

MichaIng opened this issue Feb 18, 2021 · 20 comments · Fixed by #4110, #4132, #4146, #4152 or #4126
Labels
Beta 🧪 Issues specific to the Beta branch testing Information ℹ️
Milestone

Comments

@MichaIng
Copy link
Owner

MichaIng commented Feb 18, 2021

RC version v7.0.2
v7.0.-1 PR #4110
v7.0.0 PR #4132
v7.0.1 PR #4146
v7.0.2 PR #4152
Changelog https://github.com/MichaIng/DietPi/blob/beta/CHANGELOG.txt
Code changes master...beta
Release planned Til end of February

How to apply: https://github.com/MichaIng/DietPi/blob/master/BRANCH_SYSTEM.md

Related/solved issues: https://github.com/MichaIng/DietPi/issues?q=is%3Aissue+milestone%3Av7.0


Beta v7.0.-1

(2021-02-18)

Changes

  • DietPi-Update | A new update check system has been implemented, which checks for a minimum required Debian and DietPi version and migrates systems with either too old Debian version or too old DietPi version to a different Git branch automatically. This especially smoothens the migration of our code base to newer Debian versions and the alternative branch can be used to inform and support Debian distribution upgrades and to upgrade the DietPi code to an intermediate version from where the system can be migrated back to the regular stable/master branch. Since this change required a new repository version file, we took the chance and incremented the DietPi core version to v7.0. This however has no further meaning, all previously supported DietPi and Debian versions remain supported and the change enables us to not require fresh image installs for major upgrades, like the upgrade from v159 to v6.0 did a few years ago.
  • Network | A change has been implemented on the order in which network-related systemd service targets are reached. "network.target" and "network-online.target" are now reach after all network interfaces have been configured, rather then already after only the loopback interface "lo" has been configured. This affects only systemd services which are not started by DietPi-Services, e.g. SSH/DNS/VPN/VNC servers, with the effect that they are assured to be able to bind to interfaces/IPs, where currently they would fail. The downside is, if one has an Ethernet adapter configured via dietpi-config or /etc/network/interfaces (as allow-hotplug device), but the cable not connected, affected services may be delayed until the interface bring-up timed out.
  • DietPi-Backup | Support for XFS and ZFS target file system types has been added, which fully support the required symlink and POSIX permissions capabilities.
  • DietPi-Backup | A new feature has been added which allows to automatically restore a dietpi-backup on first boot. For this set the new dietpi.txt option AUTO_SETUP_BACKUP_RESTORE=1, to get a list of found backups to select from (this does not work in combination with AUTO_SETUP_AUTOMATED=1). All attached drives are mounted temporarily and seached automatically. Set AUTO_SETUP_BACKUP_RESTORE=2 to have the first found backup restored non-interactively (this works in combination with AUTO_SETUP_AUTOMATED=1). The restore runs after the initial update, hence works with older images as well and can be done via SSH connection. Credits go to @ravenclaw900 for implementing this feature: DietPi-Backup | Add Option to Automatically Restore on First Boot #4112
  • DietPi-Config | RPi: An option has been added to toggle the SPI interface. Many thanks to @incanus for resurrecting this old feature request: DietPi-Config | Add i2c/spi and other hardware options for RPi's #98 (comment)
  • DietPi-Software | The mandatory reboot after installs has been removed. Installed services, which are not controlled by DietPi-Services, but would start automatically on reboot, are now started at the end of installs instead. A manual reboot is still a good idea, but strictly required only in rare cases. Many thanks to @Games-Crack for doing this suggesting: DietPi-Software | Remove mandatory reboot after installs #4032
  • DietPi-Software | Installs do not imply all APT package upgrades anymore. While we recommend to keep all APT packages upgraded regularly, the new daily APT check and info within the DietPi-Banner, helps to keep you informed to do the best decision youself whether and when to apply which package upgrade. On first run installs the full upgrade is however kept, to assure each image starts in fully upgraded state, and packages which are required for the actual software choices you're installing, are upgraded as well, when installed already.
  • DietPi-Software | Uninstalls do not stop other services anymore. E.g. your webserver or media streaming server will stay active while you uninstall that other software that you don't require anymore. Since uninstalls do not require much RAM or CPU resources, this is perfectly fine. Many thanks to @mrgreaper giving the hint: Medusa broken after update #4116
  • DietPi-Software | Unbound: On install in combination with Pi-hole, no additional configuration file will be created anymore but the adjusted interface binding and port will be applied to "/etc/unbound/unbound.conf.d/dietpi.conf". Declaring "interface" in two configuration files do not override each other but lead to two concurrent bindings, which is not intended. The two files, if present, will be merged as well on DietPi update. It is hence intended that admins change "dietpi.conf" directly, if required, and this file won't be overwritten on reinstalls to preserve local changes. Additionally, on new installs, the configuration file will be better sorted and contain comments to explain their purpose.
  • DietPi-Software | Unbound: On new installs, by default access is now granted to all private IPv4 and IPv6 address ranges instead of to the 192.168.0.0/16 subnet only, which includes VPNs, containers and cases of multiple local networks the server is attached to.
  • DietPi-Software | Unbound: A monthly cron job is now created to keep the root hints file updated. Many thanks to @APraxx for doing this suggestion: Unbound: Root Hints automatic update? #4077
  • DietPi-Software | Node-RED: New installs and reinstalls with setup Node-RED as local module for the "nodered" service user, rather than as global system module/command. This allows upgrading and removing all related Node modules through the web interface, instead of just the ones which were installed via web interface. Additionally a console alias for the "node-red-admin" CLI command has been added so that running this command with any user will call the local Node-RED instance as "nodered" service user.
  • DietPi-Software | Python 3 pip: pip and pip-based installs on ARMv6 and ARMv7 boards will have the piwheels.org repository for pre-compiled wheels added automatically, which can reduce build dependencies and compile time dramatically.
  • DietPi-Software | Docker: The Docker APT repository is now installed manually instead of using the official Docker installer. This allows us to enable the Docker install option for Debian Bullseye systems, if only to allow widened testing of this upcoming Debian release with DietPi.

Interface Changes

  • DietPi-Banner | Running the script without input argument will now open the menu instead of printing the banner. The console alias has been adjusted accordingly, so that it is now possible to run "dietpi-banner 0" and "dietpi-banner 1" from console to have full and short banner versions printed. The "dietpi-banner" console command remains opening the menu.

New Software

  • DietPi-Software | Docker Compose: A tool to define and run multi-container Docker applications can now be installed through our software selection. Docker will be pulled in as dependency automatically.
  • DietPi-Software | Box86: An x86 wrapper/emulator for ARMv7 systems is now available for install. Thanks to it's ability to wrap ARMv7 shared system libraries to be used with i386 binaries, often no additional libraries need to be installed. Thanks to binfmt, it will be invoked automatically when an i386 binary is executed.
  • DietPi-Software | Steam: By automatically pulling in Box86 as dependency, Steam can now be installed on ARMv7 boards. It won't run perfectly stable yet and has limited features and game support, but we're optimistic that further improvements will address this in the future. Check out our documentation about it: https://dietpi.com/docs/software/gaming/#steam
  • DietPi-Software | mjpg-streamer: Lightweight multi-source and multi-output plugin JPEG streamer, now available for install. By default your attached camera capture will be streamed to a custom HTTP port. When installed along with OctoPrint, both will be automatically configured to work together. The Raspberry Pi camera module support is enabled by default, when installed on Raspberry Pi.

Fixes

  • Audio | Resolved a bug with Debian Buster, where the ALSA state daemon was always running, even when it was not configured.
  • DietPi-Globals | G_OBTAIN_CPU_TEMP: Negative temperatures are not trusted anymore, "N/A" will be printed instead. This allows a generic approach to fix/allow temperature estimation on further SBC models. Many thanks to @Thanapat for reporting a related issue on Roseapple Pi: https://dietpi.com/phpbb/viewtopic.php?t=8677
  • DietPi-Set_swapfile | Resolve an issue where "zram"/"zram0" dietpi.txt path entries were dropped, when running the script without input arguments. This especially broke applying zram-swap on first boot. Many thanks to @Dr0bac for reporting this issue: DietPi-Set_swapfile | zram is not applied on first boot #4002
  • DietPi-Software | Bitwarden_RS: Resolved an issue where the self-signed TLS certificate could not be imported on iOS. To apply this fix to an existing instance, the configuration file "/mnt/dietpi_userdata/bitwarden_rs/bitwarden_rs.env" needs to be removed or moved to a different location, so "dietpi-software reinstall 183" will re-create the configuration and TLS certificate.
  • DietPi-Software | Unbound: Resolved an issue where during install in combination with Pi-hole the service restart could have failed. Many thanks to @Ernstian for reporting this issue: DietPi-Software | Unbound: Fixes and enhancements #2409 (comment)
  • DietPi-Software | Unbound: Resolved an issue where the service start failed if the host system had a local IP address outside of the 192.168.0.0/16 subnet. Many thanks to @faxesystem for reporting this issue: DietPi-Software | Unbound: Fixes and enhancements #2409 (comment)
  • DietPi-Software | ReadyMedia: Resolved an issue where the media library was not rescanned on service start. Many thanks to @AdamFarnsworth0 for reporting this issue: https://twitter.com/AdamFarnsworth0/status/1347977813635305475
  • DietPi-Software | WiFi Hotspot: Resolved an issue where the install on Armbian-based images with RTL8188C* WiFi chip failed. Many thanks to @smogan71 for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=8523
  • DietPi-Software | Medusa: This software option has been disabled on Stretch systems, since it now requires Python >=3.6, which is not available in the Debian Stretch repository. If you run Medusa on a Stretch system, it will continue to work, but updating will either not be possible or break it. Many thanks to @aermak for reporting this issue: DietPi-Software | Medusa: Not compatible with Python 2 and 3.5 anymore #3991
  • DietPi-Software | WiringPi: Resolved an issue where the install failed, if the /usr/local/bin directory was not present. Many thanks to @bruz for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=8609
  • DietPi-Software | PaperMC: Resolved an issue where the install failed due to changed download URLs and stabilised service start and config creation by setting the Java heap size and allowing more time for the startup on smaller SBCs. Many thanks to @omavoss for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?p=30191#p30191
  • DietPi-Software | OpenTyrian: The install option has been disabled on x86_64, since the Debian package comes with a different file structure and it has been disabled on 64-bit RPi systems, since the binary has been compiled for armhf.
  • DietPi-Software | Domoticz: Resolved an issue where saving custom scripts and starting with a template did not work. Many thanks to @tec13 for reporting this issue: https://dietpi.com/phpbb/viewtopic.php?t=8627
  • DietPi-Software | Resolved an issue where for ruTorrent, Koel and Bitwarden_RS the automatic newest version detection failed and instead a possibly older fallback was used. Many thanks to @kelvmod for reporting this issue: bitwarden_rs/releases/latest tag_name detection #4105
  • DietPi-Software | LXQt: Resolved visual issues with our default configuration of Debian Buster, drastically simplified and cleaned up the files we ship.
  • DietPi-Software | SABnzbd: Resolved an issue on Stretch where the install failed due to raised minimum Python version with SABnzbd v3.2.0. If Python 3.5 is installed, SABnzbd v3.1.1 will be installed now to allow keeping the install option enabled for now. Many thanks to @19eighties for reporting this issue: DietPi-Software | SABnzbd: Install latest version via GitHub master branch #2762 (comment)
@MichaIng MichaIng added Testing/testers required 🔽 Information ℹ️ Beta 🧪 Issues specific to the Beta branch testing labels Feb 18, 2021
@MichaIng MichaIng added this to the v7.0 milestone Feb 18, 2021
@MichaIng MichaIng linked a pull request Feb 18, 2021 that will close this issue
@Joulinar
Copy link
Collaborator

Joulinar commented Feb 18, 2021

@MichaIng

update on an empty system is working.

Logfile attached. Click to expand!
root@DietPi4:~# G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=beta' /boot/dietpi.txt
[  OK  ] G_CONFIG_INJECT | Setting in /boot/dietpi.txt adjusted: DEV_GITBRANCH=beta
root@DietPi4:~# dietpi-update

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for available DietPi update

[ INFO ] DietPi-Update | Checking mirror: https://raw.githubusercontent.com/MichaIng/DietPi/beta/dietpi/server_version-6
[  OK  ] DietPi-Update | Using update server: https://raw.githubusercontent.com/MichaIng/DietPi/beta/dietpi/server_version-6
[  OK  ] DietPi-Update | Update available:
[ INFO ] DietPi-Update | Current version : v6.34.3 (branch: MichaIng/master)
[ INFO ] DietPi-Update | Latest version  : v6.35.-1 (branch: MichaIng/beta)

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Checking for update pre-requirements

[  OK  ] DietPi-Update | DietPi-Userdata validation: /mnt/dietpi_userdata
[  OK  ] DietPi-Update | Free space check: path=/ | available=13514 MiB | required=100 MiB
[ SUB1 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Applying pre-patches

[  OK  ] DietPi-Update | Downloading pre-patch file
[  OK  ] DietPi-Update | Applying execute permission
[  OK  ] DietPi-Update | Successfully applied pre-patches

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Upgrading APT packages

[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://deb.debian.org/debian buster InRelease
Hit:2 https://deb.debian.org/debian buster-updates InRelease
Hit:3 https://deb.debian.org/debian-security buster/updates InRelease
Hit:4 https://deb.debian.org/debian buster-backports InRelease
Hit:5 https://archive.raspberrypi.org/debian buster InRelease
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
debconf: delaying package configuration, since apt-utils is not installed
(Reading database ... 16431 files and directories currently installed.)
Preparing to unpack .../libssl1.1_1.1.1d-0+deb10u5_arm64.deb ...
Unpacking libssl1.1:arm64 (1.1.1d-0+deb10u5) over (1.1.1d-0+deb10u4) ...
Preparing to unpack .../libisc-export1100_1%3a9.11.5.P4+dfsg-5.1+deb10u3_arm64.deb ...
Unpacking libisc-export1100:arm64 (1:9.11.5.P4+dfsg-5.1+deb10u3) over (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Preparing to unpack .../libdns-export1104_1%3a9.11.5.P4+dfsg-5.1+deb10u3_arm64.deb ...
Unpacking libdns-export1104 (1:9.11.5.P4+dfsg-5.1+deb10u3) over (1:9.11.5.P4+dfsg-5.1+deb10u2) ...
Preparing to unpack .../openssl_1.1.1d-0+deb10u5_arm64.deb ...
Unpacking openssl (1.1.1d-0+deb10u5) over (1.1.1d-0+deb10u4) ...
Setting up libssl1.1:arm64 (1.1.1d-0+deb10u5) ...
Setting up libisc-export1100:arm64 (1:9.11.5.P4+dfsg-5.1+deb10u3) ...
Setting up openssl (1.1.1d-0+deb10u5) ...
Setting up libdns-export1104 (1:9.11.5.P4+dfsg-5.1+deb10u3) ...
Processing triggers for libc-bin (2.28-10) ...
[  OK  ] DietPi-Update | APT upgrade

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Installing new DietPi code

[  OK  ] DietPi-Update | Downloading update archive
[  OK  ] DietPi-Update | Unpacking update archive
[  OK  ] DietPi-Update | Installing new DietPi scripts
[  OK  ] DietPi-Update | Installing new DietPi system files
[  OK  ] DietPi-Update | Setting execute permissions for DietPi scripts
[ SUB1 ] DietPi-Set_software > verify_dietpi.txt ()
[  OK  ] DietPi-Set_software | Checking URL: https://raw.githubusercontent.com/MichaIng/DietPi/beta/dietpi.txt
[  OK  ] DietPi-Set_software | Downloading current dietpi.txt
[  OK  ] DietPi-Set_software | dietpi.txt verification completed
[  OK  ] verify_dietpi.txt  | Completed

 DietPi-Update
─────────────────────────────────────────────────────
 Phase: Applying incremental patches

[ INFO ] DietPi-Update | Current version : v6.34.3
[ INFO ] DietPi-Update | Latest version  : v6.35.-1
[  OK  ] DietPi-Patch | cd /tmp
[  OK  ] DietPi-Patch | rm -Rf /tmp/DietPi-Update /tmp/DietPi-Patch
[  OK  ] DietPi-Patch | Restarting DietPi-Update with new code...

[ SUB2 ] DietPi-Update > Checking for available DietPi update
[ INFO ] DietPi-Update | Getting repository version: https://raw.githubusercontent.com/MichaIng/DietPi/beta/.update/version
[  OK  ] DietPi-Update | Got valid repository version
[  OK  ] DietPi-Update | Update available:
[ INFO ] DietPi-Update | Current version : v6.34.3
[ INFO ] DietPi-Update | Latest version  : v7.0.-1
[ SUB2 ] DietPi-Update > Checking for update pre-requirements
[  OK  ] DietPi-Update | DietPi-Userdata validation: /mnt/dietpi_userdata
[  OK  ] DietPi-Update | Free space check: path=/ | available=13505 MiB | required=100 MiB
[ SUB3 ] DietPi-Services > stop
[  OK  ] DietPi-Services | stop : cron
[ SUB2 ] DietPi-Update > Applying pre-patches
[  OK  ] DietPi-Update | Downloading DietPi v6 pre-patches
[  OK  ] DietPi-Update | Applying execute permission
[  OK  ] DietPi-Update | Downloading pre-patches
[  OK  ] DietPi-Update | Applying execute permission
[  OK  ] DietPi-Update | Successfully applied pre-patches
[ SUB2 ] DietPi-Update > Upgrading APT packages
[ INFO ] DietPi-Update | APT update, please wait...
Hit:1 https://deb.debian.org/debian buster InRelease
Hit:2 https://deb.debian.org/debian buster-updates InRelease
Hit:3 https://deb.debian.org/debian-security buster/updates InRelease
Hit:4 https://deb.debian.org/debian buster-backports InRelease
Hit:5 https://archive.raspberrypi.org/debian buster InRelease
Reading package lists...
[  OK  ] DietPi-Update | APT update
[ INFO ] DietPi-Update | APT upgrade, please wait...
[  OK  ] DietPi-Update | APT upgrade
[ SUB2 ] DietPi-Update > Installing new DietPi code
[  OK  ] DietPi-Update | Downloading update archive
[  OK  ] DietPi-Update | Unpacking update archive
[  OK  ] DietPi-Update | Installing new DietPi scripts
[  OK  ] DietPi-Update | Installing new DietPi system files
[  OK  ] DietPi-Update | Setting execute permissions for DietPi scripts
[ SUB3 ] DietPi-Set_software > verify_dietpi.txt ()
[  OK  ] DietPi-Set_software | Checking URL: https://raw.githubusercontent.com/MichaIng/DietPi/beta/dietpi.txt
[  OK  ] DietPi-Set_software | Downloading current dietpi.txt
[  OK  ] DietPi-Set_software | dietpi.txt verification completed
[  OK  ] verify_dietpi.txt  | Completed
[ SUB2 ] DietPi-Update > Applying incremental patches
[ INFO ] DietPi-Update | Current version : v6.34.3
[ INFO ] DietPi-Update | Latest version  : v7.0.-1
[ INFO ] DietPi-Patch | Patching 6.34 to 6.35
[  OK  ] DietPi-Patch | rmdir --ignore-fail-on-non-empty /var/lib/dietpi/dietpi-software/services
[ INFO ] DietPi-Update | APT autopurge, please wait...
[  OK  ] DietPi-Update | APT autopurge
[  OK  ] DietPi-Update | Incremental patching to v7.0.-1 completed
[ SUB2 ] DietPi-Update > Completed
[ INFO ] DietPi-Update | Current version : v7.0.-1
[ INFO ] DietPi-Update | Latest version  : v7.0.-1
[  OK  ] DietPi-Survey | Purging survey data
[ SUB3 ] DietPi-Services > restart
[  OK  ] DietPi-Services | restart : cron
[  OK  ] DietPi-Patch | Everything done! Terminating the obsolete DietPi-Update parent instance...

Terminated
root@DietPi4:~#

One observation. On some places it is station 6.35 insted of 7.0

[ INFO ] DietPi-Update | Latest version : v6.35.-1

and

[ INFO ] DietPi-Update | Current version : v6.34.3
[ INFO ] DietPi-Update | Latest version  : v7.0.-1
[ INFO ] DietPi-Patch | Patching 6.34 to 6.35

@Joulinar
Copy link
Collaborator

I guess we still need to delay unbound service start, otherwise anchor is failing on b oot

Feb 18 23:02:59 DietPi4 systemd[1]: Starting Unbound DNS server...
Feb 18 23:03:00 DietPi4 package-helper[423]: /var/lib/unbound/root.key has content
Feb 18 23:03:00 DietPi4 package-helper[423]: fail: the anchor is NOT ok and could not be fixed
Feb 18 23:03:00 DietPi4 unbound[431]: [431:0] info: start of service (unbound 1.9.0).
Feb 18 23:03:00 DietPi4 systemd[1]: Started Unbound DNS server.

@Joulinar
Copy link
Collaborator

Joulinar commented Feb 18, 2021

there is an issue installing Python

[  OK  ] DietPi-Software | APT install for: python3-dev
[  OK  ] DietPi-Software | G_THREAD: All threads finished
[  OK  ] DietPi-Software | Verifying download target: get-pip.py
[ INFO ] DietPi-Software | Updating file: get-pip.py
[FAILED] DietPi-Software | mv get-pip.py get-pip.py
  • mv: 'get-pip.py' and 'get-pip.py' are the same file

@MichaIng
Copy link
Owner Author

MichaIng commented Feb 19, 2021

pip install fixed: bb226bc


Yes that little confusing versioning info during the update is hard to mitigate: DietPi versions 6.33 and prior can only update to 6.x versions. If they would see a 7.x version, the update would be denied with an info that a new image must be flashed. The idea indeed was to have major/core version increments as radical update breaks, as it was with v159 to v6.0 that time, but I don't want to keep this idea. For this reason the update is done in two stages. First the system sees v6.35 and pulls the new code. Then the script is restarted to allow checking the new remote version file with v7.0 info inside. I guess we'll apply at least one incremental patch to that file during beta, then there would be a:

[ INFO ] DietPi-Patch | Patching 6.35 to 7.0

at least, so that v6.35 looks like an intermediate version, which is somehow correct.


To fix the Unbound startup, maybe we need to dare something that I wanted to actually do a little later. Does the following help?

mkdir -p /etc/systemd/system/ifup@.service.d
echo -e '[Service]\nType=oneshot' > /etc/systemd/system/ifup@.service.d/dietpi.conf

@Joulinar
Copy link
Collaborator

To fix the Unbound startup, maybe we need to dare something that I wanted to actually do a little later. Does the following help?

mkdir -p /etc/systemd/system/ifup@.service.d
echo -e '[Service]\nType=oneshot' > /etc/systemd/system/ifup@.service.d/dietpi.conf

That's seems to be working 👍

Feb 19 13:22:58 DietPi4 systemd[1]: Starting Unbound DNS server...
Feb 19 13:23:14 DietPi4 package-helper[450]: /var/lib/unbound/root.key has content
Feb 19 13:23:14 DietPi4 package-helper[450]: success: the anchor is ok
Feb 19 13:23:14 DietPi4 unbound[459]: [459:0] info: start of service (unbound 1.9.0).
Feb 19 13:23:14 DietPi4 systemd[1]: Started Unbound DNS server.

@MichaIng
Copy link
Owner Author

MichaIng commented Feb 19, 2021

Okay great so far. Let's implement this as fixed service override for all DietPi systems, which has the following advantage:

  • The systemd network-online.target gets a much better meaning, since ifup@.service must now finish (instead of only start) before this is reached. Especially in case of DHCP, it was pretty common that network-online.target was reached even that no IP address was assigned yet. Adding After=dietpi-boot.service to network services was kinda workaround since it (when not disabled) waits for a default route, which implies an assigned IP. But it's much better to check/wait for the native ifupdown services which have exactly and only that purpose.

Here is the reason why this has been changed by Debian in the first place: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=791920

  • If nothing about this has changed, it means that services which are waiting for network.target or network-online.target would be delayed if an Ethernet interface was defined/enabled (added as "allow-hotplug" in /etc/network/interfaces) but no cable attached. I'll check on VM how this behaves.
    A counter argument is that networking.service, which handles auto <iface> entries (not used by us, but actually reasonable for onboard adapters) currently is still "Type=oneshot", hence suffers from exactly the same issue. So reverting ifup@.service to Type=simple was actually an inconsistent step when leaving networking.service as "Type=oneshot". And IMO the problem that network-online.target has no meaning is much larger than the problem that some services are delayed when someone unplugs an Ethernet cable without removing the related interface entry from the config file, especially on server systems which we address mostly.

Ah nice, we can as well remove the obsolete ifquery from the service: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=773539
Since ifup did not return an error code in the past on failure, to have the service showing the correct state, another ifquery call was added. It's still present nowadays even that the ifup returns error codes for a long time already 😄. This omits these funny "eth0=eth0" console prints during boot that did always confuse me.

MichaIng added a commit that referenced this issue Feb 19, 2021
+ DietPi-Network | Override ifup@.service type to give network(-online).target more meaning and remove obsolete ifquery call: #4121 (comment)
@Joulinar
Copy link
Collaborator

I hope it's not creating to much work to change the behaviour. At least it require a change on all services that require a valid network connection during start up. First thin stepping into my mind, VPN servers 😃

@MichaIng
Copy link
Owner Author

MichaIng commented Feb 19, 2021

I hope it's not creating to much work to change the behaviour. At least it require a change on all services that require a valid network connection during start up.

Nope, it does not require any change. All server services which provide something on a network port have After=network.target already, so will be now delayed until interfaces have been configured, instead of waiting for the loopback interface only. But this affects systemd-controlled services only, anyway, while on DietPi many are started by dietpi-postboot.service > dietpi-services later anyway, which is why this whole topic was only an issue in rare cases. Since Unbound is systemd-controlled, to not have dietpi-services possibly break the systems own DNS resolving, it is affected.

The service files installed by dietpi-software (not part of a package/installer) contain After=network-online.target dietpi-boot.service currently. The letter could now be removed, although it assures the default route and synced network time, which is often required as well when services perform HTTPS requests. So for now I don't see any need to change anything else 🙂.


Ahh, on WireGuard the issue became apparent as well, for the same reason, since it's systemd-controlled to not have dietpi-services possibly break the VPN connection the admin is currently connected through. This forced us to apply systemd service overrides there as well. Also those are not that strictly required now anymore, but they do not hurt either but are another failsafe step.

Pi-hole is another example. They regularly face reports from users, which cannot connect to the admin panel, since the service is started before an IP has been assigned, so that dnsmasq is not able to determine the LAN subnet, so treats every connection like it was from outside the LAN.

@Andymc1280
Copy link

Is this beta also useable for those of us who installed the x64 version ?

@ravenclaw900
Copy link
Collaborator

ravenclaw900 commented Feb 20, 2021

Yes, it is. Just run G_DEV_BRANCH beta.

@MichaIng
Copy link
Owner Author

Note that G_DEV_BRANCH lowers the current subversion by one, hence re-applies v6.33 to v6.34 patches when being on v6.34 currently. So I would follow the instructions linked above to avoid that overhead:

G_CONFIG_INJECT 'DEV_GITBRANCH=' 'DEV_GITBRANCH=beta' /boot/dietpi.txt
dietpi-update 1

An yes, DietPi beta versions are generally usable on all SBCs/architectures/systems 🙂.

@MichaIng MichaIng pinned this issue Feb 20, 2021
@Joulinar
Copy link
Collaborator

Joulinar commented Feb 20, 2021

I tested Bitwarden_RS. New certificate is working well with client Apps on W10 20H2, Android10 and iOS 14.4

However, Firefox still complaining on the certificate 😞

The server uses a certificate with a base restriction extension
that identifies it as a certification authority. This should not be 
the case for a correctly issued certificate. 

Looks like, the same thing allowing iOS to trust our certificate will break Firefox. But ok, you still can skip the warning or use different browser. Most impotent to have client app working now.

@MichaIng MichaIng linked a pull request Feb 21, 2021 that will close this issue
@MichaIng
Copy link
Owner Author

MichaIng commented Feb 21, 2021

Beta v7.0.0 has been merged: #4132

In case anyone is confused, since I forgot to raise the RC version string with the first beta, it was actually v7.0.-1 😉.

@Joulinar
Copy link
Collaborator

@MichaIng
can we add one step to the update process? Jellyfin pgp key expired and would need to be replaced. Challange is, it would need to executed as first step, otherwise apt update will fail. Or should it go via MOTD?

https://dietpi.com/phpbb/viewtopic.php?p=31985#p31985

@MichaIng
Copy link
Owner Author

it would need to executed as first step

This is what we have pre-patches for 🙂.

@tindecken
Copy link

Hi @MichaIng,
Is there any way to upgrade to current dietpi version: v6.34.3 to v7.0 beta?

image

Regards,

@Joulinar
Copy link
Collaborator

The first post above contains a link how to apply the beta patch. https://github.com/MichaIng/DietPi/blob/master/BRANCH_SYSTEM.md

@MichaIng MichaIng linked a pull request Feb 27, 2021 that will close this issue
@Joulinar
Copy link
Collaborator

@MichaIng
I tested installation of Docker in combination with Docker-Compose and Portainer. All working fine.

@MichaIng
Copy link
Owner Author

Beta v7.0.1 has been merged: #4146

@MichaIng
Copy link
Owner Author

DietPi v7.0 has been released: #4126

@MichaIng MichaIng unpinned this issue Feb 28, 2021
This was linked to pull requests Feb 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Beta 🧪 Issues specific to the Beta branch testing Information ℹ️
Projects
None yet
5 participants