cocaine/cocaine-core

Cocaine doesn't use "spool" config path

mwf opened this issue · 2 comments

mwf commented

Hi!

Cocaine-core version 0.11.2.2, the latest commit in v0.11 branch.
OS: Mac OS X 10.9.2
Cocaine installed to /usr/local/...
Started with /usr/local/bin/cocaine-runtime --configuration /usr/local/etc/cocaine/cocaine-default.conf
Pathes in cocaine config defined like this:

    "paths": {
        "plugins": "/usr/local/lib/cocaine",
        "runtime": "/usr/local/var/run/cocaine",
        "spool": "/usr/local/var/spool/cocaine"
    },
...
    "storages": {
        "core": {
            "type": "files",
            "args": {
                "path": "/usr/local/var/lib/cocaine"
            }
        }
    },

All paths does exist and are readable/writable for cocaine-runtime owner-user.

Profiles, manifests and apps upload works fine from cocaine-tool.
Everything lives in /usr/local/var/lib/cocaine/ ... Fine.

But app start fails!
The cocaine log sais:

[Mon Mar 17 20:42:31 2014] [INFO] service/node: starting the 'login' app
[Mon Mar 17 20:42:31 2014] [DEBUG] storage/core: reading object 'login', collection: manifests, path: "/usr/local/var/lib/cocaine/manifests/login"
[Mon Mar 17 20:42:31 2014] [DEBUG] storage/core: reading object 'TestProfile', collection: profiles, path: "/usr/local/var/lib/cocaine/profiles/TestProfile"
[Mon Mar 17 20:42:31 2014] [INFO] app/login: deploying the app to '"/var/spool/cocaine/login"'
[Mon Mar 17 20:42:31 2014] [DEBUG] storage/core: reading object 'login', collection: apps, path: "/usr/local/var/lib/cocaine/apps/login"
[Mon Mar 17 20:42:31 2014] [INFO] packaging: compression: gzip, size: 561 bytes
[Mon Mar 17 20:42:31 2014] [DEBUG] packaging: extracting "/var/spool/cocaine/login/login_worker.py"
[Mon Mar 17 20:42:31 2014] [ERROR] app/login: unable to extract the app files - Can't create '/var/spool/cocaine/login/login_worker.py'
[Mon Mar 17 20:42:31 2014] [ERROR] service/node: unable to initialize the 'login' app - the 'login' app is not available

You see? Cocaine tries to deploy app to /var/spool/... instead of configured /usr/local/var/spool/...!

Recently we started to use Docker as alternative isolation system. It has own spool, thus for default process isolation spool parameter is now specified in profile.

For example:

{
    "isolate": {
        "args": {
            "spool": "/Users/esafronov/cocaine/var/spool/cocaine"
        },
        "type": "process"
    }
}
mwf commented

Thanks!

Don't forget to update docs ;)