All Apps and Add-ons

Compatible with Splunk_TA_google-cloudplatform ?

jypyking
Explorer

Hi,

I've installed this add-on on a HF that also have the Splunk_TA_google-cloudplatform add-on. For some reason it looks like this IA is trying to use the oauth2client lib from the Splunk_TA_google-cloudplatform instead of the one from its own folder and fail.
I tried adding the _init_.py file in "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin" but it doesn't change anything.
Any clue ?
Thanks.

Traceback (most recent call last):
File "/opt/splunk/bin/rest_handler.py", line 79, in
print splunk.rest.dispatch(**params)
File "/opt/splunk/lib/python2.7/site-packages/splunk/rest/init.py", line 149, in dispatch
module = import('splunk.rest.external.%s' % parts[0], None, None, parts[0])
File "/opt/splunk/etc/apps/IA-GSuiteForSplunk/bin/ga_authorize.py", line 14, in
from oauth2client.client import OAuth2WebServerFlow
File "/opt/splunk/etc/apps/Splunk_TA_google-cloudplatform/bin/oauth2client/client.py", line 46, in
from oauth2client import util
ImportError: cannot import name util

0 Karma
1 Solution

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

View solution in original post

0 Karma

jypyking
Explorer

Thanks! Actually copying the util.py file from the cloudplatform app to the Gsuite app fixed it 🙂

0 Karma

alacercogitatus
SplunkTrust
SplunkTrust

Due to App Precedence, Splunk will pull the library from the first path location it finds. This is an issue with the way core Splunk implements the framework. A solution could be to see if Splunk_TA_googlecloudplatform works with the oauth2client that ships with G Suite, and replace the Splunk one. You can also move the util folder from Splunk_TA_gcp and stick it in the GSuite/bin folder so that the import works correctly.

0 Karma
Get Updates on the Splunk Community!

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...