1. 19 Nov, 2024 7 commits
    • Xavier Thompson's avatar
      stack/erp5: Add scripts to apply new primary-url · 43b96953
      Xavier Thompson authored
      Add scripts in bin directory that can be called manually to apply a
      new primary-url (after having edited it in the instance parameters)
      by turning a primary into a replica or by making a replica follow a
      new primary, all without deleting existing data - so this is useful
      when the existing data does not diverge from the new primary.
      
      Being able to start replicating from a new primary without deleting
      existing data is convenient, but maybe it's better or sufficient or
      both to only be able to tell a mariadb to just destroy its existing
      data and re-bootstrap from scratch.
      
      Being able to delete all existing data and start from scratch seems
      necessary in any case, but it's not clear that a special feature is
      needed for this: maybe it's completely enough to be able to destroy
      and re-request the instance through standard slapos operations.
      
      Questions remain for automated usage:
      
      1. One option is to provide a url the user may simply interact with
         (clickable button ...) to call the appropriate script. This kind
         of interaction could also be used to trigger the deletion of all
         existing data for a fresh bootstrap.
      
      2. Another option is that editing the primary-url in the parameters
         results in the appropriate script being called. This makes sense
         as a way to remain in sync with given parameters, although there
         are some drawbacks: the uncertain propagation time, and the fact
         there is no guarantee that the existing data can converge to the
         state of the new primary. This might be grounds to keep all this
         strictly manual.
      
      In any case, this relies already on the propagation of the instance
      parameters to input the new primary-url, so it may not be useful at
      all for any use-case, manual or automated.
      43b96953
    • Xavier Thompson's avatar
      stack/erp5: Add failover script · 590bc924
      Xavier Thompson authored
      Add a script in bin directory that can be called manually to turn a
      replica into a primary. Being able to turn a replica into a primary
      is an absolutely necessary feature of replication. It's a necessary
      step of a takoever procedure.
      
      Questions remain for automatisation. One option is to provide a url
      the user may simply interact with (clickable button ...) to trigger
      the script, that may also be used automatically as part of a larger
      takoever procedure.
      
      Triggering the change to primary by editing the instance parameters
      - such as by removing the replication-related parameters - does not
      seem best: one immediate drawback is the uncertain propagation time
      of instance parameters; another is the reliance on the availability
      of the SlapOS master to trigger a usually time-sensitive operation.
      590bc924
    • Xavier Thompson's avatar
      stack/erp5: Enable requesting mariadb replication · 9d0849d9
      Xavier Thompson authored
      Allow requesting a mariadb set-up to replicate another mariadb:
      - bootstrap from a statically served backup file
      - replicate from a primary mariadb
      9d0849d9
    • Xavier Thompson's avatar
      stack/erp5: Drop mariadb_update service in replica · 38b85d1c
      Xavier Thompson authored
      This service does on-the-fly modifications on the running mariadb that
      can conflict with and break replication and are anyway unneeded in the
      replica.
      
      Maybe this service should be dropped entirely and its functionality be
      implemented another way.
      38b85d1c
    • Xavier Thompson's avatar
      stack/erp5: Add mariadb user for replication · 2ccafe84
      Xavier Thompson authored
      Use a generated password and publish its url.
      2ccafe84
    • Xavier Thompson's avatar
      65415875
    • Xavier Thompson's avatar
      [tmp] Fetch unreleased slapos.cookbook · d3391c47
      Xavier Thompson authored
      d3391c47
  2. 05 Nov, 2024 4 commits
  3. 04 Nov, 2024 4 commits
  4. 03 Nov, 2024 2 commits
  5. 01 Nov, 2024 1 commit
  6. 31 Oct, 2024 1 commit
  7. 29 Oct, 2024 2 commits
  8. 24 Oct, 2024 2 commits
  9. 22 Oct, 2024 2 commits
  10. 21 Oct, 2024 1 commit
    • Jérome Perrin's avatar
      random: fix password recipe when using storage-path and passwd · 280370c7
      Jérome Perrin authored
      As discussed on bb841a7b (comment 219278)
      when using storage-path and passwd option, the storage file could not
      be updated to the new format because of AttributeError _needs_migration.
      
      This changes to no longer try to detect if the storage needs migration,
      but just compare the expected content of the storage file during install
      and overwrite the file if it is different.
      
      This new approach also fix a behavior that re-running buildout with
      storage-path option and a different passwd option did not update the
      storage file. Now it is also updated.
      
      ( this also fixes a potential encoding problem on py2 )
      280370c7
  11. 18 Oct, 2024 2 commits
  12. 17 Oct, 2024 5 commits
    • Jérome Perrin's avatar
      12c244e5
    • Jérome Perrin's avatar
      software/mosquitto/test: fix flaky test · 4a8f846f
      Jérome Perrin authored
      This test is using two connection one with a client to subscribe to a
      topic and wait for message and another one with publish.single to
      publish to the topic.
      The test was failing from time to time because the publish might have
      happened after the client was subscribed.
      
      Refactor the test to use `loop` on the client to have more control
      and be able to wait for the client to be subscribed using the
      `on_subscribe` callback.
      
      The test is also factorized, instead of having the same test twice for
      IPv4 and IPv6, we pass the host as parameter.
      4a8f846f
    • Jérome Perrin's avatar
      ERP5-py3: fix repozo backup generation · 8bff11cc
      Jérome Perrin authored
      See merge request !1665
      8bff11cc
    • Jérome Perrin's avatar
      stack/erp5: use repozo --kill-old-on-full when producing backups · ce34e0c1
      Jérome Perrin authored
      from repozo doc:
      
      > If a full backup is created, remove any prior full or incremental
      > backup files (and associated metadata files) from the repository
      > directory.
      
      This solves a problem that after a pack some old repozo files were left
      around, with this option they are automatically removed.
      ce34e0c1
    • Jérome Perrin's avatar
      stack/erp5: fix ZEO repozo backups not produced on python3 · c74efadc
      Jérome Perrin authored
      Products.TIDStorage was not ported to python3 and is not installed on
      software-py3.cfg but the backup crontab expects tidstorage to be
      present - as a result, it was silently failing to produce backups.
      
      This brings minimal support to repozo backups on python3, without
      Products.TIDStorage interraction and also extends software release test
      to have a simple test checking that backups are produced and can be
      restored.
      c74efadc
  13. 16 Oct, 2024 7 commits