apocas / dockerode

Docker + Node = Dockerode (Node.js module for Docker's Remote API)
Apache License 2.0
4.33k stars 460 forks source link

Node.prototype.update fails with invalid node version error #381

Closed aliabbas00 closed 6 years ago

aliabbas00 commented 7 years ago

Docker API for Swarm node update require "node version/sequence" number to be appended to querystring. This sequence number changes each time a successful update is committed to swarm cluster.

Node module is not appending the version/sequence number as querystring when making a POST request for node update which is causing the request to fail.

apocas commented 7 years ago

Example with a service, you may also check the secret test which does exactly the same.

https://github.com/apocas/dockerode/blob/ce60eaa62f1e096068b45a5d0a504425b8594008/test/swarm.js#L210