haproxy and magnum.conf mismatch

Bug #1957118 reported by Jesper Schmitz Mouridsen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Magnum Charm
In Progress
Undecided
Unassigned

Bug Description

Symptoms after deploying the charm
and executing openstack coe cluster template list:
Unable to establish connection to http://10.0.0.37:9511/v1/clustertemplates: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

(10.0.0.37 is the ip of the magnum lxd in my test setup)

The reason is that haproxy looks like:

frontend tcp-in_magnum-api_admin
    bind *:9511
    bind :::9511
    acl net_10.0.0.37 dst 10.0.0.37/255.255.255.0
    use_backend magnum-api_admin_10.0.0.37 if net_10.0.0.37
    default_backend magnum-api_admin_10.0.0.37

backend magnum-api_admin_10.0.0.37
    balance leastconn
    server magnum-2 10.0.0.37:9501 check

whereas host in [api] in magnum.conf is not set, and it defaults to 127.0.0.1
see https://docs.openstack.org/magnum/latest/configuration/sample-config.html

Fix is to set host in [api] in magnum.conf corresponding to ha-proxy backend

Changed in charm-magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on charm-magnum (master)

Change abandoned by "James Page <email address hidden>" on branch: master
Review: https://review.opendev.org/c/openstack/charm-magnum/+/824228
Reason: This review is > 12 weeks without comment, and failed testing the last time it was checked. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and leaving a 'recheck' comment to get fresh test results.

Revision history for this message
Silviu Panica (silviu001) wrote :

I am also affected by this bug on my environment:

* juju version 2.9.37
 * openstack yoga
 * operating system: Ubuntu 22.04 x86_64
 * magnum, channel yoga/stable, ver. 14.0.0, rev. 10;
 * magnum-hacluster, channel latest/edge, rev. 116;
 * magnum-mysql-router, channel 8.0/stable, rev. 35;

I managed to patch my live production environment as follows:

juju ssh magnum/ID -- "exec -- sudo sed -i '/port = {{ options.service_listen_info.magnum_api.port .*/s/$/\nhost = {{ options.service_listen_info.magnum_api.ip }}/;' /var/lib/juju/agents/unit-magnum-MACHINE_ID/charm/templates/ussuri/magnum.conf"

juju ssh magnum/ID -- systemctl restart jujud-machine-MACHINE_ID-lxd-CONTAINER_ID.service

where:
 - ID - magnuminstance id (I am running in HA mode with 3 instances)
 - MACHINE_ID - the id of the juju machine where designate-bind instance LXD container is hosted
 - CONTAINER_ID - the id of the designate-bind instance LXD container

(using the proposed modifications in https://review.opendev.org/c/openstack/charm-magnum/+/824228)

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.