Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Events for failures don't provide nice messages #1607

Closed
tomkerkhove opened this issue Feb 15, 2021 · 2 comments
Closed

Events for failures don't provide nice messages #1607

tomkerkhove opened this issue Feb 15, 2021 · 2 comments
Assignees
Labels
bug Something isn't working stale All issues that are marked as stale due to inactivity

Comments

@tomkerkhove
Copy link
Member

Report

All our events around failure currently just contain log lines with are not really nice from a consumer perspective.

We should try to improve them so that it's more user friendly.

Expected Behavior

Example:

{
    "apiVersion": "v1",
    "count": 1,
    "eventTime": null,
    "firstTimestamp": "2021-02-12T20:42:20Z",
    "involvedObject": {
        "apiVersion": "keda.sh/v1alpha1",
        "kind": "ScaledObject",
        "name": "demo-worker",
        "namespace": "foo",
        "resourceVersion": "2016373",
        "uid": "1dac27a7-7d0f-48a9-8688-12b9fb47ff82"
    },
    "kind": "Event",
    "lastTimestamp": "2021-02-12T20:42:20Z",
    "message": "Azure Storage Queue scaler failed - Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. The MAC signature found in the HTTP request 'PxtGA2B+o/LIu5Lz5k9Hj6X9EKqp9gQmlnEBE9j+Fws=' is not the same as any computed signature.",
    "metadata": {
        "creationTimestamp": "2021-02-12T20:42:20Z",
        "managedFields": [
            {
                "apiVersion": "v1",
                "fieldsType": "FieldsV1",
                "manager": "keda",
                "operation": "Update",
                "time": "2021-02-12T20:42:20Z"
            }
        ],
        "name": "demo-worker.16631ac897e95e20",
        "namespace": "foo",
        "resourceVersion": "2017169",
        "selfLink": "/api/v1/namespaces/foo/events/demo-worker.16631ac897e95e20",
        "uid": "a260a113-c1a7-4acb-9764-3c50dfaf3ec4"
    },
    "reason": "KEDAScalerFailed",
    "reportingComponent": "",
    "reportingInstance": "",
    "source": {
        "component": "keda-operator"
    },
    "type": "Warning"
}

Actual Behavior

Example:

{
    "apiVersion": "v1",
    "count": 1,
    "eventTime": null,
    "firstTimestamp": "2021-02-12T20:42:20Z",
    "involvedObject": {
        "apiVersion": "keda.sh/v1alpha1",
        "kind": "ScaledObject",
        "name": "demo-worker",
        "namespace": "foo",
        "resourceVersion": "2016373",
        "uid": "1dac27a7-7d0f-48a9-8688-12b9fb47ff82"
    },
    "kind": "Event",
    "lastTimestamp": "2021-02-12T20:42:20Z",
    "message": "-\u003e github.com/Azure/azure-storage-queue-go/azqueue.newStorageError, /go/pkg/mod/github.com/!azure/azure-storage-queue-go@v0.0.0-20191125232315-636801874cdd/azqueue/zc_storage_error.go:42\n===== RESPONSE ERROR (ServiceCode=AuthenticationFailed) =====\nDescription=Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\nRequestId:a765bfd5-5003-0074-1a7f-01ef55000000\nTime:2021-02-12T20:42:20.3372554Z, Details: \n   AuthenticationErrorDetail: The MAC signature found in the HTTP request 'PxtGA2B+o/LIu5Lz5k9Hj6X9EKqp9gQmlnEBE9j+Fws=' is not the same as any computed signature. Server used following string to sign: 'GET\n\n\n\n\n\n\n\n\n\n\n\nx-ms-client-request-id:d98a0219-7b32-458a-629c-f43808e3128f\nx-ms-date:Fri, 12 Feb 2021 20:42:20 GMT\nx-ms-version:2018-03-28\n/ahmelsbugbashstorage/js-queue-items\ncomp:metadata\ntimeout:61'.\n   Code: AuthenticationFailed\n   GET https://ahmelsbugbashstorage.queue.core.windows.net/js-queue-items?comp=metadata\u0026timeout=61\n   Authorization: REDACTED\n   User-Agent: [Azure-Storage/0.3 (go1.15.6; linux)]\n   X-Ms-Client-Request-Id: [d98a0219-7b32-458a-629c-f43808e3128f]\n   X-Ms-Date: [Fri, 12 Feb 2021 20:42:20 GMT]\n   X-Ms-Version: [2018-03-28]\n   --------------------------------------------------------------------------------\n   RESPONSE Status: 403 Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature.\n   Content-Length: [750]\n   Content-Type: [application/xml]\n   Date: [Fri, 12 Feb 2021 20:42:20 GMT]\n   Server: [Microsoft-HTTPAPI/2.0]\n   X-Ms-Error-Code: [AuthenticationFailed]\n   X-Ms-Request-Id: [a765bfd5-5003-0074-1a7f-01ef55000000]\n\n\n",
    "metadata": {
        "creationTimestamp": "2021-02-12T20:42:20Z",
        "managedFields": [
            {
                "apiVersion": "v1",
                "fieldsType": "FieldsV1",
                "manager": "keda",
                "operation": "Update",
                "time": "2021-02-12T20:42:20Z"
            }
        ],
        "name": "demo-worker.16631ac897e95e20",
        "namespace": "foo",
        "resourceVersion": "2017169",
        "selfLink": "/api/v1/namespaces/foo/events/demo-worker.16631ac897e95e20",
        "uid": "a260a113-c1a7-4acb-9764-3c50dfaf3ec4"
    },
    "reason": "KEDAScalerFailed",
    "reportingComponent": "",
    "reportingInstance": "",
    "source": {
        "component": "keda-operator"
    },
    "type": "Warning"
}

Steps to Reproduce the Problem

  1. Create an invalid scaler
  2. Wait for events

Logs from KEDA operator

N/A

KEDA Version

No response

Kubernetes Version

No response

Platform

No response

Scaler Details

All

Relates to #530

@tomkerkhove tomkerkhove added the bug Something isn't working label Feb 15, 2021
@stale
Copy link

stale bot commented Oct 13, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale All issues that are marked as stale due to inactivity label Oct 13, 2021
@stale
Copy link

stale bot commented Oct 20, 2021

This issue has been automatically closed due to inactivity.

@stale stale bot closed this as completed Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale All issues that are marked as stale due to inactivity
Projects
None yet
Development

No branches or pull requests

2 participants