djzager / fail-apb

An APB for failures
0 stars 0 forks source link

Provision failed after chose the "faileddeprovision" plan #1

Closed jianzhangbjz closed 6 years ago

jianzhangbjz commented 6 years ago

Hi, David

Thanks your example apb, I used it smotthly before. But, now, it works failed. Please help to check it, details as the below:

Steps: 1, Provision the "Fail(APB)" and chose the plan "faileddeprovison", but provision failed. 2, The ASB logs:

[2017-11-20T09:03:52.616Z] [DEBUG] ExecutingApb:
[2017-11-20T09:03:52.616Z] [DEBUG] name:[ dh-fail-apb ]
[2017-11-20T09:03:52.616Z] [DEBUG] image:[ docker.io/zjianbjz/fail-apb:latest ]
[2017-11-20T09:03:52.616Z] [DEBUG] action:[ provision ]
[2017-11-20T09:03:52.616Z] [DEBUG] pullPolciy:[ IfNotPresent ]
[2017-11-20T09:03:52.616Z] [DEBUG] role:[ edit ]
[2017-11-20T09:03:52.619Z] [DEBUG] Creating resource file dir: /tmp/asb-resource-files
[2017-11-20T09:03:52.619Z] [DEBUG] Creating resource file /tmp/asb-resource-files/apb-999624b3-91b0-49c6-b17e-a34183323b70.yaml
[2017-11-20T09:03:52.619Z] [INFO] Successfully wrote resources to /tmp/asb-resource-files/apb-999624b3-91b0-49c6-b17e-a34183323b70.yaml
[2017-11-20T09:03:52.619Z] [DEBUG] Trying to create apb sandbox: [ apb-999624b3-91b0-49c6-b17e-a34183323b70 ], with  edit permissions in namespace dh-fail-apb-prov-dmc2q
[2017-11-20T09:03:52.619Z] [DEBUG] Creating resources from file at path: /tmp/asb-resource-files/apb-999624b3-91b0-49c6-b17e-a34183323b70.yaml
[2017-11-20T09:03:52.847Z] [DEBUG] Successfully created resources, oc create -f output:
[2017-11-20T09:03:52.847Z] [DEBUG] 
serviceaccount "apb-999624b3-91b0-49c6-b17e-a34183323b70" created
rolebinding "apb-999624b3-91b0-49c6-b17e-a34183323b70" created
rolebinding "apb-999624b3-91b0-49c6-b17e-a34183323b70" created

[2017-11-20T09:03:52.847Z] [INFO] Successfully created apb sandbox: [ apb-999624b3-91b0-49c6-b17e-a34183323b70 ], with edit permissions in namespace dh-fail-apb-prov-dmc2q
[2017-11-20T09:03:52.847Z] [NOTICE] Creating pod "apb-999624b3-91b0-49c6-b17e-a34183323b70" in the dh-fail-apb-prov-dmc2q namespace
[2017-11-20T09:03:52.853Z] [DEBUG] Calling monitorOutput on apb-999624b3-91b0-49c6-b17e-a34183323b70
[2017-11-20T09:03:53.037Z] [INFO] error: unable to upgrade connection: container not found ("apb")

[2017-11-20T09:03:53.037Z] [WARNING] [apb-999624b3-91b0-49c6-b17e-a34183323b70] Retry attempt 1: Failed to exec into the container
[2017-11-20T09:03:53.037Z] [WARNING] [apb-999624b3-91b0-49c6-b17e-a34183323b70] Retry attempt 1: exec into apb-999624b3-91b0-49c6-b17e-a34183323b70 failed
[2017-11-20T09:03:53.408Z] [DEBUG] service_id: 3b18d5937f0cbb99ee6693993a525be7
[2017-11-20T09:03:53.408Z] [DEBUG] plan_id: ad6c2c719689b006d39bef0bc8c03fa7
[2017-11-20T09:03:53.408Z] [DEBUG] operation:  2969b491-6ae9-47a3-97ef-b10a334862b1
[2017-11-20T09:03:53.408Z] [DEBUG] state: in progress
10.128.0.3 - - [20/Nov/2017:09:03:53 +0000] "GET /ansible-service-broker/v2/service_instances/dafba7b0-7f05-4493-9682-57614fa4a5e7/last_operation?operation=2969b491-6ae9-47a3-97ef-b10a334862b1&plan_id=ad6c2c719689b006d39bef0bc8c03fa7&service_id=3b18d5937f0cbb99ee6693993a525be7 HTTP/1.1" 200 29
[2017-11-20T09:03:57.42Z] [DEBUG] service_id: 3b18d5937f0cbb99ee6693993a525be7
[2017-11-20T09:03:57.42Z] [DEBUG] plan_id: ad6c2c719689b006d39bef0bc8c03fa7
[2017-11-20T09:03:57.42Z] [DEBUG] operation:  2969b491-6ae9-47a3-97ef-b10a334862b1
[2017-11-20T09:03:57.421Z] [DEBUG] state: in progress
10.128.0.3 - - [20/Nov/2017:09:03:57 +0000] "GET /ansible-service-broker/v2/service_instances/dafba7b0-7f05-4493-9682-57614fa4a5e7/last_operation?operation=2969b491-6ae9-47a3-97ef-b10a334862b1&plan_id=ad6c2c719689b006d39bef0bc8c03fa7&service_id=3b18d5937f0cbb99ee6693993a525be7 HTTP/1.1" 200 29
[2017-11-20T09:03:58.201Z] [NOTICE] [apb-999624b3-91b0-49c6-b17e-a34183323b70] APB failed
[2017-11-20T09:03:58.201Z] [INFO] Destroying APB sandbox...
[2017-11-20T09:03:58.203Z] [DEBUG] Keeping namespace alive due to configuration
[2017-11-20T09:03:58.203Z] [DEBUG] Deleting rolebinding apb-999624b3-91b0-49c6-b17e-a34183323b70, namespace dh-fail-apb-prov-dmc2q
[2017-11-20T09:03:58.385Z] [DEBUG] Successfully deleted rolebinding apb-999624b3-91b0-49c6-b17e-a34183323b70, namespace dh-fail-apb-prov-dmc2q
[2017-11-20T09:03:58.385Z] [DEBUG] oc delete output:
[2017-11-20T09:03:58.385Z] [DEBUG] rolebinding "apb-999624b3-91b0-49c6-b17e-a34183323b70" deleted

[2017-11-20T09:03:58.385Z] [DEBUG] Deleting rolebinding apb-999624b3-91b0-49c6-b17e-a34183323b70, namespace test1
[2017-11-20T09:03:58.58Z] [DEBUG] Successfully deleted rolebinding apb-999624b3-91b0-49c6-b17e-a34183323b70, namespace test1
[2017-11-20T09:03:58.58Z] [DEBUG] oc delete output:
[2017-11-20T09:03:58.58Z] [DEBUG] rolebinding "apb-999624b3-91b0-49c6-b17e-a34183323b70" deleted

[2017-11-20T09:03:58.58Z] [ERROR] apb::provision error occurred
[2017-11-20T09:03:58.58Z] [ERROR] APB failed
[2017-11-20T09:03:58.58Z] [ERROR] broker::Provision error occurred.
[2017-11-20T09:03:58.58Z] [ERROR] APB failed
[2017-11-20T09:03:58.58Z] [DEBUG] Processed provision message from buffer
[2017-11-20T09:03:58.58Z] [ERROR] Provision job reporting error: APB failed
[2017-11-20T09:04:05.441Z] [DEBUG] service_id: 3b18d5937f0cbb99ee6693993a525be7
[2017-11-20T09:04:05.441Z] [DEBUG] plan_id: ad6c2c719689b006d39bef0bc8c03fa7
[2017-11-20T09:04:05.441Z] [DEBUG] operation:  2969b491-6ae9-47a3-97ef-b10a334862b1
[2017-11-20T09:04:05.442Z] [DEBUG] state: failed

So, I think it maybe need to be update, hence, I intended to create a same example APB by myself, but I could NOT find a way that settup multi plans tied to different task by go through the APB Developer Guide quickly. :( Below is my example apb structure:

[root@localhost test-apb]# tree
.
├── apb.yml
├── Dockerfile
├── playbooks
│   ├── deprovision.yml
│   └── provision.yml
└── roles
    ├── deprovision-test-apb
    │   └── tasks
    │       └── main.yml
    └── provision-test-apb
        └── tasks
            └── main.yml

If I config multi plans in apb.yml, how to config these plans to tie to different tasks? Thanks! :)

jianzhangbjz commented 6 years ago

Closed this issue, for I have created a new APB image, :) its code is here: example.