mayadata-io / oep-e2e

Plan tests and run them for OpenEBS Enterprise Platform
Apache License 2.0
6 stars 10 forks source link

Openebs reinstall job is failing in pipelines #820

Closed amitbhatt818 closed 4 years ago

amitbhatt818 commented 4 years ago

What happened ?

Error message:

TASK [Giving required variables for openebs installation] **********************
fatal: [127.0.0.1]: FAILED! => {"changed": false, "connection": "close", "content": "{\"id\":\"2422144d-86ab-4bfe-9fd7-7c6263c92c0a\",\"type\":\"error\",\"links\":{},\"actions\":{},\"status\":409,\"code\":\"Conflict\",\"message\":\"Conflict\",\"detail\":null,\"baseType\":\"error\"}", "content_length": "169", "content_type": "application/json; charset=utf-8", "date": "Thu, 23 Jul 2020 05:59:12 GMT", "elapsed": 0, "expires": "Thu, 01 Jan 1970 00:00:00 GMT", "json": {"actions": {}, "baseType": "error", "code": "Conflict", "detail": null, "id": "2422144d-86ab-4bfe-9fd7-7c6263c92c0a", "links": {}, "message": "Conflict", "status": 409, "type": "error"}, "msg": "Status code was 409 and not [405]: HTTP Error 409: Conflict", "redirected": false, "set_cookie": "PL=DirectorOnline;Path=/", "status": 409, "url": "http://10.43.10.13/v3/groups/1a22/clusters/1c4/openebses", "x_api_account_id": "1a22", "x_api_client_ip": "10.68.10.16", "x_api_roles": "ProjectOwner", "x_api_schemas": "http://10.43.10.13/v3/groups/1a22/schemas", "x_api_user_id": "1a21"}
amitbhatt818 commented 4 years ago

Task which is getting failed.

        - name: Giving required variables for openebs installation
          uri:
            url: "{{ director_url }}/v3/groups/{{ group_id }}/clusters/{{ cluster_id }}/openebses"
            method: POST
            url_username: "{{ username.stdout }}"
            url_password: "{{ password.stdout }}"
            force_basic_auth: yes
            return_content: yes
            body_format: json
            body: '{ "clusterId": "{{ cluster_id }}","creatorId": "{{ group_id }}","projectId": "{{ project_id }}","templateId": "{{ template_id }}","namespace": "{{ namespace }}","defaultDirectory": "{{ default_directory }}","dockerRegistry": "{{ docker_registry }}","includeDeviceFilters": "{{ include_device_filters }}","excludeDeviceFilters": "{{ exclude_device_filters }}","cpuResourceLimit": "{{ cpu_resource_limit }}","memoryResourceLimit": " {{ memory_resource_limit }}","installationMode": "{{ installation_mode }}" }'         
            status_code: 405
          register: get_openebs
amitbhatt818 commented 4 years ago

MoM with @sagarkrsd

1. We need to add one check before giving post request to reinstall openebs which will validate if openbes is installed or not.
2. The task should look for active openebes entry in the cluster.