TritonDataCenter / sdc-sapi

SDC Services API. It coordinates the configuration and deployment of SDC services.
Mozilla Public License 2.0
2 stars 9 forks source link

Adding a manifest to sapi application causes issues with sapi service #4

Open caius opened 7 years ago

caius commented 7 years ago

Steps to reproduce

  1. Create a new manifest in sapi

    sdc-sapi /manifests -X POST -d '{
      "name": "chd_test",
      "path": "/tmp/test",
      "template": "testing"
    }'
  2. Login to sapi0 zone, and check whether that manifest has been created in /sapi/sapi_manifests

    (Spoiler: it hasn’t)

  3. Add the manifest to the sapi application, so it gets picked up by config-agent everywhere

    sdc-sapi /applications/$(sdc-sapi /applications?name=sdc | json -H 0.uuid) -X PUT -d '
    {
      "action":"update",
      "manifests":{
        "chd_test":"'$(sdc-sapi /manifests | json -H -c 'name=="chd_test"' 0.uuid)'"
      }
    }'
  4. Trigger a sapi sync to make it refresh the local cache

Expected result

Actual Result

It looks from testing like creating a manifest through sdc-sapi on the headnode, that doesn't get written out to the local storage on sapi0 zone. This then has the knock-on effect of causing the local storage refresh (either hourly or at startup) to bail out, due to the manifest not being found in local storage.

trentm commented 6 years ago

https://smartos.org/bugview/SAPI-292 is a duplicate of this one.