Skip to content
This repository has been archived by the owner on Dec 9, 2024. It is now read-only.

Namespace deployment fails #182

Open
benoj opened this issue Jul 16, 2019 · 8 comments
Open

Namespace deployment fails #182

benoj opened this issue Jul 16, 2019 · 8 comments

Comments

@benoj
Copy link

benoj commented Jul 16, 2019

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'."

@jthomas
Copy link
Contributor

jthomas commented Jul 16, 2019

@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: #169

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

@benoj
Copy link
Author

benoj commented Jul 17, 2019

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
Copy link
Author

benoj commented Jul 18, 2019

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

@jthomas
Copy link
Contributor

jthomas commented Jul 18, 2019

Can you paste the full error logs?

@bn326160
Copy link

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?

@aaka3207
Copy link

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

@bn326160
Copy link

@aaka3207 #169 (comment) may help

@aaka3207
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants