serverless / serverless-kubeless

This plugin enables support for Kubeless within the Serverless Framework.
Apache License 2.0
303 stars 81 forks source link

Deployment of functions is failing on new release of Kubeless 0.3.2 with error "spec.ports: Required value" #98

Closed vishweshwarp closed 6 years ago

vishweshwarp commented 6 years ago

Tried deploying a very basic python function. Looks like this issue is due to newly added custom port support in latest kubeless release (0.3.2)

Serverless deploy log:

root@vishu-dev-vm:/workspace/devops-insight/functions/new-project# serverless deploy -v
Serverless: Load command run
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command login
Serverless: Load command logout
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command emit
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command info
Serverless: Load command logs
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Deploying function hello...
Serverless: Unable to find any running pod for hello. Retrying...
Serverless: Unable to find any running pod for hello. Retrying...
Serverless: Unable to find any running pod for hello. Retrying...
Serverless: Unable to find any running pod for hello. Retrying...
Serverless: Giving up, unable to retrieve the status of the hello deployment.
/workspace/devops-insight/functions/new-project/node_modules/bluebird/js/release/async.js:61
        fn = function () { throw arg; };
                           ^

Error: Unable to retrieve the status of the hello deployment
    at module.exports.logError (/root/.nvm/versions/node/v8.9.3/lib/node_modules/serverless/lib/classes/Error.js:94:11)
    at process.on (/root/.nvm/versions/node/v8.9.3/lib/node_modules/serverless/bin/serverless:21:3)
    at emitTwo (events.js:126:13)
    at process.emit (events.js:214:7)
    at methodName (/workspace/devops-insight/functions/new-project/node_modules/bluebird/js/release/debuggability.js:189:33)
    at activeFireEvent (/workspace/devops-insight/functions/new-project/node_modules/bluebird/js/release/debuggability.js:232:44)
    at fireRejectionEvent (/workspace/devops-insight/functions/new-project/node_modules/bluebird/js/release/debuggability.js:617:14)
    at Promise._notifyUnhandledRejection (/workspace/devops-insight/functions/new-project/node_modules/bluebird/js/release/debuggability.js:64:9)
    at Timeout._onTimeout (/workspace/devops-insight/functions/new-project/node_modules/bluebird/js/release/debuggability.js:43:14)
    at ontimeout (timers.js:475:11)
    at tryOnTimeout (timers.js:310:5)
    at Timer.listOnTimeout (timers.js:270:5)

Kubeless Controller log:

time="2017-12-29T15:33:47Z" level=info msg="Processing change to Function default/hello" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Function can not be created/updated: Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Error processing default/hello (will retry): Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=info msg="Processing change to Function default/hello" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Function can not be created/updated: Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Error processing default/hello (will retry): Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=info msg="Processing change to Function default/hello" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Function can not be created/updated: Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Error processing default/hello (will retry): Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=info msg="Processing change to Function default/hello" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Function can not be created/updated: Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=error msg="Error processing default/hello (will retry): Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:47Z" level=info msg="Processing change to Function default/hello" pkg=controller
time="2017-12-29T15:33:48Z" level=error msg="Function can not be created/updated: Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:48Z" level=error msg="Error processing default/hello (will retry): Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:48Z" level=info msg="Processing change to Function default/hello" pkg=controller
time="2017-12-29T15:33:49Z" level=error msg="Function can not be created/updated: Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
time="2017-12-29T15:33:49Z" level=error msg="Error processing default/hello (giving up): Service \"hello\" is invalid: spec.ports: Required value" pkg=controller
E1229 15:33:49.543861       1 controller.go:171] Service "hello" is invalid: spec.ports: Required value
sebgoa commented 6 years ago

cc @ngtuna

andresmgot commented 6 years ago

@vishweshwarp the Service specification definition was moved in the latest release from the controller to the Kubeless CLI (https://github.com/kubeless/kubeless/pull/397). We need to adapt this CLI to mimic that behavior.

vishweshwarp commented 6 years ago

@andresmgot are we going to get a new version of serverless-kubeless plugin to fix this issue?

ngtuna commented 6 years ago

@vishweshwarp Yes we are planning to roll out new version of the plugin. At the meantime, we rolled out kubeless v0.3.3 to fix this issue. So if you can upgrade your kubeless to v0.3.3, the plugin will get back to work well.

andresmgot commented 6 years ago

The code is now adapted to define its own service specification (https://github.com/serverless/serverless-kubeless/pull/101) so this issue should be now fixed. The fix will be available in the next serverless-kubeless release but we recommend you to upgrade Kubeless. @vishweshwarp let us know if you still find any issue.