When creating a bay in magnum, agent nodes do not get templated values

Bug #1493952 reported by Dimitry Ushakov
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
Manjeet Singh Bhatia

Bug Description

Steps to reproduce:

$ magnum baymodel-create --name swarmbaymodel1 --image-id fedora-21-atomic-3 --keypair-id dimapair --external-network-id public --dns-nameserver 8.8.8.8 --flavor-id m1.small --coe swarm
+---------------------+--------------------------------------+
| Property | Value |
+---------------------+--------------------------------------+
| fixed_network | None |
| apiserver_port | None |
| docker_volume_size | None |
| image_id | fedora-21-atomic-3 |
| no_proxy | None |
| external_network_id | public |
| created_at | 2015-09-09T17:42:07.341719+00:00 |
| http_proxy | None |
| updated_at | None |
| cluster_distro | fedora-atomic |
| name | swarmbaymodel1 |
| ssh_authorized_key | None |
| https_proxy | None |
| coe | swarm |
| keypair_id | dimapair |
| master_flavor_id | None |
| flavor_id | m1.small |
| dns_nameserver | 8.8.8.8 |
| uuid | 0b12320f-8b41-43e2-8593-9698c0c94f0f |
+---------------------+--------------------------------------+

$ magnum bay-create --name swarmbay --baymodel swarmbaymodel1 --node-count 2
+--------------------+--------------------------------------+
| Property | Value |
+--------------------+--------------------------------------+
| status | None |
| uuid | cbc9fd4c-face-42d5-94b6-ddf4f014db65 |
| status_reason | None |
| created_at | 2015-09-09T17:42:19+00:00 |
| updated_at | None |
| bay_create_timeout | 0 |
| api_address | None |
| baymodel_id | 0b12320f-8b41-43e2-8593-9698c0c94f0f |
| node_count | 2 |
| node_addresses | None |
| master_count | 1 |
| discovery_url | None |
| name | swarmbay |
+--------------------+--------------------------------------+

$ ssh fedora@172.24.4.46
The authenticity of host '172.24.4.46 (172.24.4.46)' can't be established.
ECDSA key fingerprint is c9:b8:f9:f7:ac:93:dc:39:e4:94:7e:87:0b:d5:ff:b1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '172.24.4.46' (ECDSA) to the list of known hosts.
[fedora@sw-wpceqvjuowy-1-kathdwwmmehe-swarm-node-donfulhexoif ~]$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
bf4330b20491 swarm:0.2.0 "/swarm join --addr About a minute ago Exited (1) About a minute ago swarm-agent
[fedora@sw-wpceqvjuowy-1-kathdwwmmehe-swarm-node-donfulhexoif ~]$ sudo docker logs b
time="2015-09-09T17:43:03Z" level=fatal msg="Post https://discovery-stage.hub.docker.com/v1/clusters/f490351bc41baf4110deab28fe11fd33: http: error connecting to proxy http://$HTTP_PROXY: dial tcp: lookup $HTTP_PROXY: invalid domain name"

==============

The fix is to move https://github.com/openstack/magnum/blob/master/magnum/templates/docker-swarm/swarmnode.yaml#L118-L120 to https://github.com/openstack/magnum/blob/master/magnum/templates/docker-swarm/swarmnode.yaml#L158

Same test resulted in all agent containers being up.

Changed in magnum:
assignee: nobody → Manjeet Singh Bhatia (manjeet-s-bhatia)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

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

Changed in magnum:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/221920
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=2c9efa98bd962f1606b828ae72bf56df3da27501
Submitter: Jenkins
Branch: master

commit 2c9efa98bd962f1606b828ae72bf56df3da27501
Author: Manjeet Singh Bhatia <email address hidden>
Date: Wed Sep 9 07:13:35 2015 -0400

    Swarm agent to get templated proxy values

    This patch will proxy values to swarm-agent
    services which would other wise give error
    if you are not under proxy.

    Change-Id: I63a0340a6806794e6f22a761cc1510697b3011bb
    Closes-Bug: #1493952

Changed in magnum:
status: In Progress → Fix Committed
Adrian Otto (aotto)
Changed in magnum:
milestone: none → mitaka-1
status: Fix Committed → Fix Released
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.