serverless-openwhisk icon indicating copy to clipboard operation
serverless-openwhisk copied to clipboard

Namespace deployment fails

Open benoj opened this issue 5 years ago • 8 comments

Whenever I try to deploy my functions to a namespace i get an error saying my account is not authorized. However my account is the administrator account. Works fine when using default environment.

serverless.yml

service: asset-registry

provider:
  name: openwhisk
  namespace: 'environment_dev'
  
functions:
  hello:
    handler: handler.hello
    events:
      - http: GET /hello

plugins:
  - serverless-openwhisk

Failed to deploy function (asset-registry-dev-hello) due to error: PUT https://eu-gb.functions.cloud.ibm.com/api/v1/namespaces/environment_dev/actions/asset-registry-dev-hello?ov
erwrite=true Returned HTTP 403 (Forbidden) --> "The supplied authentication is not authorized to access 'environment_dev/asset-registry-dev-hello'."

benoj avatar Jul 16 '19 14:07 benoj

@benoj 👋 - quick check - is the namespace you are trying to deploy to a (classic) CF-style org and space or a newer-style IAM-enabled namespace?

The IAM namespaces are new and I'm still finalising support for them. You can follow along with progress on this here: https://github.com/serverless/serverless-openwhisk/issues/169

Until then - the temporary work-around is to use an older-style CF based namespace.

jthomas avatar Jul 16 '19 15:07 jthomas

Thanks for coming back.

I switched to CF based namespaces and now I'm getting another issue. It seems that when I deploy my functions with serverless I get a 502 error - if I manually create another endpoint in the console pointing to the same action it works however.

I am deploying my functions like so:

OW_AUTH=$CF_AUTH serverless deploy

Where CF_TOKEN is the Namespace Auth creds from https://cloud.ibm.com/openwhisk/namespace-settings

Any idea why this is causing a 502 from the API -> Action? (Invoking the action manually seems to work fine)

benoj avatar Jul 17 '19 17:07 benoj

Any clues on this? No logs anywhere that I can see? Seems rather confusing...

benoj avatar Jul 18 '19 09:07 benoj

Can you paste the full error logs?

jthomas avatar Jul 18 '19 16:07 jthomas

After creating an IAM API key in IBM Cloud and setting the OW_IAM_NAMESPACE_API_KEY env variable, I still get the same error above. Something else I need to perform?

bn326160 avatar Jun 19 '20 09:06 bn326160

Bump, I've been having this issue. I've tried just about everything from granting permissions, changing env variables but nothing has worked.

aaka3207 avatar Jun 23 '20 19:06 aaka3207

@aaka3207 https://github.com/serverless/serverless-openwhisk/issues/169#issuecomment-647821605 may help

bn326160 avatar Jul 25 '20 09:07 bn326160

@bn326160 I was on a tight deadline so I ended up using whisk deploy

aaka3207 avatar Aug 19 '20 17:08 aaka3207