jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klemen Ferjančič <imba...@gmail.com>
Subject Re: Problem bootstraping FreeBSD on EC2
Date Wed, 27 Jan 2016 09:48:17 GMT
Good advice, I suspect I know what is going on.

Home directory contains bootstrap and /tmp/init-bootstrap exists.
However, if I run ./init-bootstrap it says "not found". I checked the
init script and it seems that bash is expected to exist on the system
(#!/bin/bash), however, bash does not come preinstalled on FreeBSD. I
could install bash with runScript but I don't think personal script is
executed before the init one? Another interesting note: sudo is not
preinstalled either so I probably need to run my script as root. I'll
play around with this and see what I can do.

Code snippet:

templateBuilder.osFamily(OsFamily.FREEBSD);
templateBuilder.imageId(REGION + "/ami-9f5549f3");
EC2TemplateOptions o = EC2TemplateOptions.Builder.keyPair("mykeypair")
.overrideLoginCredentials(getLoginForCommandExecution(os)).runScript(getBootInstructions(os));
templateBuilder.locationId(REGION);
templateBuilder.hardwareId(INSTANCE);
templateBuilder.options(o);


On 27. 01. 2016 10:23, Ignasi Barrera wrote:
> Hi Klemen,
> 
> jclouds generates and uploads that script to the node. It is a wrapper
> script that provides some helpers to get the status of the configured
> script, and to properly capture the output, stderr, and make it
> possible to abort its execution.
> 
> After the failure, can you log in to the instance and see which files
> do you have in the user's home directory and in /tmp?
> 
> You can also disable the wrapper script by configuring the
> "wrapInitScript(false)" in the RunScriptOptions, and see if the
> problem persists.
> 
> Could you also share a small code snippet of the code you're using to
> bootstrap the node?
> 
> I.
> 
> On 27 January 2016 at 09:39, Klemen Ferjančič <imbacen@gmail.com> wrote:
>> Hi
>>
>> When I create a new Ec2 instance with FreeBSD private AMI, the
>> init-bootstrap fails to run. The instance is created and runs normally,
>> but the error also fails my own runScript so I'd like to resolve it.
>>
>> 00:32:27,588 ERROR [jclouds.compute] (user thread 0) << problem
>> customizing node(eu-central-1/i-22cd4c9e): :
>> java.lang.IllegalStateException: error running [/tmp/init-bootstrap
>> init] as ec2-user@52.59.247.117; returnVal !=0:
>> {output=/tmp/init-bootstrap: not found
>> , error=, exitStatus=127)
>>
>> Full stacktrace: http://pastebin.com/xabqprs5
>>
>> 1. Is /tmp/init-bootstrap supposed to already exist on the image or is
>> this a script that jclouds uploads to the node? If the latter, I assume
>> there is a problem with script not being uploaded in the first place? No
>> error indicates this though.
>> 2. What does this script actually do? Is it possible to disable it?
>>
>> Best regards, Klemen
>>
>>


Mime
View raw message