nearform / nscale

Deployment just got easy
http://nscale.nearform.com/
Artistic License 2.0
325 stars 23 forks source link

can't deploy #55

Closed juliangruber closed 9 years ago

juliangruber commented 9 years ago

Running the example from the README, this happens (i abbreviated the output of the revision lists):

 ∴  ~ : nsd revision list nscaledemo
revision             deployed who                                                     time                      description
526290ed70531d36471… false    Julian Gruber <julian@juliangruber.com>                 2014-12-24T09:01:26.000Z  built container: web
...
 ∴  ~ : nsd revision deploy nscaledemo 526290ed70531d36471
not ok!
ERROR: Server disconnected abruptly.
 ∴  ~ : nsd revision list nscaledemo
Server disconnected with an error:
not ok!
ERROR: connect ECONNREFUSED
 ∴  ~ : nsd server stop
nscale servers stopping..
done!
 ∴  ~ : nsd server start
nscale servers starting..
done!
 ∴  ~ : nsd revision list nscaledemo
revision             deployed who                                                     time                      description
526290ed70531d36471… false    Julian Gruber <julian@juliangruber.com>                 2014-12-24T09:01:26.000Z  built container: web
...
 ∴  ~ : nsd revision deploy nscaledemo 526290ed70531d36471
not ok!
ERROR: Server disconnected abruptly.
 ∴  ~ : nsd server logs
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"booting","time":"2014-12-24T09:05:22.734Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"starting operations","time":"2014-12-24T09:05:23.817Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"module":"docker","level":30,"target":"192.168.59.103","identityFile":"/Users/julian/.ssh/id_boot2docker","user":"docker","port":8011,"retries":50,"msg":"SSH tunnel setted up","time":"2014-12-24T09:05:24.205Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"module":"docker","level":30,"port":8011,"path":"/Users/julian/.nscale/data/registry","msg":"registry started","time":"2014-12-24T09:05:24.235Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rcv: token","time":"2014-12-24T09:05:24.688Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rcv: revision list","time":"2014-12-24T09:05:24.693Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"list revisions: nscaledemo","time":"2014-12-24T09:05:24.693Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rsp: list revisions nscaledemo","time":"2014-12-24T09:05:24.703Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rcv: quit","time":"2014-12-24T09:05:24.817Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rsp: quit","time":"2014-12-24T09:05:24.817Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rcv: token","time":"2014-12-24T09:05:39.333Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"rcv: revision deploy","time":"2014-12-24T09:05:39.336Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"deploy revision: nscaledemo, 526290ed70531d36471","time":"2014-12-24T09:05:39.337Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"system":"nscaledemo","msg":"analyze system","time":"2014-12-24T09:05:39.345Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"get deployed system: e1144711-47bb-5931-9117-94f01dd20f6f","time":"2014-12-24T09:05:39.345Z","v":0}
{"name":"nfd-kernel","hostname":"Julians-MBP","pid":4971,"level":30,"msg":"get head system: e1144711-47bb-5931-9117-94f01dd20f6f","time":"2014-12-24T09:05:39.347Z","v":0}
node(4971,0x7fff75082300) malloc: *** error for object 0x100c10fb0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
^C ∴  ~ : node -v
v0.10.32

I'll try with newer node soon.

juliangruber commented 9 years ago

ah, i guess updating node on the host doesn't make sense for this bug. or at least it didn't change anything

mcollina commented 9 years ago

This is really weird. Can you please give me some more details on your OS? On Yosemite it works really fine on node v0.10.33. So, it is not a node problem.

mcollina commented 9 years ago

Ok, I reinstalled and replicated the issue. It seems there was a new release of nodegit, and they broke something. Or more likely something got broken by the recent GIT fixes libgit2 released. I will investigate.

mcollina commented 9 years ago

It seems peculiar to nscaledemo. Let me check some more.

mcollina commented 9 years ago

If you want, you can go ahead and follow https://github.com/nearform/nscale-workshop/blob/master/ex2.md.

mcollina commented 9 years ago

nodegit 0.2.3 does not trigger the bug.

mcollina commented 9 years ago

@juliangruber you can install nscale@next, it has the nodegit version fixed to 0.2.3.

juliangruber commented 9 years ago

still the same oO

node(5207,0x7fff75082300) malloc: *** error for object 0x100d389b0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

do i need to do more than

$ nsd cont build nscaledemo web
$ # find latest revision
$ nsd revision deploy nscaledemo 526290ed70531d36471
mcollina commented 9 years ago

Nope, try:

npm uninstall nscale -g
npm install nscale@next -g

And then again with the content of the README.

mcollina commented 9 years ago

nscale@next has the fixed version of nodegit that does not crash over here :(.

juliangruber commented 9 years ago

great, that worked! thanks