Hi Elijah,

Thanks very much for checking that out – I'll give it a crack and see! :)

Cheers,
Dave

-- 
Dave Koelmeyer
http://blog.davekoelmeyer.co.nz
GPG Key ID: 0x238BFF87


On 26/01/16 13:07, Elijah Zupancic wrote:
> Hi Dave,
>
> I've attempted to reproduce your steps with a few variations:
>
> Using the following:
>
>   * Ubuntu Image: 14.04
>   * Image Version: 20151005
>   * Platform Image: 20160125T130244
>
> I was able to get cron to run correctly. My cron output was:
> aws-cli/1.10.0 Python/2.7.6 Linux/3.13.0 botocore/1.3.22
> 0
>
> You may want to upgrade the Ubuntu image you are using. Also verify
> that you are using the latest version of the platform image.
>
> I hope I was able to help. Thanks,
> Elijah
>
>
> On Mon, Jan 25, 2016 at 2:56 PM, Dave Koelmeyer
> <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Hi Elijah,
>
>     Apologies for the delay. The problem I am encountering is
>     seemingly a very simple one: I cannot for the life of me get any
>     of the AWS CLI commands to run as a cron job on my
>     container-native Ubuntu instance. I have spun up an Ubuntu KVM
>     also on the JPC specifically to troubleshoot this, and there is no
>     such problem when running the same commands.
>
>     Testing this is easy – one does not even have to run any S3 sync
>     commands, a simple version check will suffice. I'd be interested
>     to see if this can be reproduced at all.
>
>     The problematic system is configured as follows:
>
>       * Image:     ubuntu-14.04
>       * Image version:     20151005
>       * Package:     g3-standard-0.5-smartos
>
>     There is no heavy customisation at all in place.
>
>     Download, unzip and install the AWS CLI utilities, for example:
>
>     wget https://s3.amazonaws.com/aws-cli/awscli-bundle.zip
>     unzip awscli-bundle.zip
>     sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
>
>
>     Verify that the command can be executed on the CLI:
>
>     /usr/local/bin/aws --version
>     aws-cli/1.9.17 Python/2.7.6 Linux/3.13.0 botocore/1.3.17
>
>     Now, create a simple shell script with the following:
>
>     #!/bin/sh
>     /usr/local/bin/aws --version >> /root/awstest.txt 2>&1
>     echo $? >> /root/awstest.txt
>     exit 0
>
>     Add it to the root user's crontab using a recurrence which suits,
>     for example:
>
>     */1  *   *   *   * /root/awstest.sh
>
>     And observe the logged output:
>
>     Child exited
>     145
>
>
>     Now, the instance where this runs successfully:
>
>       * Image:     ubuntu-certified-14.04
>       * Image version:     20150708
>       * Package:     g3-standard-0.5-kvm
>
>
>     Following the exact same procedure as documented above, the
>     command runs just fine on the KVM instance. The same is true for
>     S3 sync commands configured in a cron job. AWS CLI commands run
>     fine on the CLI on the container-native instance, but anything set
>     in a cron job fails.
>
>     This could well be a cron configuration step I've missed on my
>     part, but I've tried all manner of setting variables and so on,
>     with no change in behaviour. I would have thought at any rate that
>     configuration would not differ between the container-native
>     instance and the KVM instance. Any light you could shed on this
>     would be great.
>
>     Cheers,
>     Dave
>
>     On 22/01/16 06:47, Elijah Zupancic wrote:
>>
>>     Hi Dave,
>>
>>     Just to clear up any potential ambiguity, can you provide a link
>>     to the AWS SDK in question and an example of using the S3 utility?
>>
>>     On Sun, Jan 10, 2016 at 3:40 AM Dave Koelmeyer
>>     <[email protected]
>>     <mailto:[email protected]>> wrote:
>>
>>         Hi All,
>>
>>         I'm in need of a sanity check please. Is anyone here
>>         performing backup
>>         syncs to Amazon S3 via the AWS CLI on a container-native
>>         Ubuntu image
>>         (the "ubuntu-14.04" image in this case)? Specifically, with
>>         the relevant
>>         AWS CLI commands specified in a crontab file. If so can
>>         someone please
>>         confirm it works for them, if not, would anyone then be
>>         interested in
>>         helping with a brief test to eliminate the possibility I've
>>         run into
>>         some highly obscure bug?
>>
>>         (I'm using the Joyent Public Cloud but their support forums
>>         seem to have
>>         disappeared...)
>>
>>         Cheers,
>>         Dave
>>
>>         --
>>         Dave Koelmeyer
>>         http://blog.davekoelmeyer.co.nz
>>         GPG Key ID: 0x238BFF87
>>
>>
>>
>>         http://www.listbox.com
>>
>
>
>
>
> -- 
> -Elijah
> *smartos-discuss* | Archives
> <https://www.listbox.com/member/archive/184463/=now>
> <https://www.listbox.com/member/archive/rss/184463/23736974-7f4d7ff8>
> | Modify
> <https://www.listbox.com/member/?&;>
> Your Subscription     [Powered by Listbox] <http://www.listbox.com>
>




-------------------------------------------
smartos-discuss
Archives: https://www.listbox.com/member/archive/184463/=now
RSS Feed: https://www.listbox.com/member/archive/rss/184463/25769125-55cfbc00
Modify Your Subscription: 
https://www.listbox.com/member/?member_id=25769125&id_secret=25769125-7688e9fb
Powered by Listbox: http://www.listbox.com

Reply via email to