juju bootstrap falha com um ambiente local, por quê?

1

Sempre que tento inicializar o juju usando um ambiente local, ele falha ao iniciar o script juju-db-braiam-local da seguinte forma:

$ sudo juju --debug --verbose bootstrap
2013-10-20 02:28:53 INFO juju.provider.local environprovider.go:32 opening environment "local"
2013-10-20 02:28:53 DEBUG juju.provider.local environ.go:210 found "10.0.3.1" as address for "lxcbr0"
2013-10-20 02:28:53 DEBUG juju.provider.local environ.go:234 checking 10.0.3.1:8040 to see if machine agent running storage listener
2013-10-20 02:28:53 DEBUG juju.provider.local environ.go:237 nope, start some
2013-10-20 02:28:53 DEBUG juju.environs.tools storage.go:87 Uploading tools for [raring precise]
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:109 looking for: juju
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:150 checking: /usr/bin/jujud
2013-10-20 02:28:53 INFO juju.environs.tools build.go:156 found existing jujud
2013-10-20 02:28:53 INFO juju.environs.tools build.go:166 target: /tmp/juju-tools243949228/jujud
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:217 forcing version to 1.14.1.1
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:37 adding entry: &tar.Header{Name:"FORCE-VERSION", Mode:420, Uid:0, Gid:0, Size:8, ModTime:time.Time{sec:63517832933, nsec:278894120, loc:(*time.Location)(0x108fda0)}, Typeflag:0x30, Linkname:"", Uname:"ubuntu", Gname:"ubuntu", Devmajor:0, Devminor:0, AccessTime:time.Time{sec:63517832933, nsec:278894120, loc:(*time.Location)(0x108fda0)}, ChangeTime:time.Time{sec:63517832933, nsec:278894120, loc:(*time.Location)(0x108fda0)}}
2013-10-20 02:28:53 DEBUG juju.environs.tools build.go:37 adding entry: &tar.Header{Name:"jujud", Mode:493, Uid:0, Gid:0, Size:19179512, ModTime:time.Time{sec:63517832933, nsec:274894120, loc:(*time.Location)(0x108fda0)}, Typeflag:0x30, Linkname:"", Uname:"ubuntu", Gname:"ubuntu", Devmajor:0, Devminor:0, AccessTime:time.Time{sec:63517832933, nsec:274894120, loc:(*time.Location)(0x108fda0)}, ChangeTime:time.Time{sec:63517832933, nsec:274894120, loc:(*time.Location)(0x108fda0)}}
2013-10-20 02:28:55 INFO juju.environs.tools storage.go:106 built 1.14.1.1-raring-amd64 (4196kB)
2013-10-20 02:28:55 INFO juju.environs.tools storage.go:112 uploading 1.14.1.1-precise-amd64
2013-10-20 02:28:55 INFO juju.environs.tools storage.go:112 uploading 1.14.1.1-raring-amd64
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:29 reading tools with major version 1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:34 filtering tools by version: 1.14.1.1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:37 filtering tools by series: precise
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:41 reading v1.* tools
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-precise-amd64
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-raring-amd64
2013-10-20 02:28:55 INFO juju.environs.boostrap bootstrap.go:57 bootstrapping environment "local"
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:29 reading tools with major version 1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:34 filtering tools by version: 1.14.1.1
2013-10-20 02:28:55 INFO juju.environs.tools tools.go:37 filtering tools by series: precise
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:41 reading v1.* tools
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-precise-amd64
2013-10-20 02:28:55 DEBUG juju.environs.tools storage.go:61 found 1.14.1.1-raring-amd64
2013-10-20 02:28:55 DEBUG juju.provider.local environ.go:395 create mongo journal dir: /home/braiam/.juju/local/db/journal
2013-10-20 02:28:55 DEBUG juju.provider.local environ.go:401 generate server cert
2013-10-20 02:28:55 INFO juju.provider.local environ.go:421 installing service juju-db-braiam-local to /etc/init
2013-10-20 02:28:56 ERROR juju.provider.local environ.go:423 could not install mongo service: exec ["start" "juju-db-braiam-local"]: exit status 1 (start: Job failed to start)
2013-10-20 02:28:56 ERROR juju supercommand.go:282 command failed: exec ["start" "juju-db-braiam-local"]: exit status 1 (start: Job failed to start)
error: exec ["start" "juju-db-braiam-local"]: exit status 1 (start: Job failed to start)

Qual é o motivo desse erro e como resolvê-lo?

    
por Braiam 20.10.2013 / 05:04

1 resposta

1

TL; dr: você não tem espaço suficiente disponível. Faça pelo menos 500 MB disponíveis na sua partição inicial.

Bem, comecei a pesquisar e descobri que o script falha ao executar service juju-db-braiam-local start . Quando executado manualmente, ele também falha. Verificando o conteúdo, encontrei isto:

description "juju state database"
author "Juju Team <[email protected]>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn
normal exit 0

limit nofile 65000 65000
limit nproc 20000 20000

exec /usr/bin/mongod --auth --dbpath=/home/braiam/.juju/local/db --sslOnNormalPorts --sslPEMKeyFile '/home/braiam/.juju/local/server.pem' --sslPEMKeyPassword ignored --bind_ip 0.0.0.0 --port 37017 --noprealloc --syslog --smallfiles

Por código de erro, a falha está na instrução exec , por isso executei-a manualmente. Aparentemente, escreve para o syslog, então eu encontrei o motivo:

Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] options: { auth: true, bind_ip: "0.0.0.0", dbpath: "/home/braiam/.juju/local/db", noprealloc: true, port: 37017, smallfiles: true, sslOnNormalPorts: true, sslPEMKeyFile: "/home/braiam/.juju/local/server.pem", sslPEMKeyPassword: "<password>", syslog: true }
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] journal dir=/home/braiam/.juju/local/db/journal
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] recover : no journal files present, no recovery needed
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] 
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] ERROR: Insufficient free space for journal files
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] Please make at least 422MB available in /home/braiam/.juju/local/db/journal or use --smallfiles
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] 
Oct 20 02:41:05 vm-2 mongod.37017[5159]: Sun Oct 20 02:41:05 [initandlisten] exception in initAndListen: 15926 Insufficient free space for journals, terminating

Parece que o mongodb não lê os - smallfiles que estão no final do script ... estranhos. A liberação de 422MB deve ter resolvido o problema, mas o mongodb deve ser capaz de iniciar de qualquer forma.

Além disso, descobri que o mongodb ignora completamente o --smallfiles quando usado com outros parameteres. Eu abri um relatório de erros sobre isso, a maneira de corrigi-lo mais fácil é disponibilizar mais espaço.

    
por Braiam 20.10.2013 / 05:04