[Containers] Issue setting proxy via config_file

Bug #1814833 reported by Jose Perez Carranza
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Ran An

Bug Description

itle
-----
Issue when trying to set proxies via config_file

Brief Description
-----------------
I'm doing a configuring a controller using a configuration file `sudo config_controller --kubernetes --confi-file my-file.ini`. I modified my configuration file to add my proxies but this is causing errors [1], seems like when parsing the configuration file the NO_PROXY variable is set as python list format and hence not recognized by http library.

1- http://paste.openstack.org/show/744593/

Severity
--------
Provide the severity of the defect.
Major: System/Feature is usable but degraded

Steps to Reproduce
------------------
1- Install StalringX
2. Configure it using config file with proxies section
   sudo config_controller --kubernetes --confi-file my-file.ini`

===== my-file.ini ====
[DOCKER_PROXY]
DOCKER_HTTP_PROXY = http://<IP>:PORT
DOCKER_HTTPS_PROXY = http://<IP>:PORT
DOCKER_NO_PROXY = localhost,127.0.0.1,192.168.204.2,192.168.204.3,192.168.204.4,10.10.10.3

Expected Behavior
------------------
Configuration should be applied correctly

Actual Behavior
----------------
 04/08: Populating initial system inventory ... No handlers could be found for logger "cgtsclient.common.http"
 Traceback (most recent call last):
   File "/usr/bin/config_controller", line 9, in <module>
     load_entry_point('controllerconfig==1.0.0', 'console_scripts', 'config_controller')()
   File "/usr/lib64/python2.7/site-packages/controllerconfig/systemconfig.py", line 534, in main
     assistant.configure(answerfile, do_default_config)
   File "/usr/lib64/python2.7/site-packages/controllerconfig/configassistant.py", line 5595, in configure
     runner.run()
   File "/usr/lib64/python2.7/site-packages/controllerconfig/progress.py", line 23, in run
     action()
   File "/usr/lib64/python2.7/site-packages/controllerconfig/configassistant.py", line 5497, in populate_initial_config
     self._populate_docker_config(client)
   File "/usr/lib64/python2.7/site-packages/controllerconfig/configassistant.py", line 5484, in _populate_docker_config
     parameter
   File "/usr/lib64/python2.7/site-packages/cgtsclient/v1/service_parameter.py", line 42, in create
     return self._create(self._path(), body)
   File "/usr/lib64/python2.7/site-packages/cgtsclient/common/base.py", line 51, in _create
     _, body = self.api.json_request('POST', url, body=body)
   File "/usr/lib64/python2.7/site-packages/cgtsclient/common/http.py", line 243, in json_request
     method, **kwargs)
   File "/usr/lib64/python2.7/site-packages/cgtsclient/common/http.py", line 219, in _cs_request
     error_json.get('debuginfo'), *args)
 cgtsclient.exc.HTTPBadRequest: Parameter 'no_proxy' includes an invalid address '['localhost''.
 localhost:~$

Reproducibility
---------------
100%

System Configuration
--------------------
- One node system

Branch/Pull Time/Commit
-----------------------
Master
CENGN ISO : http://mirror.starlingx.cengn.ca/mirror/starlingx/master/centos/20190204T060000Z/outputs/iso/

Timestamp/Logs
--------------
http://paste.openstack.org/show/744593/

Revision history for this message
Bart Wensley (bartwensley) wrote :

This was introduced in the original commit for the docker proxy:
https://git.openstack.org/cgit/openstack/stx-config/commit/?id=3a30da9a88920fef4d6b185708bd5013bb8dd95c

The bug should be assigned to the author.

Cindy Xie (xxie1)
Changed in starlingx:
assignee: nobody → Mingyuan Qi (myqi)
Revision history for this message
Ghada Khalil (gkhalil) wrote :

Marking as release gating; likely related to the containers feature

tags: added: stx.2019.05 stx.containers
Changed in starlingx:
importance: Undecided → Medium
summary: - [Containers]Issue setting proxy via config_file
+ [Containers] Issue setting proxy via config_file
Changed in starlingx:
status: New → Triaged
Ran An (an.ran)
Changed in starlingx:
assignee: Mingyuan Qi (myqi) → Ran An (an.ran)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-config (master)

Fix proposed to branch: master
Review: https://review.openstack.org/636612

Changed in starlingx:
status: Triaged → In Progress
Revision history for this message
Jose Perez Carranza (jgperezc) wrote :

Just tried the patch on a local deployment and works correctly, config_file can be used as described on the steps.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-config (master)

Reviewed: https://review.openstack.org/636612
Committed: https://git.openstack.org/cgit/openstack/stx-config/commit/?id=41618bb3cbaa082508c4ae0cd9d14d29ee215611
Submitter: Zuul
Branch: master

commit 41618bb3cbaa082508c4ae0cd9d14d29ee215611
Author: SidneyAn <email address hidden>
Date: Thu Feb 14 05:37:58 2019 +0800

    fix wrong format of NO_PROXY in temp configuration file

    the configuration validator will switch the .ini configuration file to
    a temp configuration file(/tmp/config/cgcs_config).
    this patch fixed the wrong format of NO_PROXY under section DOCKER_PROXY
    in the temp configuration file.

    Closes-bug: 1814833

    Change-Id: I347ef37a92676fa74548846c95a730b86cc25337
    Signed-off-by: SidneyAn <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to stx-config (f/stein)

Fix proposed to branch: f/stein
Review: https://review.openstack.org/637012

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to stx-config (f/stein)

Reviewed: https://review.openstack.org/637012
Committed: https://git.openstack.org/cgit/openstack/stx-config/commit/?id=591a21d00150cc61ec1100c17d0101eeb9989bfc
Submitter: Zuul
Branch: f/stein

commit 41618bb3cbaa082508c4ae0cd9d14d29ee215611
Author: SidneyAn <email address hidden>
Date: Thu Feb 14 05:37:58 2019 +0800

    fix wrong format of NO_PROXY in temp configuration file

    the configuration validator will switch the .ini configuration file to
    a temp configuration file(/tmp/config/cgcs_config).
    this patch fixed the wrong format of NO_PROXY under section DOCKER_PROXY
    in the temp configuration file.

    Closes-bug: 1814833

    Change-Id: I347ef37a92676fa74548846c95a730b86cc25337
    Signed-off-by: SidneyAn <email address hidden>

commit f12b0bc669ce13cf8a639d1d09dfc1f70e4bc0e7
Author: Jim Gauld <email address hidden>
Date: Thu Jan 24 13:54:43 2019 -0500

    Update nova helm overrides for PCI alias, passthrough, and SR-IOV

    This adds generation of nova.conf overrides to configure:
    - global PCI aliases for QAT and GPU devices
    - per-host PCI passthrough whitelist (contains both
      passthrough and SR-IOV devices)

    Helm multistring dictionary is created for PCI alias, and created for
    PCI passthrough whitelist. These multistring are OSLO.conf compatible
    with oslo_config.MultiStringOpt() multiple input values.
    Each multistring contains a list of JSON encoded strings.

    The generation of these overrides assumes that all host PCI device
    PFs and VFs are already provisioned, and that the resulting
    pci addresses are queryable using sysinv DB methods.

    Story: 2003909
    Task: 29071

    Change-Id: I8b96e471f7dcff6277cca107cbd0668ffd67c7b7
    Signed-off-by: Jim Gauld <email address hidden>

tags: added: in-f-stein
Ken Young (kenyis)
tags: added: stx.2.0
removed: stx.2019.05
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.