jclouds-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jayant Kaushal <awaken.ro...@gmail.com>
Subject Re: Error Running mysql from jclouds
Date Sun, 12 Jan 2014 07:20:01 GMT
I am using jclouds 1.7
i found the issue last night about apt cookbook( ur morning may be). added
all 3 recipes of apt.somehow it worked as well.
here is my piece of code.

 if(jsonAttributes != null && StringUtils.isNotBlank(jsonAttributes)) {
      attributes = getOverridableAttributes(jsonAttributes);
    }

    if(attributes != null && StringUtils.isNotBlank(attributes)) {
      //apply override attributes with role
      Role role = prepareRole(recipeList, chefBuilder, jsonAttributes,
roleName);

bootstrapBuilder.add(chefBuilder.cookbookPath(cookBookPath).defineRole(role).runlist(RunList.builder().role(roleName).build()).build());
    } else {

bootstrapBuilder.add(chefBuilder.cookbookPath(cookBookPath).runlist(RunList.builder().recipes(recipeList).build()).build());
    }

    // Build the statement that will perform all the operations above
    StatementList bootstrap = new StatementList(bootstrapBuilder.build());

    if(log.isDebugEnabled()) {
      log.debug("{} - about to run chef solo RunList", contextKey);
    }
    // Run the script in the nodes of the group
    scriptOptions.overrideAuthenticateSudo(true);
    String output = runScriptOnNodes(allNodes, computeService,
scriptOptions, bootstrap);

    // on a successful install, read the environment back
    if(log.isDebugEnabled()) {
      log.debug("{} - Executed RunList successfully - {} ", contextKey,
recipes);
    }
is there any thing to be done
with  scriptOptions.overrideAuthenticateSudo(true);

also the InstallRuby,InstallRubyGems and InstallChefGems is failing for the
amazon ami-1bf9de5e



Regards
Jayant Kaushal



On Sun, Jan 12, 2014 at 12:40 PM, Ignasi Barrera
<ignasi.barrera@gmail.com>wrote:

> As suggested in the chef user list, have you tried to add the "apt"
> cookbook to tbe runlist?
>
> Which jclouds/jclouds-chef versions are you using? Could you also share
> the code you use to configure chef and run it on the node?  Is it running
> as root (or with sudo)?
>
> I.
> El 11/01/2014 20:09, "Jayant Kaushal" <awaken.rogue@gmail.com> escribió:
>
> Adding Ahmed. i guess you also made some progress on this
>>
>> Regards
>> Jayant Kaushal
>>
>>
>>
>> On Sat, Jan 11, 2014 at 11:15 PM, Andrew Phillips <andrewp@apache.org>wrote:
>>
>>>  [2014-01-11T15:51:30+00:00] ERROR: package[mysql-client] (mysql::client
>>>>> line 46) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected
>>>>> process to exit with [0], but received ''
>>>>>
>>>>
>>> If you run the process on the machine itself, what is its exit code [1]?
>>> If you want to invoke it through jclouds, it needs to return an exit code
>>> of 0 if successful (as per Unix convention).
>>>
>>> ap
>>>
>>> [1] http://www.cyberciti.biz/faq/shell-how-to-determine-the-
>>> exit-status-of-linux-and-unix-command/
>>>
>>
>>

Mime
View raw message