prabhas
prabhas

Reputation: 51

Unable to create openwhisk trigger on ubuntu local machine with /whisk.system/alarms/alarm feed

I was able to install the system package for alarms successfully, mostly following the link https://github.com/apache/incubator-openwhisk-package-alarms/issues/51#issuecomment-294010619

So, I get the following: bin/wsk package get --summary /whisk.system/alarms --insecure package /whisk.system/alarms: Alarms and periodic utility (parameters: *apihost, *cron, *trigger_payload) feed /whisk.system/alarms/alarm: Fire trigger when alarm occurs (parameters: none defined)

Features like actions, triggers, rules are working on my local openwhisk installation.

I am running the command to create a trigger as follows: bin/wsk trigger create convertTriggerPeriodic --feed /whisk.system/alarms/alarm -p cron "*/9 * * * * *" -p trigger_payload "{\"name\":\"Odin\",\"place\":\"Asgard\"}" -p maxTriggers 6 --insecure

ok: invoked /whisk.system/alarms/alarm with id d5879ab1c97745c9879ab1c977c5c967
{
    "activationId": "d5879ab1c97745c9879ab1c977c5c967",
    "annotations": [
        {
            "key": "limits",
            "value": {
                "logs": 10,
                "memory": 256,
                "timeout": 60000
            }
        },
        {
            "key": "path",
            "value": "whisk.system/alarms/alarm"
        }
    ],
    "duration": 6402,
    "end": 1508984964595,
    "logs": [],
    "name": "alarm",
    "namespace": "guest",
    "publish": false,
    "response": {
        "result": {
            "error": {
                "code": 30810,
                "error": "There was an error processing your request."
            }
        },
        "status": "application error",
        "success": false
    },
    "start": 1508984958193,
    "subject": "guest",
    "version": "0.0.2"
}
ok: invoked /whisk.system/alarms/alarm with id 4fd67308821e4e0b967308821e4e0bdb
{
    "activationId": "4fd67308821e4e0b967308821e4e0bdb",
    "annotations": [
        {
            "key": "limits",
            "value": {
                "logs": 10,
                "memory": 256,
                "timeout": 60000
            }
        },
        {
            "key": "path",
            "value": "whisk.system/alarms/alarm"
        }
    ],
    "duration": 4432,
    "end": 1508984969257,
    "logs": [],
    "name": "alarm",
    "namespace": "guest",
    "publish": false,
    "response": {
        "result": {
            "error": {
                "code": 30822,
                "error": "There was an error processing your request."
            }
        },
        "status": "application error",
        "success": false
    },
    "start": 1508984964825,
    "subject": "guest",
    "version": "0.0.2"
}
ok: deleted trigger convertTriggerPeriodic
Run 'wsk --help' for usage.

It is running the trigger twice. Each time, it is reporting error: "error": "There was an error processing your request." Then it is deleting the trigger.

So there is no way I can associate a rule /action with the trigger.

Upvotes: 0

Views: 278

Answers (1)

Jason Peterson
Jason Peterson

Reputation: 1

It looks like the alarms action was not installed properly. The directions listed in https://github.com/apache/incubator-openwhisk-package-alarms/issues/51 still work for running the alarms docker container, but are out-of-date for installing the action. Please see the comment I had made on July 21 (https://github.com/apache/incubator-openwhisk-package-alarms/issues/51#issuecomment-317007147) in this issue. The parameters for installCatalog.sh have changed. If you are having trouble following the install steps in this issue you can also checkout the comment I had left on August 9th (https://github.com/apache/incubator-openwhisk-package-alarms/issues/51#issuecomment-321320242). It contains a link to some ansible code I had written to handle the install for you.

Upvotes: 0

Related Questions