← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1767028] Re: loadbalancer can't create with chinese character name

 

Marking invalid here to move the bug over to the neutron-lbaas
storyboard.

https://storyboard.openstack.org/#!/story/2001946

** Changed in: neutron
       Status: New => Invalid

** Project changed: neutron => octavia

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1767028

Title:
  loadbalancer can't create with chinese character name

Status in octavia:
  Invalid

Bug description:
  When create a loadbalancer with chinese character name, It will have
  some problems. Because its name will be written in haproxy
  configuration, but chinese character can't be written correctly.

  - version of Neutron server and Neutron LBaaS plugin are both mitaka
  - cat /var/log/neutron/lbaasv2-agent.log

  ……
  2018-04-26 17:08:28.115 2128890 INFO neutron.common.config [-] /usr/bin/neutron-lbaasv2-agent version 0.0.1.dev14379
  2018-04-26 17:08:30.985 2128890 WARNING oslo_config.cfg [req-ef0cef5b-d415-4a90-a953-616cb938bfb2 - - - - -] Option "quota_items" from group "QUOTAS" is deprecated for removal.  Its value may be silently ignored in the future.
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager [req-482029a2-2d4a-410a-9d24-5ec3eb7722fd 673c04fcbf374619af91d09eed27ed6f e1a0b669b61744ff867274586ef6a968 - - -] Create loadbalancer 31822d01-d425-456b-8376-4853d820ab1d failed on device driver haproxy_ns
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager Traceback (most recent call last):
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/agent/agent_manager.py", line 283, in create_loadbalancer
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     driver.loadbalancer.create(loadbalancer, ha_info=ha_info)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 433, in create
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     self.refresh(loadbalancer, ha_info=ha_info)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 423, in refresh
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     if (not self.driver.deploy_instance(loadbalancer, ha_info=ha_info) and
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/oslo_concurrency/lockutils.py", line 271, in inner
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     return f(*args, **kwargs)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 201, in deploy_instance
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     self.create(loadbalancer, ha_info=ha_info)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 251, in create
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     self._spawn(loadbalancer)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/drivers/haproxy/namespace_driver.py", line 406, in _spawn
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     haproxy_base_dir)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron_lbaas/services/loadbalancer/drivers/haproxy/jinja_cfg.py", line 93, in save_config
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     n_utils.replace_file(conf_path, config_str)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib/python2.7/site-packages/neutron/common/utils.py", line 535, in replace_file
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager   File "/usr/lib64/python2.7/socket.py", line 316, in write
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager     data = str(data) # XXX Should really reject non-string non-buffers
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager UnicodeEncodeError: 'ascii' codec can't encode characters in position 20-21: ordinal not in range(128)
  2018-04-26 17:11:19.533 2128890 ERROR neutron_lbaas.agent.agent_manager

  - command outputs
  # neutron lbaas-loadbalancer-create 0f45f8d1-7a50-4e4f-93f0-22bdf1e9a4fc --name 测试
  Created a new loadbalancer:
  +---------------------+--------------------------------------+
  | Field               | Value                                |
  +---------------------+--------------------------------------+
  | admin_state_up      | True                                 |
  | create_time         | 2018-04-26T09:11:11Z                 |
  | description         |                                      |
  | enable_stats        | False                                |
  | ha                  | False                                |
  | id                  | 31822d01-d425-456b-8376-4853d820ab1d |
  | listeners           |                                      |
  | name                | 测试                                 |
  | operating_status    | OFFLINE                              |
  | pools               |                                      |
  | provider            | haproxy                              |
  | provisioning_status | PENDING_CREATE                       |
  | stats_port          | 10000                                |
  | tenant_id           | e1a0b669b61744ff867274586ef6a968     |
  | timeout             | 50                                   |
  | vip_address         | 192.45.14.5                          |
  | vip_port_id         | d433fb83-c142-4221-b509-ccac184c4dca |
  | vip_subnet_id       | 0f45f8d1-7a50-4e4f-93f0-22bdf1e9a4fc |
  +---------------------+--------------------------------------+

  neutron lbaas-loadbalancer-list
  +--------------------------------------+------+-------------+---------------------+----------+--------------+------------+-------+---------+
  | id                                   | name | vip_address | provisioning_status | provider | enable_stats | stats_port | ha    | timeout |
  +--------------------------------------+------+-------------+---------------------+----------+--------------+------------+-------+---------+
  | 31822d01-d425-456b-8376-4853d820ab1d | 测试 | 192.45.14.5 | ERROR               | haproxy  | False        |      10000 | False |      50 |
  +--------------------------------------+------+-------------+---------------------+----------+--------------+------------+-------+---------+

  HAProxy configuration is not exist

To manage notifications about this bug go to:
https://bugs.launchpad.net/octavia/+bug/1767028/+subscriptions


References