On Wed, Nov 1, 2017 at 12:10 AM, Kevin Fenzi <ke...@scrye.com> wrote:
> Greetings.
>
> I happened to notice some cron output a while back and looked into it and 
> found a slight mistake in the purge-ami's cron.
>
> 'git clone -n' was being used which tells it to not bother checking out HEAD 
> after the clone. Just leave the checkout empty. Then it tries to run things 
> from the checkout that just fails. :)
>
> The solution is just to drop the -n I think, but I'd love to have sayan 
> confirm.

+1 from me, looks like you're right on this one.

>
> kevin
> --
> diff --git a/roles/releng/files/purge-amis b/roles/releng/files/purge-amis
> index b49942a..be677e5 100644
> --- a/roles/releng/files/purge-amis
> +++ b/roles/releng/files/purge-amis
> @@ -1,5 +1,5 @@
>  # Remove launch permissions from the AMIs after every 5 days
> -0 0 */5 * * root TMPDIR=`mktemp -d /tmp/purgeamis.XXXXXX` && pushd $TMPDIR 
> && git clone -n https://pagure.io/releng.git && cd releng/scripts && 
> AWS_ACCESS_KEY={{ ec2_image_delete_access_key_id }} AWS_SECRET_ACCESS_KEY={{ 
> ec2_image_delete_access_key }} ./clean-amis.py --change-perms && popd && rm 
> -rf $TMPDIR
> +0 0 */5 * * root TMPDIR=`mktemp -d /tmp/purgeamis.XXXXXX` && pushd $TMPDIR 
> && git clone https://pagure.io/releng.git && cd releng/scripts && 
> AWS_ACCESS_KEY={{ ec2_image_delete_access_key_id }} AWS_SECRET_ACCESS_KEY={{ 
> ec2_image_delete_access_key }} ./clean-amis.py --change-perms && popd && rm 
> -rf $TMPDIR
>
>  # Delete the AMIs after every 10 days.
> -0 0 */10 * * root TMPDIR=`mktemp -d /tmp/purgeamis.XXXXXX` && pushd $TMPDIR 
> && git clone -n https://pagure.io/releng.git && cd releng/scripts && 
> AWS_ACCESS_KEY={{ ec2_image_delete_access_key_id }} AWS_SECRET_ACCESS_KEY={{ 
> ec2_image_delete_access_key }} ./clean-amis.py --delete && popd && rm -rf 
> $TMPDIR
> +0 0 */10 * * root TMPDIR=`mktemp -d /tmp/purgeamis.XXXXXX` && pushd $TMPDIR 
> && git clone https://pagure.io/releng.git && cd releng/scripts && 
> AWS_ACCESS_KEY={{ ec2_image_delete_access_key_id }} AWS_SECRET_ACCESS_KEY={{ 
> ec2_image_delete_access_key }} ./clean-amis.py --delete && popd && rm -rf 
> $TMPDIR
>
>
> _______________________________________________
> infrastructure mailing list -- infrastructure@lists.fedoraproject.org
> To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org
>
_______________________________________________
infrastructure mailing list -- infrastructure@lists.fedoraproject.org
To unsubscribe send an email to infrastructure-le...@lists.fedoraproject.org

Reply via email to