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

make create-provider-alarms broken #333

Open
drandreas opened this issue Jun 20, 2021 · 3 comments
Open

make create-provider-alarms broken #333

drandreas opened this issue Jun 20, 2021 · 3 comments

Comments

@drandreas
Copy link

drandreas commented Jun 20, 2021

It looks like the various openwhisk/x:nightly versions do not match currently.

make quick-start
make add-catalog
make create-provider-alarms

fails with:

npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN [email protected] No description
npm WARN [email protected] No repository field.
npm WARN [email protected] No license field.

added 62 packages from 128 contributors and audited 62 packages in 2.446s

2 packages are looking for funding
  run `npm fund` for details

found 0 vulnerabilities

+ rm -rf alarmFeed.zip
+ zip -r alarmFeed.zip lib package.json alarm.js -q
+ /root/openwhisk-devtools/docker-compose/openwhisk-src/bin/wsk -i --apihost 192.168.5.55 action update --kind nodejs:14 --auth 789c46b1-71f6-4ed5-8c54-816aa4f8c502:abczO3xZCLrMN6v2BKK1dXYFpXlPkccOFqm12CdAsMgRU4VrNZ9lyGVCGuMDGIwP alarms/alarm /root/openwhisk-devtools/docker-compose/openwhisk-package-alarms/action/alarmFeed.zip -a description 'Fire trigger when alarm occurs' -a parameters '[ {"name":"cron", "required":true}, {"name":"timezone", "required":false}, {"name":"startDate", "required":false}, {"name":"stopDate", "required":false}, {"name":"strict", "required":false} ]' -a feed true
error: Unable to create action 'alarms/alarm': The 'nodejs:14' runtime is no longer supported. You may read and delete but not update or invoke this action. (code eh1yIZFQHYxz2eDlL4DT7ytbynsYBA4v)

If I patch installCatalog.sh to use nodjs:12 the installation succeeds and the alarm provider is starting up:

Fetch the logs of a container
[root@k8 docker-compose]# docker logs openwhisk_alarmsprovider_1
[2021-06-20T19:07:13.251Z] [INFO] [??] [alarmsTrigger] [createDatabase] creating the trigger database
[2021-06-20T19:07:13.273Z] [INFO] [??] [alarmsTrigger] [server.listen] Express server listening on port 8080
[2021-06-20T19:07:13.311Z] [INFO] [??] [alarmsTrigger] [createDatabase] created trigger database: local_alarmservice
[2021-06-20T19:07:13.543Z] [INFO] [??] [alarmsTrigger] [initActiveHost] redis hset local_alarmservice_worker0 active host0
[2021-06-20T19:07:13.549Z] [INFO] [??] [alarmsTrigger] [initAllTriggers] resetting system from last state
[root@k8 docker-compose]# 

However alarms can not be scheduled - create trigger fails with an internal error.

wsk -i trigger create every-min --feed /whisk.system/alarms/alarm --param cron "* * * * *"
{
    "activationId": "0574e75b897446acb4e75b897416ac45",
    "annotations": [
        {
            "key": "path",
            "value": "whisk.system/alarms/alarm"
        },
        {
            "key": "waitTime",
            "value": 27354
        },
        {
            "key": "kind",
            "value": "nodejs:12"
        },
        {
            "key": "timeout",
            "value": false
        },
        {
            "key": "limits",
            "value": {
                "concurrency": 1,
                "logs": 10,
                "memory": 256,
                "timeout": 60000
            }
        },
        {
            "key": "initTime",
            "value": 286
        }
    ],
    "duration": 1958,
    "end": 1624216232010,
    "logs": [],
    "name": "alarm",
    "namespace": "guest",
    "publish": false,
    "response": {
        "result": {
            "error": {}
        },
        "size": 12,
        "status": "application error",
        "success": false
    },
    "start": 1624216230052,
    "subject": "guest",
    "version": "0.0.1"
}

wsk -i activation poll                                                                    
Enter Ctrl-c to exit.
Polling for activation logs

Activation: 'alarm' (93ea2f86360e4facaa2f86360ecfac5d)
[
    "2021-06-20T19:10:32.519601981Z stdout: alarm: Error invoking whisk action: 204 <Buffer >"
]

Activation: 'alarm' (0574e75b897446acb4e75b897416ac45)
[
    "2021-06-20T19:10:32.0062408Z   stdout: alarm: Error invoking whisk action: 204 <Buffer >"
]

I can't find any debug output that would point to the source of the issue.

@drandreas
Copy link
Author

Addendum:

If I patch docker-compose/docker-whisk-controller.env to list nodejs:14 the alarms invocation runs with nodjs:14 but still fails.

{
    "activationId": "91af09a198bb48adaf09a198bb28ad7a",
    "annotations": [
        {
            "key": "path",
            "value": "whisk.system/alarms/alarm"
        },
        {
            "key": "waitTime",
            "value": 12169
        },
        {
            "key": "kind",
            "value": "nodejs:14"
        },
        {
            "key": "timeout",
            "value": false
        },
        {
            "key": "limits",
            "value": {
                "concurrency": 1,
                "logs": 10,
                "memory": 256,
                "timeout": 60000
            }
        },
        {
            "key": "initTime",
            "value": 283
        }
    ],
    "duration": 2161,
    "end": 1624217841986,
    "logs": [],
    "name": "alarm",
    "namespace": "guest",
    "publish": false,
    "response": {
        "result": {
            "error": {}
        },
        "size": 12,
        "status": "application error",
        "success": false
    },
    "start": 1624217839825,
    "subject": "guest",
    "version": "0.0.1"
}

@drandreas
Copy link
Author

I found the issue. Line 507 of docker-compose/Makefile passes the arguments in wrong order:

$(shell cat $(TMP_HOME)/tmp/openwhisk/providers.env) ./installCatalog.sh $(realpath $(OPENWHISK_PROJECT_HOME))/ansible/files/auth.whisk.system $(DOCKER_HOST_IP) $(DOCKER_HOST_IP) "http://$(DOCKER_HOST_IP):5984" $(OPEN_WHISK_DB_PREFIX) $(DOCKER_HOST_IP) \

@rabbah
Copy link
Member

rabbah commented Jun 28, 2021

@drandreas PRs welcome and appreciated 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants