"failed to bootstrap" with git reset error on DigitalOcean


(Sam Bauwens) #1

Hi!

I tried installing discourse on DigitalOcean on a 1GB droplet (with 2GB swap) by exactly following the official guide step by step but when I execute ./launcher bootstrap app, I get the following error:

I, [2014-08-01T12:09:08.214594 #39]  INFO -- : > cd $home && git reset --hard
fatal: Not a git repository (or any of the parent directories): .git
I, [2014-08-01T12:09:08.227842 #39]  INFO -- :
2014-08-01 12:09:08 UTC LOG:  received smart shutdown request
2014-08-01 12:09:08 UTC LOG:  autovacuum launcher shutting down
2014-08-01 12:09:08 UTC LOG:  shutting down
2014-08-01 12:09:08 UTC LOG:  database system is shut down
/pups/lib/pups/exec_command.rb:85:in `spawn': cd $home && git reset --hard failed with return #<Process::Status: pid 174 exit 128> (RuntimeError)
        from /pups/lib/pups/exec_command.rb:55:in `block in run'
        from /pups/lib/pups/exec_command.rb:53:in `each'
        from /pups/lib/pups/exec_command.rb:53:in `run'
        from /pups/lib/pups/command.rb:6:in `run'
        from /pups/lib/pups/config.rb:85:in `block (2 levels) in run_commands'
        from /pups/lib/pups/config.rb:76:in `each'
        from /pups/lib/pups/config.rb:76:in `block in run_commands'
        from /pups/lib/pups/config.rb:75:in `each'
        from /pups/lib/pups/config.rb:75:in `run_commands'
        from /pups/lib/pups/config.rb:71:in `run'
        from /pups/lib/pups/cli.rb:31:in `run'
        from /pups/bin/pups:8:in `<main>'
19b0f111c9aeb955122a0b6eeafd59b93d0169ad6e14fd49c5a1d270f301d009
FAILED TO BOOTSTRAP

Should there be a repo on the $home folder?


(Del Boy Trotter) #2

This is happening for me now - I installed yesterday and everything went fine - now today i get the same as above?


(Del Boy Trotter) #3
I, [2014-08-01T14:41:43.534683 #38]  INFO -- : > cd $home && git reset --hard
fatal: Not a git repository (or any of the parent directories): .git
I, [2014-08-01T14:41:43.556864 #38]  INFO -- :
2014-08-01 14:41:43 UTC LOG:  received smart shutdown request
2014-08-01 14:41:43 UTC LOG:  autovacuum launcher shutting down
2014-08-01 14:41:43 UTC LOG:  shutting down
2014-08-01 14:41:45 UTC LOG:  database system is shut down
/pups/lib/pups/exec_command.rb:85:in `spawn': cd $home && git reset --hard failed with return #<Process::Status: pid 214 exit 128> (RuntimeError)
        from /pups/lib/pups/exec_command.rb:55:in `block in run'
        from /pups/lib/pups/exec_command.rb:53:in `each'
        from /pups/lib/pups/exec_command.rb:53:in `run'
        from /pups/lib/pups/command.rb:6:in `run'
        from /pups/lib/pups/config.rb:85:in `block (2 levels) in run_commands'
        from /pups/lib/pups/config.rb:76:in `each'
        from /pups/lib/pups/config.rb:76:in `block in run_commands'
        from /pups/lib/pups/config.rb:75:in `each'
        from /pups/lib/pups/config.rb:75:in `run_commands'
        from /pups/lib/pups/config.rb:71:in `run'
        from /pups/lib/pups/cli.rb:31:in `run'
        from /pups/bin/pups:8:in `<main>'
c67cfb14c6246d5db315b754ff3d6b3ee2ad946216b2dfc0d81b33bacd0ea9f6
FAILED TO BOOTSTRAP
azureuser@shangrihell:/var/docker$

(Del Boy Trotter) #4

Anyone got any ideas on this? it’s really sucking the jam out of my donut


(Del Boy Trotter) #5

I tried reverting my discourse_docker repo to 4b6456ef9e1c9f9c043e6d1a0acedcc458c247c1 but no luck… not sure where the issue resides so not sure what I need to do


(Jeff Atwood) #6

Does it still happen if you run

./launcher rebuild app

Again?


(Neil Lalonde) #7

For what it’s worth, I bootstrapped a new site on Digital Ocean this morning and didn’t have this problem.


(Marcelo Toscano) #8

Same problem here …


(Adam Capriola) #9

I am getting this error too (1 GB droplet with 2 GB swap).


(Nick Fulcher) #10

Ditto for me. New fresh install and I get this error today.


(Nick Fulcher) #11

Yes, same error if you run ./launcher rebuild app


(Neil Lalonde) #12

I just reproduced this problem too. To fix it, I uncommented the “version: tests-passed” line:

Seems like there’s something wrong if you don’t specify the version in the yml file. Using tests-passed is what I always do because I don’t want to get commits that haven’t been tested.


(Nick Fulcher) #13

This fixed the issue for me.


(Alex) #14

Worked for me too, thanks.


(Jeff Atwood) #15

Why would this suddenly be a problem @sam?


(Sam Saffron) #16

This is @supermathie’s fault

https://github.com/discourse/discourse_docker/commit/1a58daf495070de42840b00e05b860c156d836ef#diff-88f37680d05e1960495df9499f6a40dc

Also, I blame yml for being a stickler.


(Michael Brown) #17

Huh, it parsed as valid yaml. Did whatever use it not expect a blank parameters?

“Yes, we have no parameters.”


(Sam Saffron) #18

Yes, it fails, you need to put a dummy param there for your hack to work.


(Michael Brown) #19

But but but it’s valid yaml!

I guess I should have tested. /wristslap

(I thought I did actually)


(Sam Saffron) #20

Its invalid in that params is a string and not a hash like its expected to be.

You can not merge strings with hashes… Add a dummy param and Ill merge that in, everyone will be happy and the world will be full of sunshine rainbows and unicorns.

At least until I get a second non yaml config system in place.