loadbalancer can't create with chinese character name

Bug #1767028 reported by xuchaochao
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
octavia
Invalid
Undecided
xuchaochao

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

xuchaochao (xuchaochao)
Changed in fuel-plugin-contrail:
assignee: nobody → xuchaochao (xuchaochao)
no longer affects: neutron
affects: fuel-plugin-contrail → neutron
Revision history for this message
Pawel Suder (pasuder) wrote :

Thank you for your update. I would like to ask few more questions:

- please provide which version of Neutron server and Neutron LBaaS plugin or Octavia do you use
- would you like to provide logs (enabled DEBUG) from Neutron server and LBaaS/Octavia plugin, please?
- please provide command outputs and changes in HAProxy configuration, if it is possible

Thank you!

xuchaochao (xuchaochao)
description: updated
Revision history for this message
Pawel Suder (pasuder) wrote :

Thank you for your update. I would like to ask you if that issue could be reproduced on newer version, i.e. Newton?

Revision history for this message
Brian Haley (brian-haley) wrote :

I would actually ask if you could reproduce this in Pike or Queens, as those are the only upstream releases we will most likely even fix this in. Ocata is currently in security fix only mode, so any fixes for those will have to be in downstream distros.

Revision history for this message
Michael Johnson (johnsom) wrote :

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
affects: neutron → octavia
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.