Skip to content

sanoid: Add the configuration to manage the snapshot retention on backup01

Not happy with the way the configuration is done because it forces to declare part of configuration on the 2 servers. It's error prone and to know exactly the backup workflow to add a zfs backup policy. It will definitely need some improvements but it will worth it only if we start to use this kind of backup massively.

Related to T3889

Test Plan

  • dali
*** Running octocatalog-diff on host dali.internal.admin.swh.network
I, [2022-02-24T15:21:32.161935 #4169555]  INFO -- : Catalogs compiled for dali.internal.admin.swh.network
I, [2022-02-24T15:21:32.681855 #4169555]  INFO -- : Diffs computed for dali.internal.admin.swh.network
I, [2022-02-24T15:21:32.681895 #4169555]  INFO -- : No differences
*** End octocatalog-diff on dali.internal.admin.swh.network
  • backup01
diff origin/production/backup01.euwest.azure.internal.softwareheritage.org current/backup01.euwest.azure.internal.softwareheritage.org
*******************************************
+ File[/etc/sanoid/sanoid.conf] =>
   parameters =>
     "content": "# File managed with puppet (module profile::sanoid::snapshot)\n#...
     "ensure": "present",
     "group": "root",
     "mode": "0644",
     "owner": "root"
*******************************************
+ File[/etc/sanoid] =>
   parameters =>
     "ensure": "directory",
     "group": "root",
     "mode": "0755",
     "owner": "root"
*******************************************
+ File[/usr/local/bin/start_pg_backup.sh] =>
   parameters =>
     "content": "#!/bin/bash\n#\n# File managed by puppet. All modifications will...
     "ensure": "present",
     "group": "root",
     "mode": "0744",
     "owner": "root"
*******************************************
+ File[/usr/local/bin/stop_pg_backup.sh] =>
   parameters =>
     "content": "#!/bin/bash\n#\n# File managed by puppet. All modifications will...
     "ensure": "present",
     "group": "root",
     "mode": "0744",
     "owner": "root"
*******************************************
+ Node[backup01.euwest.azure.internal.softwareheritage.org]
*******************************************
- Node[default]
*******************************************
*** End octocatalog-diff on backup01.euwest.azure.internal.softwareheritage.org

Migrated from D7246 (view on Phabricator)

Merge request reports