LBaaS Haproxy occurs error if no member is added

Bug #1302283 reported by Bo Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Bo Lin

Bug Description

if VIP (only with session_persistence=HTTP_COOKIE)&Pool without one member added, the Haproxy agent would report config file error like the following:

2014-04-02 10:14:10.632 17283 DEBUG neutron.openstack.common.lockutils [req-18b873c4-abd7-4483-824f-f553c29ae549 None] Semaphore / lock released "deploy_instance" inner /opt/stack/neutron/neutron/openstack/common/lockutils.py:252
2014-04-02 10:14:10.633 17283 ERROR neutron.services.loadbalancer.agent.agent_manager [req-18b873c4-abd7-4483-824f-f553c29ae549 None] Unable to deploy instance for pool: a61dd6b6-8dbe-4576-b213-f8632892a58c
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager Traceback (most recent call last):
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/services/loadbalancer/agent/agent_manager.py", line 180, in _reload_pool
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager self.device_drivers[driver_name].deploy_instance(logical_config)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/openstack/common/lockutils.py", line 249, in inner
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager return f(*args, **kwargs)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 280, in deploy_instance
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager self.update(logical_config)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 95, in update
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager self._spawn(logical_config, extra_args)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/services/loadbalancer/drivers/haproxy/namespace_driver.py", line 110, in _spawn
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager ns.netns.execute(cmd)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/agent/linux/ip_lib.py", line 466, in execute
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager check_exit_code=check_exit_code)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager File "/opt/stack/neutron/neutron/agent/linux/utils.py", line 76, in execute
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager raise RuntimeError(m)
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager RuntimeError:
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager Command: ['sudo', '/usr/local/bin/neutron-rootwrap', '/etc/neutron/rootwrap.conf', 'ip', 'netns', 'exec', 'qlbaas-a61dd6b6-8dbe-4576-b213-f8632892a58c', 'haproxy', '-f', '/opt/stack/data/neutron/lbaas/a61dd6b6-8dbe-4576-b213-f8632892a58c/conf', '-p', '/opt/stack/data/neutron/lbaas/a61dd6b6-8dbe-4576-b213-f8632892a58c/pid', '-sf', '4524']
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager Exit code: 1
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager Stdout: ''
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager Stderr: '[ALERT] 091/101410 (20752) : config : HTTP proxy a61dd6b6-8dbe-4576-b213-f8632892a58c has a cookie but no server list !\n[ALERT] 091/101410 (20752) : Fatal errors found in configuration.\n'
2014-04-02 10:14:10.633 17283 TRACE neutron.services.loadbalancer.agent.agent_manager

I think one solution: check the member list, if no member exists, Haproxy agent would not deploy the instance or undeploy existed haproxy process.

Tags: lbaas
Bo Lin (linb)
description: updated
Changed in neutron:
assignee: nobody → berlin (linb)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
importance: Undecided → Medium
status: New → Confirmed
Changed in neutron:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

Reviewed: https://review.openstack.org/86750
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=0f2de5a3353c6951a88542f35be80b9ba9a55c0f
Submitter: Jenkins
Branch: master

commit 0f2de5a3353c6951a88542f35be80b9ba9a55c0f
Author: berlin <email address hidden>
Date: Fri Apr 11 08:04:47 2014 +0800

    Fix LBaaS Haproxy occurs error if no member is added

    If no member is added and session_persistence.type=HTTP_COOKIE,
    haproxy agent would not add cookie persistence option to the backend.
    Closes-Bug: #1302283

    Change-Id: Ifa2564df924c2555225a749a99c705b3f1caab4a

Changed in neutron:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in neutron:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
milestone: juno-1 → 2014.2
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.