The subscription notification is displayed in vSphere Client when the vCenter is connected to vSphere+ on Free Trial
search cancel

The subscription notification is displayed in vSphere Client when the vCenter is connected to vSphere+ on Free Trial

book

Article ID: 313419

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

The message "This vCenter is not yet subscribed. To subscribe this vCenter, go to the VMware Cloud Console, click inventory, and click add to Subscription in the Warning banner" is displayed in the notification banner when a vCenter is connected to the vCenter Cloud Gateway.

This banner does not disappear after the vCenter gets disconnected from the vCenter Cloud Gateway for customers using the vSphere+ Trial.


Environment

VMware vCenter Server 8.0.x
VMware vCenter Server 7.0.3

Cause

The purpose of this message is to notify user to follow additional steps to complete the subscription process for their vCenter. It covers the case when a user has purchased a subscription package and has connected their vCenter to the vCenter Cloud Gateway, but have not finished the conversion process to subscription.
As a side effect the message appears for users having connected their vCenter to the Gateway to test vSphere+ in trial mode.

Two issues have been identified:

  1. The message is shown when the organisation is on Free Trial.

This is due to not considering what should be the behaviour in case of Free Trial, and wrongly assuming that the requested functionality should be for all registered vCenters. This will require functionality change in the vsphere-entitlement-agent. The system needs to check the organization entitlement whether it is SUBSCRIPTION or TRIAL before it calls the vCenter announcements API to create the announcement.

  1. The message is not deleted after 25 hours after de-registration of vCenter.

This is due to a bug in the vCenter announcements API implementation. The entitlement agent sets expires_at to 25h in the future, the scheduled task which recreates the announcement runs every 24h, so as long as the vCenter is connected the announcement will be recreated if the vCenter is not subscribed yet.

Resolution

The issue is technically caused by the vSphere+ BE that calls the vCenter announcement API. The issue will be fixed in the future release of vSphere+ and there will be no changes required in vCenter.


Workaround:

To workaround the issue, please follow the below mentioned procedure:

The vCenter API can be called to delete the announcement once the vCenter has been de-registered (disconnected) from the gateway.
  1. Call API with Administrator role. This will return a valid vmware-api-session-id using the vCenter api-explorer: https://<vc ip>/ui/app/devcenter/api-explorer, then execute GET cis.session API.
  2. Once there is a valid session id, call the announcements API to list all announcements:

curl --location 'https://<vc ip>:443/api/vcenter/system/announcements/' --header 'vmware-api-session-id: <valid session id>'

From the response, e.g.:
{"1":
{
        "severity": "WARNING",
        "expires_at": "2023-06-26T14:50:18.892Z",
        "message": {
            "args": [],
            "default_message": "This vCenter Server is not yet subscribed. To subscribe this vCenter Server, go to the VMware Cloud Console, click Inventory, and click Add to Subscription in the warning banner.",
            "id": "notification.subscription.incomplete"
        }
}
}

  1. Get the number of the announcement which has id "notification.subscription.incomplete" (in the above example it is "1"), and call the delete announcement API:

curl --location --request DELETE 'https://<vc ip>:443/api/vcenter/system/announcements/1' --header 'vmware-api-session-id: <valid session id>'

  1. As long as vCenter is not connected to the gateway, the announcement should not appear again, as there will be no vsphere-entitlement-agent on the gateway calling vCenter.