You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openwhisk.apache.org by "nslvn (via GitHub)" <gi...@apache.org> on 2024/03/07 08:09:21 UTC
[I] Local ansible deployment API gateway error 502 [openwhisk]
nslvn opened a new issue, #5469:
URL: https://github.com/apache/openwhisk/issues/5469
<!--
We use the issue tracker for bugs and feature requests. For general questions and discussion please use https://openwhisk.apache.org/slack.html or https://openwhisk.apache.org/community.html instead.
Do NOT share passwords, credentials or other confidential information.
Before creating a new issue, please check if there is one already open that
fits the defect you are reporting.
If you open an issue and realize later it is a duplicate of a pre-existing
open issue, please close yours and add a comment to the other.
Issues can be created for either defects or enhancement requests. If you are a committer than please add the labels "bug" or "feature". If you are not a committer please make clear in the comments which one it is, so that committers can add these labels later.
If you are reporting a defect, please edit the issue description to include the
information shown below.
If you are reporting an enhancement request, please include information on what you are trying to achieve and why that enhancement would help you.
For more information about reporting issues, see
https://github.com/apache/openwhisk/blob/master/CONTRIBUTING.md#raising-issues
Use the commands below to provide key information from your environment:
You do not have to include this information if this is a feature request.
-->
## Environment details:
* local deployment, native ubuntu, Mac OS, Kubernetes, ...
Local deployment using ansible with apigateway
* version of docker, ubuntu, ...
Docker version 24.0.7, build afdd53b
Ubuntu 22.04.3 LTS
## Steps to reproduce the issue:
1. Deploy openwhisk using ansible
```
export ENVIRONMENT=local
# Export Keys
ansible-playbook -i environments/$ENVIRONMENT prereq.yml
ansible-playbook -i environments/$ENVIRONMENT setup.yml
# couchdb is still needed to store subjects and actions
ansible-playbook -i environments/$ENVIRONMENT couchdb.yml
ansible-playbook -i environments/$ENVIRONMENT initdb.yml
ansible-playbook -i environments/$ENVIRONMENT wipe.yml
ansible-playbook -i environments/$ENVIRONMENT openwhisk.yml \
-e skip_pull_runtimes=True \
-e limit_action_memory_max=4294967296 \
-e limit_action_memory_std=2147483648 \
-e limit_invocations_per_minute=999999 \
-e limit_invocations_concurrent=9999999 \
-e limit_fires_per_minute=9999999 \
-e limit_sequence_max_length=1000 \
-e namespace_default_limit_action_memory_max=8192 \
-e lean=true \
-e invoker_user_memory="16384m" # Too much here is an issue when it creates too many concurrent processes!
# to use the API gateway
ansible-playbook -i environments/$ENVIRONMENT apigateway.yml
ansible-playbook -i environments/$ENVIRONMENT routemgmt.yml
ansible-playbook -i environments/$ENVIRONMENT edge.yml \
-e cli_installation_mode=remote \
-e openwhisk_cli_home="$OPENWHISK_HOME/../openwhisk-cli"
# installs a catalog of public packages and actions
ansible-playbook -i environments/$ENVIRONMENT postdeploy.yml
```
2. Create an action `wsk -i action create test test.py`
3. Create an API route `wsk -i api create /test get /guest/test`
4. Curl the action -> Error 502
## Provide the expected results and outputs:
A working response (not 502)
## Provide the actual results and outputs:
```
{"code":502, "message":"Oops. Something went wrong. Check your URI and try again."}
```
## Additional information you deem important:
I've found this issue (https://github.com/apache/openwhisk-apigateway/issues/370) for the apigateway already. However, I think the bug is with the deployment script, not the gateway itself. Adding "GATEWAY_HOST" in the apigateway task deploy role files this issue, but I'm not sure if this is correct for other deployments as well.
```
- name: (re)start apigateway
docker_container:
name: apigateway
image: "{{ apigateway.docker_image | default('openwhisk/apigateway:' ~ apigateway.version) }}"
state: started
recreate: true
restart_policy: "{{ docker.restart.policy }}"
hostname: apigateway
env:
"REDIS_HOST": "{{ groups['redis'] | first }}"
"REDIS_PORT": "{{ redis.port }}"
"REDIS_PASS": "{{ redis.password }}"
"PUBLIC_MANAGEDURL_HOST": "{{ ansible_host }}"
"BACKEND_HOST": "http://{{ groups['controllers'] | map('extract', hostvars, 'ansible_host') | first }}" # Added to avoid gateway issues
"PUBLIC_MANAGEDURL_PORT": "{{ apigateway.port.mgmt }}"
"TZ": "{{ docker.timezone }}"
ports:
- "{{ apigateway.port.mgmt }}:8080"
- "{{ apigateway.port.api }}:9000"
pull: "{{ apigateway_local_build is undefined }}"
- name: wait until the API Gateway in this host is up and running
uri:
url: "http://{{ groups['apigateway'] | first }}:{{ apigateway.port.api }}/v1/apis"
register: result
until: result.status == 200
retries: 12
delay: 5
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@openwhisk.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org