LATEST VERSION: 2.1 - CHANGELOG

Service Plans

Operators can configure multiple MySQL service plans in the Service Plans pane of the Ops Manager MySQL tile. Follow the instructions below to add, modify, or delete service plans.

Note: Prior to v1.8.0, MySQL for PCF supported only one service plan. Upgrading from v1.7.x or earlier renames this plan to pre-existing-plan by default. To retain the original name of your plan (e.g., “100mb-dev”), edit its Service Plan name field in the Service Plans pane before clicking Apply Changes

Add a Plan

  1. Navigate to the Ops Manager Installation Dashboard and click the MySQL for PCF tile.
  2. Click Service Plans.
  3. Click Add to add a new service plan. Click the small triangles to expand or collapse a plan’s details. Config service plans
  4. Complete the following fields:
    • Service Plan name: Developers see this name in the Marketplace and use it to create service instances in Apps Manager and the cf CLI. Plan names may include only lowercase letters, numbers, hyphens, and underscores.

      Note: Ops Manager does not prevent you from entering invalid names into the Service Plan name field. A plan name containing invalid characters prevents the tile from deploying after you click Apply Changes and generates an error like this in the installation log: Error 100: Error filling in template 'settings.yml.erb' for 'cf-mysql-broker-partition-20d9770a220f749796c2/0' (line 40: Plan name 'ONE HUNDRED MEGA BYTES!!!' must only contain lowercase letters, numbers, hyphen(-), or underscore(_).)

    • Description: This descriptive text accompanies the plan name to provide context. For example, “general use, small footprint.”
    • Storage Quota: The maximum amount, in megabytes, of storage allowed each instance of the service plan.
    • Concurrent Connections Quota: The maximum number of simultaneous database connections allowed to each instance of the service plan.
    • Not available by default: By default, plans are public and publish to all orgs. Selecting this checkbox makes the plan private, which means the operator must publish the plan manually before developers can use it. See Access Control for how to change the scope of publication for service plans already deployed.

    • The Concurrent Connections Quota field sets the max_user_connections property for an existing plan.

Changing the Concurrent Connections Quota does not affect the connections currently open. For example, if you decrease this value from 40 to 20, apps already running with 40 open connections will retain their connections. To force an app’s open connection count down to the new limit, an operator can restart the proxy job. Otherwise, the number of connections will eventually converge down to the new limit on its own, because when any app connection above the limit is reset, it won’t reconnect.

Note: You cannot deploy MySQL for PCF without at least one plan defined. If you want to deploy the MySQL tile so that no plans are visible to developers, define one plan, select Not available by default to make the plan private, and only enable access to your own org.

Modify a Plan

To modify an existing service plan, change its configuration values in the Ops Manager MySQL tile Service Plans pane, click Save and then click Apply Changes in the Installation Dashboard.

Do not decrease the Storage Quota value for a plan, and only decrease the Concurrent Connections Quota value if you are confident that all apps using the plan use fewer concurrent connections than allowed. Reducing these values could cause app failure when existing service instances update. Instead of decreasing quotas for a plan, create a new plan with lower quotas.

After an operator changes a plan’s definition, either the operator or a user must update each plan instance by running cf update-service SERVICE_INSTANCE -p NEW_PLAN_NAME on the command line.

Update Existing Service Instances

After you change a service plan, all new services reflect the new settings. To apply a change to existing services, update service instances using the cf CLI as follows:

cf update-service SERVICE_INSTANCE -p NEW_PLAN

The following rules apply when updating a service instance’s plan:

  • You can always update a service instance to a plan with a larger max_storage_mb.
  • You can update a service instance to a plan with a smaller max_storage_mb only if the current usage is less than the new value. If current usage is greater than the new value, the update-service command fails.

Delete a Plan

  1. Navigate to the Ops Manager Installation Dashboard and click the MySQL for PCF tile.
  2. Click Service Plans. Delete plan
  3. Click the trash can icon to the right of the service plan listing you want to delete.

    Note: If you accidentally click the trash can, do not click Save. Instead, return to the Installation Dashboard and any accidental changes will be discarded. If you do click Save, do not click Apply Changes on the Installation Dashboard. Instead, click Revert to discard any accidental changes.

  4. Click Save.

  5. Click Apply Changes from the Installation Dashboard.

The plan will no longer appear in the Services Marketplace for non-admin users. Existing service instances will continue to exist until deleted.

Note: If you want to recover a service plan that you deleted accidentally, see Accidental Deletion of Service Plan.

Instances Left Over After Plan Deletion

When deleting a plan, the Apply Changes step will run the broker-registrar errand. If there are still services instances that were created under that plan, the errand will show this warning:

Warning: Service plans are missing from the broker's catalog (BROKER_CATALOG_URL)
but can not be removed from Cloud Foundry while instances exist. The plans have
been deactivated to prevent users from attempting to provision new instances of
these plans. The broker should continue to support bind, unbind, and delete for
existing instances; if these operations fail contact your broker provider.

You can see how many instances of each plan are allocated by running this SQL as the admin user:

SELECT max_storage_mb AS plan_size,
       COUNT(db_name) AS total_instances_allocated
FROM mysql_broker.service_instances
GROUP BY max_storage_mb
ORDER BY max_storage_mb DESC;

After all service plan instances have been deleted, remove the plan from the Marketplace by running the broker-registrar errand again:

  1. Find the full name of the MySQL for PCF deployment. For example, p-mysql-180290d67d5441ebf3c5.
    bosh deployments
  2. Set the deployment:
    bosh deployment p-mysql-180290d67d5441ebf3c5
  3. Run:
    bosh run errand broker-registrar

Re-adding Deleted Plans

A plan name can only be reused if the old plan has been fully purged using the instructions above.

If there are still service instances for a plan that has been deleted, the broker-registrar errand fails with the following error:

Server error, status code: 502, error code: 270012, message: Service broker
catalog is invalid: Plan names must be unique within a service. Service p-mysql
already has a plan named 
Create a pull request or raise an issue on the source for this page in GitHub