'shared' floating ip resource created in heat stack

Bug #1435961 reported by Radek Pospisil
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Murano
Fix Released
Critical
Stan Lagun

Bug Description

devstack, murano commit 08feb98be6ab49b9f0e80fc2ded185e2a273a749

Strangely it is nearly the same as bug https://bugs.launchpad.net/murano/+bug/1435787 , but different behavior.

In some cases if multiple applications are in environment with checked 'assign floating ip', then only one floating ip resource is created in heat stack, so all other resources uses this one. Finally it means, that even if there are several instances, then only one IP is used in app various configurations, so the whole application (defined by environment) does not work (e.g., application component connects to the IP of itself, instead of IP of db).

Steps
* use https://wiki.openstack.org/wiki/PolicyGuidedFulfillmentDemo to create environment with Petclinic and Hello world applications - both apps have to have own tomcat . Check 'assign floating ip' on tomcats. Deploy
* check the end of the log - there are following lines - even there are two different instances of tomcat (with its VMs), the same IP is reported.

2015-03-24 16:03:00 - Configure access to DB.
2015-03-24 16:03:00 - Running at http://16.60.142.166:8080/hello_world
2015-03-24 16:03:50 - Application is installed
2015-03-24 16:03:50 - Running at http://16.60.142.166:8080/petclinic
2015-03-24 16:04:20 - Deployment finished

* checking heat stack
- there is just one 'floating ip' resource with name 'format('fip-{0}-{1}'. $.id(), $instance.name)' - IMO YAQL does not evaluates this format statement in NeutronNetwork.yaml .

* environment yaml file from the rest:

{
  "status": "ready",
  "updated": "2015-03-24T16:04:20",
  "networking": {},
  "name": "t4",
  "created": "2015-03-24T15:54:48",
  "tenant_id": "f7d6205f860447c79c218cebf3c5aa8e",
  "version": 1,
  "services": [
    {
      "username": "",
      "name": "MySqlDB",
      "database": "",
      "instance": {
        "availabilityZone": "nova",
        "name": "odomki7nhh5s72",
        "securityGroupName": null,
        "assignFloatingIp": false,
        "floatingIpAddress": null,
        "keyname": "cloud",
        "?": {
          "type": "io.murano.resources.LinuxMuranoInstance",
          "_actions": {},
          "id": "169ab6ad-c110-4719-9c87-64f0e660ca4d"
        },
        "ipAddresses": [
          "10.0.1.3"
        ],
        "flavor": "m1.medium",
        "image": "17b13ed2-72c7-45a2-9986-8b2b6af4c253",
        "networks": {
          "useFlatNetwork": false,
          "primaryNetwork": null,
          "useEnvironmentNetwork": true,
          "customNetworks": []
        },
        "sharedIps": []
      },
      "password": "",
      "?": {
        "status": "ready",
        "_26411a1861294160833743e45d0eaad9": {
          "name": "MySQL"
        },
        "type": "io.murano.databases.MySql",
        "id": "6f4e2363-506a-46b4-a31c-2fa5e72225fb",
        "_actions": {}
      }
    },
    {
      "instance": {
        "availabilityZone": "nova",
        "name": "rxpfui7nhhfvh5",
        "securityGroupName": null,
        "assignFloatingIp": true,
        "floatingIpAddress": "16.60.142.166",
        "keyname": "cloud",
        "?": {
          "type": "io.murano.resources.LinuxMuranoInstance",
          "_actions": {},
          "id": "0a72d53f-ee90-413d-b308-b66e3159a127"
        },
        "ipAddresses": [
          "10.0.1.5"
        ],
        "flavor": "m1.medium",
        "image": "32b639c7-9eec-4a69-9207-2d5f6d6537cc",
        "networks": {
          "useFlatNetwork": false,
          "primaryNetwork": null,
          "useEnvironmentNetwork": true,
          "customNetworks": []
        },
        "sharedIps": []
      },
      "name": "Tomcat",
      "?": {
        "status": "ready",
        "_26411a1861294160833743e45d0eaad9": {
          "name": "Apache Tomcat"
        },
        "type": "io.murano.apps.apache.Tomcat",
        "id": "3f143c64-cf1e-472d-85da-5d0ca0467274",
        "_actions": {}
      }
    },
    {
      "tomcat": "3f143c64-cf1e-472d-85da-5d0ca0467274",
      "repository": "https://github.com/filip-blaha/hello-world-servlet.git",
      "database": "6f4e2363-506a-46b4-a31c-2fa5e72225fb",
      "?": {
        "status": "ready",
        "_26411a1861294160833743e45d0eaad9": {
          "name": "Hello, Java"
        },
        "type": "io.murano.apps.java.HelloWorld",
        "id": "25333fb3-fdbd-469b-aafd-4b13ca948322",
        "_actions": {}
      },
      "dbPassword": "1qaz!QAZ",
      "dbUser": "hello_user",
      "dbName": "hello_db",
      "dir": "hello_world",
      "name": "Hello-World"
    },
    {
      "instance": {
        "availabilityZone": "nova",
        "name": "rqlxoi7nhi7a13",
        "securityGroupName": null,
        "assignFloatingIp": true,
        "floatingIpAddress": "16.60.142.166",
        "keyname": "cloud",
        "?": {
          "type": "io.murano.resources.LinuxMuranoInstance",
          "_actions": {},
          "id": "06e9bfaf-5407-48fd-9873-977fab8ec92c"
        },
        "ipAddresses": [
          "10.0.1.4",
          "16.60.142.166"
        ],
        "flavor": "m1.medium",
        "image": "32b639c7-9eec-4a69-9207-2d5f6d6537cc",
        "networks": {
          "useFlatNetwork": false,
          "primaryNetwork": null,
          "useEnvironmentNetwork": true,
          "customNetworks": []
        },
        "sharedIps": []
      },
      "name": "Tomcat pet clinic",
      "?": {
        "status": "ready",
        "_26411a1861294160833743e45d0eaad9": {
          "name": "Apache Tomcat"
        },
        "type": "io.murano.apps.apache.Tomcat",
        "id": "77a4457d-717f-4d99-b283-c4ed1417be26",
        "_actions": {}
      }
    },
    {
      "name": "PetClinic",
      "tomcat": "77a4457d-717f-4d99-b283-c4ed1417be26",
      "database": "6f4e2363-506a-46b4-a31c-2fa5e72225fb",
      "dbPassword": "1qaz!QAZ",
      "warLocation": "https://dl.dropboxusercontent.com/u/1684617/petclinic.war",
      "dbUser": "pet_user",
      "dbName": "pet_db",
      "?": {
        "status": "ready",
        "_26411a1861294160833743e45d0eaad9": {
          "name": "PetClinic"
        },
        "type": "io.murano.apps.java.PetClinic",
        "id": "573af066-1f2f-4b7b-98dc-294bf4ecbf03",
        "_actions": {}
      }
    }
  ],
  "id": "434559a29cd24891b70ce6c9abf1a8df"
}

Changed in murano:
assignee: nobody → Stan Lagun (slagun)
status: New → In Progress
Revision history for this message
Radek Pospisil (radek-pospisil) wrote :

verified proposed fix https://review.openstack.org/167461 (bug https://bugs.launchpad.net/murano/+bug/1435787)- fix works correctly floating IPs are allocated as expected

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

Reviewed: https://review.openstack.org/167461
Committed: https://git.openstack.org/cgit/stackforge/murano/commit/?id=cc1d5eb5be01b8f5f7b9d630abc9292415d7d90f
Submitter: Jenkins
Branch: master

commit cc1d5eb5be01b8f5f7b9d630abc9292415d7d90f
Author: Stan Lagun <email address hidden>
Date: Wed Mar 25 03:52:53 2015 +0300

    Fixes instance FIP assignment

    YAQL expression for FIP resource were incorrect and left as is (as a string).
    Thus there were single resource for FIP with incorrect name instead of resource
    per VM

    Change-Id: Ieecdfdb0a7fbad82ef4344b4bac1a55656991e9e
    Closes-Bug: #1435787
    Closes-Bug: #1435961

Changed in murano:
status: In Progress → Fix Committed
Changed in murano:
milestone: none → kilo-rc1
Changed in murano:
importance: Undecided → Low
importance: Low → Critical
Changed in murano:
status: Fix Committed → Fix Released
Changed in murano:
milestone: kilo-rc1 → 2015.1.0
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.