Freeze break: fix up gobby/sobby

Patrick Uiterwijk puiterwijk at redhat.com
Wed Mar 4 14:46:09 UTC 2015


+1 from me. 
Although if we go save the data, we might want to look at purging it every once in a while. 
But that's a problem for later. On Mar 4, 2015 3:42 PM, Kevin Fenzi <kevin at scrye.com> wrote:
>
> There's 2 issues with our sobby server: 
>
> 1. It doesn't autosave/remember old documents that it has after 
> restarting. 
>
> 2. The git repo it has hasn't had any commits since 2013. ;) 
>
> The following fixes both of those issues hopefully (Although I might 
> need to tweak it a little as I have not tested it). For the autosave, 
> we pass the autosave file on the command line when starting. For the 
> git commits, it was using a link to /srv/sobby/sobby-commit, but /srv 
> is noexec so that didn't work. This change instead adds a 
> post-save-hook to just commit after every save. 
>
> +1s? should be a minor issue if gobby is down or needs to be reverted 
> back to it's current state. 
>
> kevin 
> -- 
> diff --git a/modules/sobby/files/sobby.init b/modules/sobby/files/sobby.init 
> index 42808cc..c246df4 100755 
> --- a/modules/sobby/files/sobby.init 
> +++ b/modules/sobby/files/sobby.init 
> @@ -32,7 +32,7 @@ start() { 
>      [ -x $exec ] || exit 5 
>      [ -f $config ] || exit 6 
>      echo -n $"Starting $prog: " 
> -    daemon --user sobby "$exec -c $config &" 
> +    daemon --user sobby "$exec -c $config --post-save-hook=/usr/local/bin/sobby-commit  /srv/sobby/autosave.obby &" 
>      retval=$? 
>      echo 
>      [ $retval -eq 0 ] && touch $lockfile 
> diff --git a/modules/sobby/manifests/init.pp b/modules/sobby/manifests/init.pp 
> index b39f5a8..ff360dc 100644 
> --- a/modules/sobby/manifests/init.pp 
> +++ b/modules/sobby/manifests/init.pp 
> @@ -33,7 +33,7 @@ class sobby { 
>          source => "puppet:///sobby/sobby.init", 
>      } 
>
> -    file { "/srv/sobby/sobby-commit": 
> +    file { "/usr/local/bin/sobby-commit": 
>          owner  => "root", 
>          group  => "root", 
>          mode   => 0755, 
> @@ -53,9 +53,4 @@ class sobby { 
>          mode   => 0755, 
>          ensure => directory, 
>      } 
> - 
> -    file { "/etc/cron.hourly/sobby-commit": 
> -        ensure => link, 
> -        target => "/srv/sobby/sobby-commit", 
> -    } 
> } 


More information about the infrastructure mailing list