F5Networks / f5-appsvcs-templates

F5 BIG-IP Application Service Templates (FAST)
Apache License 2.0
32 stars 13 forks source link

FAST Support for /Common Tenant (and /Common/Shared) #115

Closed simonkowallik closed 1 year ago

simonkowallik commented 1 year ago

Environment

Summary

The FAST documentation does not mention FAST does not support the /Common tenant. Specifically /Common/Shared for configurations that should be accessible to all further tenants created by FAST.

Failed to submit application:
Failed to get data from /mgmt/shared/fast/applications: 500 Server Error
Error: Could not generate AS3 declaration: FAST applications cannot modify the /Common tenant

Steps To Reproduce

The below FAST template produces the error.

title: Common Shared Tenant support test
description: ''
template: | 
  {
      "class": "ADC",
      "schemaVersion": "3.41.0",
      "id": "urn:uuid:c24fb5e2-35a3-4883-afb9-1625d843d6bc",
      "Common": {
          "class": "Tenant",
          "Shared": {
              "class": "Application",
              "template": "shared",
              "logPool": {
                  "class": "Pool",
                  "members": [
                      {
                          "servicePort": 443,
                          "serverAddresses": [
                              "192.0.2.53"
                          ]
                      }
                  ]
              },
              "remoteHSLog": {
                  "class": "Log_Destination",
                  "type": "remote-high-speed-log",
                  "pool": {
                      "use": "logPool"
                  }
              },
              "splunkLog1": {
                  "class": "Log_Destination",
                  "type": "splunk",
                  "forwardTo": {
                      "use": "remoteHSLog"
                  }
              },
              "splunkLog2": {
                  "class": "Log_Destination",
                  "type": "splunk",
                  "forwardTo": {
                      "bigip": "/Common/local-syslog"
                  }
              }
          }
      }
  }

Expected Behavior

Support /Common Tenant or document missing support and describe how a similar functionality can be achieved with FAST.

Actual Behavior

WebUI:

Failed to submit application:
Failed to get data from /mgmt/shared/fast/applications: 500 Server Error
Error: Could not generate AS3 declaration: FAST applications cannot modify the /Common tenant

/var/log/restnoded/restnoded.log:

{
  "method": "Post",
  "path": "/shared/fast/applications",
  "status": 500,
  "errorMessage": "Error: FAST applications cannot modify the /Common tenant\n    at /var/config/rest/iapps/f5-appsvcs-templates/lib/drivers.js:732:33\n    at callReaction (/var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/modules/es.promise.constructor.js:75:18)\n    at /var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/modules/es.promise.constructor.js:100:7\n    at flush (/var/config/rest/iapps/f5-appsvcs-templates/node_modules/core-js/internals/microtask.js:29:9)\n    at tryCatcher (/usr/share/rest/node/node_modules/bluebird/js/release/util.js:16:23)\n    at Promise._settlePromiseFromHandler (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:512:31)\n    at Promise._settlePromise (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:569:18)\n    at Promise._settlePromiseCtx (/usr/share/rest/node/node_modules/bluebird/js/release/promise.js:606:10)\n    at Async._drainQueue (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:138:12)\n    at Async._drainQueues (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:143:10)\n    at Immediate.Async.drainQueues (/usr/share/rest/node/node_modules/bluebird/js/release/async.js:17:14)\n    at runCallback (timers.js:794:20)\n    at tryOnImmediate (timers.js:752:5)\n    at processImmediate [as _immediateCallback] (timers.js:729:5)"
}
shyawnkarim commented 1 year ago

FAST sits on top of AS3 and can only do what AS3 can do. Currently, AS3 can only deploy to a tenant, however, there have been requests to support deploying to common. The AS3 team does plan to look at that. If you would like to speed up that process, I recommend submitting a request with an issue in the AS3 repo.

simonkowallik commented 1 year ago

@shyawnkarim sorry for my misleading description in this issue, I should have been more clear although the example template is very clear about the problem.

What I mean is, that FAST does not support creation of objects in /Common/Shared (see my initial post in section Actual Behavior). As per the AS3 documentation "In order to share configurations across tenants, BIG-IP AS3 allows configuration of the “Shared” application within the “Common” tenant (see Shared)." common configurations should be placed in /Common/Shared so that all Tenants can use these configuration objects. This is important to reduce the configuration size on BIG-IP and therefore for the scalability of the system.

Although FAST does not support templates to create objects in /Common/Shared it assumes it is in control and creates objects in it during installation, see #116.

So the intend of this GH issue is not to ask for creation of objects in configuration partition /Common, say /Common/my_http_profile but rather in the configuration folder Shared within the configuration partition /Common (example: /Common/Shared/my_http_profile). This allows any other Tenant created by FAST to reference /Common/Shared/my_http_profile instead of repeatedly creating the same profile with the same settings.

Allowing a FAST template to create objects in /Common/Shared would provide a neat way to simplify creation and parameterisation of standardised configuration objects to be used across Tenants.

For further clarification: BIG-IP configuration partition == AS3 Tenant BIG-IP configuration folder == AS3 Application

shyawnkarim commented 1 year ago

Ok, this issue is being tracked internally with ID, MYSTIQUE-880.

shyawnkarim commented 1 year ago

Closing.

This issue was resolved with Release 1.24.0.