Introduction:
This document describes how to troubleshoot Google Cloud integration with CloudCenter Manager (CCM) version 4.8.0/4.7.x .
Prerequisites
Requirements
Cisco recommends that you have knowledge of these topics:
- Linux Interface
- Virtual Machine Environments
- Google cloud account
Components Used
The information in this document is based on these software versions:
- CloudCenter version 4.6.x to 4.8.x
The information in this document was created from the devices in a specific lab environment. All of the devices used in this document started with a cleared (default) configuration. If your network is live, make sure that you understand the potential impact of any command.
Background Information
After you successfully add GCE orchestrator (CCO) to CCM and try to test the environment by deploying an application which includes the selection of instance type and zone, error message is shown while trying to select the project as shown in the image:
Problem
In CCM osmosix logs, you can find this error:
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:45,991 INFO impl.CloudPropertiesServiceImpl [asyncOperationExecutor-6] - cloud property task is invoked
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,006 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-6] - cloud data is not null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,006 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-6] - got the region end point as null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,011 INFO impl.CloudPropertiesServiceImpl [asyncOperationExecutor-7] - cloud property task is invoked
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,014 INFO impl.CloudPropertiesServiceImpl [asyncOperationExecutor-8] - cloud property task is invoked
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,024 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-7] - cloud data is not null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,024 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-7] - got the region end point as null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,032 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-8] - cloud data is not null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,032 INFO impl.CloudManagementServiceImpl [asyncOperationExecutor-8] - got the region end point as null
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,765 ERROR impl.CloudPropertiesServiceImpl [asyncOperationExecutor-6] - Failed to getCloudPropertiesFromGateway from gateway for propertyType : Project
VENDOR_ID::1::USER_ID::2::2017-05-29 04:11:46,765 ERROR impl.CloudPropertiesServiceImpl [asyncOperationExecutor-6] - 500 Internal Server Error
org.springframework.web.client.HttpServerErrorException: 500 Internal Server Error
at org.springframework.web.client.DefaultResponseErrorHandler.handleError(DefaultResponseErrorHandler.java:94)
at org.springframework.web.client.RestTemplate.handleResponse(RestTemplate.java:641)
at org.springframework.web.client.RestTemplate.doExecute(RestTemplate.java:597)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:557)
at org.springframework.web.client.RestTemplate.postForObject(RestTemplate.java:357)
at com.osmosix.commons.util.AjaxUtil.postJson(AjaxUtil.java:117)
at com.osmosix.mgmt.cloud.impl.CloudPropertiesServiceImpl.getCloudPropertiesFromGateway(CloudPropertiesServiceImpl.java:365)
at com.osmosix.mgmt.cloud.impl.CloudPropertiesServiceImpl$CloudPropertyTask.run(CloudPropertiesServiceImpl.java:461)
at com.osmosix.commons.operation.impl.AsyncOperationServiceImpl$2.run(AsyncOperationServiceImpl.java:134)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
However, if you go to CCO osmosix logs, you get a clear picture.
2017-05-29 04:28:00,425 INFO job.JobServiceController [http-apr-8443-exec-3] - processing validateCloudAccount request...
2017-05-29 04:28:00,632 ERROR properties.CloudPropertiesController [http-apr-8443-exec-6] - com.google.api.client.googleapis.json.GoogleJsonResponseException: 403 Forbidden
{
"code" : 403,
"errors" : [ {
"domain" : "global",
"message" : "Google Cloud Resource Manager API has not been used in project credible-spark-166514 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=credible-spark-166514 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"reason" : "forbidden"
} ],
"message" : "Google Cloud Resource Manager API has not been used in project credible-spark-166514 before or it is disabled. Enable it by visiting https://console.developers.google.com/apis/api/cloudresourcemanager.googleapis.com/overview?project=credible-spark-166514 then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.",
"status" : "PERMISSION_DENIED"
Resolution
These API's should be enabled for Cloud center to work properly with the GCE:
To enable it:
- In GCE console and navigate to the API dashboard, as shown in the image:
- At the end of the page , all the enabled API's are listed and most probably you find that Google Compute Engine API is already enabled, if not enable it, as shown in the image:
- However, GCE doesn't put the resource manager API on the page directly so you have to search for it. For that , select the enable API option from the top of the page and it redirects you to the API library.
- As shown in the image, search for Google Cloud Resource Manager API , select it and enable it.
- In order to reflect these changes, restart the CCO machine and then try to deploy the app once again.