When an app deployment we should capture more information in application logs.
Currently the application-specific deployment log shows following:
vagrant@devstack:/opt/stack/solum$ tail -100 /var/log/solum/deployer/deploy-2c4aedf9-b8c2-4d28-a3ec-d24651d24346.log
DEBUG - {"@timestamp": "2016-03-16 15:46:14", "project_id": "22d7c00be7c44b08a22682da990f01f6", "message": "Deploying Assembly cf218cb0-7aee-4a8f-9dfc-f44220d0d65a Workflow 2c4aedf9-b8c2-4d28-a3ec-d24651d24346", "stage_id": "cf218cb0-7aee-4a8f-9dfc-f44220d0d65a", "task": "deploy"}
ERROR - {"@timestamp": "2016-03-16 15:49:02", "project_id": "22d7c00be7c44b08a22682da990f01f6", "message": "App deployment failed: Heat stack creation failure", "stage_id": "cf218cb0-7aee-4a8f-9dfc-f44220d0d65a", "task": "deploy"}
The solum-deployer screen shows following:
{"stack": {"disable_rollback": true, "description": "Basic app deploy.\n", "parent": null, "tags": null, "stack_name": "wordpress-app-cf218cb0-7aee-4a8f-9dfc-f44220d0d65a", "stack_user_project_id": "e07c5959247548c5953c299ae07bfc03", "stack_status_reason": "Resource CREATE failed: ResourceInError: resources.compute_instance: Went to status ERROR due to \"Message: Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 5dc73c03-fb50-431c-942a-691a2f1bba90. Last exception: 'NetworkInfo' object has no attribute 'wait', Code: 500\"", "creation_time": "2016-03-16T15:46:17", "links": [{"href": "http://10.0.2.15:8004/v1/22d7c00be7c44b08a22682da990f01f6/stacks/wordpress-app-cf218cb0-7aee-4a8f-9dfc-f44220d0d65a/0e2507f8-14c7-49d4-82d8-c257aa03e546", "rel": "self"}], "capabilities": [], "notification_topics": [], "updated_time": null, "timeout_mins": null, "stack_status": "CREATE_FAILED", "stack_owner": null, "parameters": {"OS::project_id": "22d7c00be7c44b08a22682da990f01f6", "public_net": "08490182-5a93-4e05-9e25-7ca86876d5dd", "OS::stack_name": "wordpress-app-cf218cb0-7aee-4a8f-9dfc-f44220d0d65a", "key_name": "", "image": "4747c66f-56d5-4ceb-bb73-3d81cbb223c6", "OS::stack_id": "0e2507f8-14c7-49d4-82d8-c257aa03e546", "private_subnet": "c128717e-0c76-4876-a1fd-2e3a4fdb6a7b", "private_net": "61206617-12c0-44b6-bf77-eedf77411600", "flavor": "m1.small", "port": "80", "app_name": "wordpress-app"}, "id": "0e2507f8-14c7-49d4-82d8-c257aa03e546", "outputs": [{"output_value": "http://172.24.4.7:80", "output_key": "URL", "description": "The URL for the Server."}, {"output_value": "172.24.4.7", "output_key": "public_ip", "description": "The public IP address of the newly configured Server."}], "template_description": "Basic app deploy.\n"}}
Notice that the heat stack-create output contains reason for failing the stack-create call. We should convey this reason in the app-specific logs as well.