upgrading 5080 swprobe to 5100 on Debian loses config?

Hi - I tried upgrading a software probe that runs on Debian from version 5080 to the 5100 binaries provided by the project, and while the old atlasswprobe package is being removed, it seems there is no attempt to migrate the existing probe key or other configuration? What's the recommended path here, back up the key and copy it into the new configuration directory, or just start a new probe from scratch? Alex.

...on 2025-02-23 23:07:33, Alexander Bochmann wrote:
What's the recommended path here, back up the key and copy it into the new configuration directory, or just start a new probe from scratch?
So making a copy of /var/atlas-probe/etc/probe_key and probe_key.pub before installing the new ripe-atlas-probe package and then moving that into /etc/ripe-atlas after seems to be enough? At least the existing probe ID now shows as Firmware Version 5100 in the Atlas portal, and I see no immediate errors... Alex.

This is a good question. I have the same case, also with Debian and 5080 > 5100 I would like to know the best practice for upgrading (using the precompiled binaries) as well. https://github.com/RIPE-NCC/ripe-atlas-probe-doc/blob/master/manuals/Debian1... The Installation Instructions don't provide any details regarding upgrades. Thanks, Simon On 23.02.25 23:07, Alexander Bochmann wrote:
Hi -
I tried upgrading a software probe that runs on Debian from version 5080 to the 5100 binaries provided by the project, and while the old atlasswprobe package is being removed, it seems there is no attempt to migrate the existing probe key or other configuration?
What's the recommended path here, back up the key and copy it into the new configuration directory, or just start a new probe from scratch?
Alex.
----- To unsubscribe from this mailing list or change your subscription options, please visit:https://mailman.ripe.net/mailman3/lists/ripe-atlas.ripe.net/ As we have migrated to Mailman 3, you will need to create an account with the email matching your subscription before you can change your settings. More details at:https://www.ripe.net/membership/mail/mailman-3-migration/

On Mon, 24 Feb 2025, Simon Brandt via ripe-atlas wrote:
This is a good question. I have the same case, also with Debian and 5080 > 5100
I would like to know the best practice for upgrading (using the precompiled binaries) as well. https://github.com/RIPE-NCC/ripe-atlas-probe-doc/blob/master/manuals/Debian1... The Installation Instructions don't provide any details regarding upgrades.
I can't really speak for Debian, but it seems like some mistake slipped into the package. According to the RPM package, the following should happen automatically for the migration to the FHS-compatible package: --- 8< --- if ( [ -f /var/atlas-probe/etc/probe_key ] && ! cmp -s /var/atlas-probe/etc/probe_key /etc/ripe-atlas/probe_key 1>/dev/null 2>&1 ); then install -D -p -m 0600 -o ripe-atlas -g ripe-atlas /var/atlas-probe/etc/probe_key /etc/ripe-atlas/probe_key 1>/dev/null 2>&1; fi if ( [ -f /var/atlas-probe/etc/probe_key.pub ] && ! cmp -s /var/atlas-probe/etc/probe_key.pub /etc/ripe-atlas/probe_key.pub 1>/dev/null 2>&1 ); then install -D -p -m 0644 -o ripe-atlas -g ripe-atlas /var/atlas-probe/etc/probe_key.pub /etc/ripe-atlas/probe_key.pub 1>/dev/null 2>&1; fi if ( [ -f /var/atlas-probe/state/mode ] && ! cmp -s /var/atlas-probe/state/mode /etc/ripe-atlas/mode 1>/dev/null 2>&1 ); then install -D -p -m 0644 -o ripe-atlas -g ripe-atlas /var/atlas-probe/state/mode /etc/ripe-atlas/mode 1>/dev/null 2>&1; fi if ( [ -f /var/atlas-probe/state/config.txt ] && ! cmp -s /var/atlas-probe/state/config.txt /etc/ripe-atlas/config.txt 1>/dev/null 2>&1 ); then install -D -p -m 0644 -o ripe-atlas -g ripe-atlas /var/atlas-probe/state/config.txt /etc/ripe-atlas/config.txt 1>/dev/null 2>&1; fi if ( [ -f /etc/ripe-atlas/probe_key ] && [ -f /etc/ripe-atlas/probe_key.pub ] && [ -f /etc/ripe-atlas/mode ] && [ -d /var/atlas-probe ] ); then # NOTE: /etc/ripe-atlas/config.txt may not exist # if /var/atlas-probe/state/config.txt did not either rm -rf /var/atlas-probe fi --- 8< --- I hope that I didn't make any mistakes when resolving the macros from the spec file manually for this e-mail. In general, it's copying the old files to the new FHS-conforming place and then removing the old /var/atlas-probe tree. Regards, Robert

Dear all, Thank you for reaching out to us and reporting this. The current installation scripts for Debian have a provision that is intended to perform a migration of the configuration files from the pre-FHS directories to the new post-FHS directories, similar to how it is done for RPM (many thanks to Robert Scheck for highlighting the code snippet). For Debian, the relevant snippet can be found in `ripe-atlas-common.preinst` as follows: migrate_file(){ if ( [ -f "$1" ] && ! cmp -s "$1" "$2" 1>/dev/null 2>&1 ); then install -D -p -m "$3" -o "$4" -g "$5" "$1" "$2" 1>/dev/null 2>&1 fi } ... case "$1" in install) ... if ! [ -d "/etc/ripe-atlas" ]; then install -d -m 0770 -o "ripe-atlas" -g "ripe-atlas" "/etc/ripe-atlas" 1>/dev/null 2>&1 fi migrate_file "/var/atlas-probe/etc/probe_key" "/etc/ripe-atlas/probe_key" 0600 \ "ripe-atlas" "ripe-atlas" migrate_file "/var/atlas-probe/probe_key.pub" "/etc/ripe-atlas/probe_key.pub" 0644 \ "ripe-atlas" "ripe-atlas" migrate_file "/var/atlas-probe/state/mode" "/etc/ripe-atlas/mode.atlasswprobe" 0644 \ "ripe-atlas" "ripe-atlas" migrate_file "/var/atlas-probe/state/config.txt" "/etc/ripe-atlas/config.txt" 0644 \ "ripe-atlas" "ripe-atlas" ;; It is important to note that I have also expanded the variables to facilitate readability of the code snippet. On a minimal, clean Debian 12 test system, I further executed the following steps: - Compiled and installed a `5080` software probe. - Downloaded the `common <https://ftp.ripe.net/ripe/atlas/software-probe/debian/dists/bookworm/main/binary-amd64/ripe-atlas-common_5100_amd64.deb>` and `probe <https://ftp.ripe.net/ripe/atlas/software-probe/debian/dists/bookworm/main/binary-amd64/ripe-atlas-probe_5100_all.deb>` packages for the Debian 12 distribution from the FTP server. - Executed `dpkg -i ripe-atlas-common_5100_amd64.deb ripe-atlas-probe_5100_all.deb` with superuser privileges. Before installing the `5100` package, the state directory for `5080` contained the following items (output of `ls -la /var/atlas-probe/state`): total 16 drwxr-xr-x 2 atlas root 4096 Feb 25 12:08 . drwxr-xr-x 9 atlas root 4096 Feb 25 12:07 .. lrwxrwxrwx 1 atlas nogroup 44 Feb 25 12:07 FIRMWARE_APPS_VERSION -> /usr/local/atlas/state/FIRMWARE_APPS_VERSION -rw-r--r-- 1 atlas root 11 Feb 25 12:08 config.txt -rw-r--r-- 1 atlas root 5 Feb 25 10:08 mode The configuration directory for `5080` contained the following (output of `ls -la /var/atlas-probe/etc`): total 16 drwxr-xr-x 2 atlas nogroup 4096 Feb 25 12:07 . drwxr-xr-x 9 atlas root 4096 Feb 25 12:07 .. -rw------- 1 atlas nogroup 1823 Feb 25 12:07 probe_key -rw-r--r-- 1 atlas nogroup 394 Feb 25 12:07 probe_key.pu After installation as described above, the post- FHS configuration directory for `5100` contained the following items (output of `ls -la /etc/ripe-atlas/): total 24 drwxrwx--- 2 ripe-atlas ripe-atlas 4096 Feb 25 12:09 . drwxr-xr-x 74 root root 4096 Feb 25 12:09 .. -rw-r--r-- 1 ripe-atlas ripe-atlas 11 Feb 25 12:08 config.txt -rw-r--r-- 1 ripe-atlas ripe-atlas 5 Feb 25 10:08 mode -rw------- 1 ripe-atlas ripe-atlas 1823 Feb 25 12:07 probe_key -rw-r--r-- 1 ripe-atlas ripe-atlas 394 Feb 25 12:07 probe_key.pub It is important to note that the RIPE Atlas service is now disabled and stopped by default post-installation. As such, the final step would be to execute `systemctl enable ripe-atlas.service && systemctl start ripe-atlas.service` with superuser privileges in order to start the probe up. Based on the outcome of this approach, it appears that executing the steps described above resulted in successful migration of the configuration files. Therefore, executing the aforementioned steps would be the best practice recommended from our end in this case. We also thank you for highlighting the need for more detailed documentation on this matter. We will update the documentation to list this process for all Debian distributions (currently Debian 11 and 12) in an upcoming release. Best regards, Marios Mavropoulos Papoudas Software Engineer @ RIPE Atlas RIPE NCC On Sun, 23 Feb 2025 at 23:07, Alexander Bochmann <ab@lists.gxis.de> wrote:
Hi -
I tried upgrading a software probe that runs on Debian from version 5080 to the 5100 binaries provided by the project, and while the old atlasswprobe package is being removed, it seems there is no attempt to migrate the existing probe key or other configuration?
What's the recommended path here, back up the key and copy it into the new configuration directory, or just start a new probe from scratch?
Alex.
----- To unsubscribe from this mailing list or change your subscription options, please visit: https://mailman.ripe.net/mailman3/lists/ripe-atlas.ripe.net/ As we have migrated to Mailman 3, you will need to create an account with the email matching your subscription before you can change your settings. More details at: https://www.ripe.net/membership/mail/mailman-3-migration/

Hi - ...on 2025-02-25 12:39:50, Marios Mavropoulos Papoudas wrote:
The current installation scripts for Debian have a provision that is intended to perform a migration of the configuration files from the pre-FHS directories to the new post-FHS directories,
Hrm, it seems the 5080 Debian prerm script removes /var/atlas-probe/etc unless the environment considers its replacement package an upgrade? https://github.com/RIPE-NCC/ripe-atlas-software-probe/blob/5080/build-config... That at least explains why /var/atlas-probe/etc was removed when I uninstalled the atlasswprobe package manually. Is maybe moving from a atlasswprobe-5080-1.deb that was build locally to ripe-atlas-probe pulled from the software-probe deb repo not an "upgrade" for some reason? Alex.
participants (4)
-
Alexander Bochmann
-
Marios Mavropoulos Papoudas
-
ripe.net@toppas.net
-
Robert Scheck