FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Infrastructure

 
 
LinkBack Thread Tools
 
Old 03-20-2009, 01:46 AM
Ricky Zhou
 
Default Use single quotes for the mysql backup cronjob.

This has been causing us to get extra cron spam (and stalling mysql
updates). I doubt anybody would consider this very risky :-)

---
manifests/services/db.pp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/manifests/services/db.pp b/manifests/services/db.pp
index fbed669..b5a7a29 100644
--- a/manifests/services/db.pp
+++ b/manifests/services/db.pp
@@ -37,7 +37,7 @@ class mysqlBackup {
}

cron { mysql-backup:
- command => "time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql",
+ command => 'time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql',
user => mysql,
minute => 40,
hour => [ 2,8,14,20 ],
--
1.5.5.6

Thanks,
Ricky
_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 03-20-2009, 01:50 AM
Mike McGrath
 
Default Use single quotes for the mysql backup cronjob.

On Thu, 19 Mar 2009, Ricky Zhou wrote:

> This has been causing us to get extra cron spam (and stalling mysql
> updates). I doubt anybody would consider this very risky :-)
>
> ---
> manifests/services/db.pp | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/manifests/services/db.pp b/manifests/services/db.pp
> index fbed669..b5a7a29 100644
> --- a/manifests/services/db.pp
> +++ b/manifests/services/db.pp
> @@ -37,7 +37,7 @@ class mysqlBackup {
> }
>
> cron { mysql-backup:
> - command => "time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql",
> + command => 'time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql',
> user => mysql,
> minute => 40,
> hour => [ 2,8,14,20 ],

Sorry about that, +1

-Mike

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 03-20-2009, 02:06 AM
Nigel Jones
 
Default Use single quotes for the mysql backup cronjob.

+1
----- "Ricky Zhou" <ricky@fedoraproject.org> wrote:

> This has been causing us to get extra cron spam (and stalling mysql
> updates). I doubt anybody would consider this very risky :-)
>
> ---
> manifests/services/db.pp | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/manifests/services/db.pp b/manifests/services/db.pp
> index fbed669..b5a7a29 100644
> --- a/manifests/services/db.pp
> +++ b/manifests/services/db.pp
> @@ -37,7 +37,7 @@ class mysqlBackup {
> }
>
> cron { mysql-backup:
> - command => "time /bin/sleep $(($RANDOM/20)) ;
> /var/lib/mysql/save-mysql",
> + command => 'time /bin/sleep $(($RANDOM/20)) ;
> /var/lib/mysql/save-mysql',
> user => mysql,
> minute => 40,
> hour => [ 2,8,14,20 ],
> --
> 1.5.5.6
>
> Thanks,
> Ricky
>
> _______________________________________________
> Fedora-infrastructure-list mailing list
> Fedora-infrastructure-list@redhat.com
> https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 03-20-2009, 11:20 AM
Mark Wormgoor
 
Default Use single quotes for the mysql backup cronjob.

Ricky Zhou wrote:

This has been causing us to get extra cron spam (and stalling mysql
updates). I doubt anybody would consider this very risky :-)

---
manifests/services/db.pp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/manifests/services/db.pp b/manifests/services/db.pp
index fbed669..b5a7a29 100644
--- a/manifests/services/db.pp
+++ b/manifests/services/db.pp
@@ -37,7 +37,7 @@ class mysqlBackup {
}

cron { mysql-backup:

- command => "time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql",
+ command => 'time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql',


Can you use $(($RANDOM/20)) between single quotes?

Kind regards,

Mark


_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 03-20-2009, 11:32 AM
"Paul W. Frields"
 
Default Use single quotes for the mysql backup cronjob.

On Fri, Mar 20, 2009 at 01:20:09PM +0100, Mark Wormgoor wrote:
> Ricky Zhou wrote:
>> This has been causing us to get extra cron spam (and stalling mysql
>> updates). I doubt anybody would consider this very risky :-)
>>
>> ---
>> manifests/services/db.pp | 2 +-
>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/manifests/services/db.pp b/manifests/services/db.pp
>> index fbed669..b5a7a29 100644
>> --- a/manifests/services/db.pp
>> +++ b/manifests/services/db.pp
>> @@ -37,7 +37,7 @@ class mysqlBackup {
>> }
>> cron { mysql-backup:
>> - command => "time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql",
>> + command => 'time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql',
>
> Can you use $(($RANDOM/20)) between single quotes?

Not in a bash shell, but these quotes aren't used in that context AIUI.

--
Paul W. Frields http://paul.frields.org/
gpg fingerprint: 3DA6 A0AC 6D58 FEC4 0233 5906 ACDB C937 BD11 3717
http://redhat.com/ - - - - http://pfrields.fedorapeople.org/
irc.freenode.net: stickster @ #fedora-docs, #fedora-devel, #fredlug
_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 
Old 03-20-2009, 02:06 PM
Todd Zullinger
 
Default Use single quotes for the mysql backup cronjob.

Paul W. Frields wrote:
> On Fri, Mar 20, 2009 at 01:20:09PM +0100, Mark Wormgoor wrote:
>> Ricky Zhou wrote:
>>> This has been causing us to get extra cron spam (and stalling mysql
>>> updates). I doubt anybody would consider this very risky :-)
>>>
>>> ---
>>> manifests/services/db.pp | 2 +-
>>> 1 files changed, 1 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/manifests/services/db.pp b/manifests/services/db.pp
>>> index fbed669..b5a7a29 100644
>>> --- a/manifests/services/db.pp
>>> +++ b/manifests/services/db.pp
>>> @@ -37,7 +37,7 @@ class mysqlBackup {
>>> }
>>> cron { mysql-backup:
>>> - command => "time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql",
>>> + command => 'time /bin/sleep $(($RANDOM/20)) ; /var/lib/mysql/save-mysql',
>>
>> Can you use $(($RANDOM/20)) between single quotes?
>
> Not in a bash shell, but these quotes aren't used in that context AIUI.

Right, in puppet, using single quotes keeps puppet itself from trying
to expand the variables. That way, the command you want gets passed
to the shell. Knowing next to nothing about infra's puppet setup, the
change looks sane to me -- double quotes would surely be broken.

--
Todd OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~
Every man should have a college education in order to show him how
little the thing is really worth.
-- Elbert Hubbard (1856-1915), "A Message to Garcia"

_______________________________________________
Fedora-infrastructure-list mailing list
Fedora-infrastructure-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-infrastructure-list
 

Thread Tools




All times are GMT. The time now is 10:42 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org