~dave-cheney/juju-core/003-testing-charm-rsync

« back to all changes in this revision

Viewing changes to environs/cloudinit/cloudinit.go

state,environs/cloudinit: fix bootstrap

With these changes environments correctly bootstrap again.

R=dfc
CC=
https://codereview.appspot.com/6568043

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
                addScripts(c,
122
122
                        "mkdir -p /opt",
123
123
                        fmt.Sprintf("wget -O - %s | tar xz -C /opt", shquote(url)),
124
 
                        cfg.jujuTools()+"/jujud bootstrap-state"+
125
 
                                " --instance-id "+cfg.InstanceIdAccessor+
126
 
                                " --env-config "+shquote(base64yaml(cfg.Config))+
127
 
                                " --state-servers localhost"+mgoPortSuffix+
128
 
                                debugFlag,
129
124
                )
130
125
                if err := addMongoToBoot(c); err != nil {
131
126
                        return nil, err
132
127
                }
133
 
                addScripts(c,
134
 
                        cfg.jujuTools()+"/jujud bootstrap-state"+
135
 
                                " --instance-id "+cfg.InstanceIdAccessor+
136
 
                                " --env-config "+shquote(base64yaml(cfg.Config))+
137
 
                                " --state-servers localhost"+mgoPortSuffix+
138
 
                                debugFlag,
 
128
                addScripts(c, cfg.jujuTools()+"/jujud bootstrap-state"+
 
129
                        " --instance-id "+cfg.InstanceIdAccessor+
 
130
                        " --env-config "+shquote(base64yaml(cfg.Config))+
 
131
                        " --state-servers localhost"+mgoPortSuffix+
 
132
                        debugFlag,
139
133
                )
 
134
 
140
135
        }
141
136
 
142
137
        if err := addAgentToBoot(c, cfg, "machine", fmt.Sprintf("--machine-id %d "+debugFlag, cfg.MachineId)); err != nil {
194
189
        conf := &upstart.Conf{
195
190
                Service: *svc,
196
191
                Desc:    "juju state database",
197
 
                Cmd:     "/opt/mongo/bin/mongod --port 37017 --bind_ip 0.0.0.0 --dbpath=/var/lib/juju/db",
 
192
                Cmd:     "/opt/mongo/bin/mongod --port=37017 --bind_ip=0.0.0.0 --dbpath=/var/lib/juju/db --smallfiles --noprealloc",
198
193
        }
199
194
        cmds, err := conf.InstallCommands()
200
195
        if err != nil {