Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard api proxy to api engine, proxy_header host doesn't include port info #50

Closed
hightall opened this issue Oct 24, 2019 · 0 comments
Assignees
Labels
Milestone

Comments

@hightall
Copy link
Contributor

Expected Behavior

Api proxy from dashboard to api engine, should include port info, so that when api engine use build_absolute_uri can get the port info, and generate the right url.

Current Behavior

Such as get agent config url path, http://9.59.196.20/engine/media/config_files/63a4e2b6-a61b-4537-9558-4a33789b2222/bf08eecabf0b7afee5b25e0363e9c061.zip
port is ignored ,but the server is not running on 80 port, it's really port is 8085, so agent can't download the config file.

Possible Solution

Add api engine service port into proxy_set_header Host $host:SERVICE_PORT

Steps to Reproduce

  1. make start
  2. create new agent
  3. create a ca node, will keep deploying.

Context (Environment)

Detailed Description or log

Traceback (most recent call last):
  File "main.py", line 9, in <module>
    create_node()
  File "/app/operations/create_node.py", line 161, in create_node
    _create_fabric_node()
  File "/app/operations/create_node.py", line 84, in _create_fabric_node
    k8s_client = get_k8s_client()
  File "/app/utils/__init__.py", line 30, in get_k8s_client
    k8s_client = KubernetesClient(config_file=k8s_config)
  File "/app/utils/client.py", line 16, in __init__
    config.load_kube_config(config_file)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/config/kube_config.py", line 546, in load_kube_config
    config_persister=config_persister)
  File "/usr/local/lib/python3.6/site-packages/kubernetes/config/kube_config.py", line 503, in _get_kube_config_loader_for_yaml_file
    with open(filename) as f:
FileNotFoundError: [Errno 2] No such file or directory: '/app/.kube/config'

Possible Implementation

@hightall hightall added the bug label Oct 24, 2019
@hightall hightall added this to the v1.0.0 milestone Oct 24, 2019
@hightall hightall self-assigned this Oct 24, 2019
jiahaoc1993 added a commit that referenced this issue Oct 25, 2019
[Fix #50] Add api engine service port into dashboard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant