Skip to content

rapid-cdn: use the slave list the SlapOS Master sent

Revert part of !1975 (merged) as it break CDN on update and highlight the risk of depending on one unique Database

Instead the CDN instance will directly use the list sent by master and store a copy for analisis instead. It uses the recipe:

JsonSchemaWithDB:

  • instance-db-path is necessary to know where is the database
  • The default for validation validate-parameters = main. The recipe refuses a value that includes validation of shared instances.
  • The entry point slapconfiguration.instancenode.deferred is removed. rapid-cdn uses slapconfiguration.jsonschema.localdb.

Kedifa promise

While working on this MR a recurring issue was raise and is included here.

A new slave gets a real URL only on the second kedifa run the first a plaholder "NotReadyYet" and there was no promise to check it is a correct url. The promise is update to validate a slave is getting a url valid string. Else if the master partition was not processed again the kedifa URL kept the NotReadyYet.

slave-key-download-url-ready-promise stays red until the URL of every slave matches https://[<ip>]:<port>/<32 lowercase letters or digits>.

The test checks the key download URL of the new slave in the kedifa updater mapping of each frontend.

Before merge

  • release slapos.cookbook with the recipe changes
  • drop the commit stack/slapos: pin slapos.cookbook 1.0.500.dev5 [REMOVE BEFORE MERGE] and pin the released version
Edited by Cédric Le Ninivin

Merge request reports