Mailing List Archive

pull request 82 for postfix ra
Hi!

While reviewing my repository and patch collection for the
resource agents, i opened a pull request [1] for the postfix patches
that have been lurking around in my repository since a couple of months.

I think there is some outstanding discussion with Hideo-san but
I would like to pick them up afterwards.

Comments and feedback is welcome!

Thanks,
Raoul

[1] https://github.com/ClusterLabs/resource-agents/pull/82
--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. r.bhatia@ipax.at
Technischer Leiter

IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. office@ipax.at
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
Hi Raoul,

On Thu, May 10, 2012 at 01:21:42PM +0200, Raoul Bhatia [IPAX] wrote:
> Hi!
>
> While reviewing my repository and patch collection for the
> resource agents, i opened a pull request [1] for the postfix patches
> that have been lurking around in my repository since a couple of months.
>
> I think there is some outstanding discussion with Hideo-san but
> I would like to pick them up afterwards.
>
> Comments and feedback is welcome!

I just pulled the patches. Thanks!

Cheers,

Dejan

> Thanks,
> Raoul
>
> [1] https://github.com/ClusterLabs/resource-agents/pull/82
> --
> ____________________________________________________________________
> DI (FH) Raoul Bhatia M.Sc. email. r.bhatia@ipax.at
> Technischer Leiter
>
> IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at
> Barawitzkagasse 10/2/2/11 email. office@ipax.at
> 1190 Wien tel. +43 1 3670030
> FN 277995t HG Wien fax. +43 1 3670030 15
> ____________________________________________________________________
>
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
Hi Raoul,
Hi Dejan,

Thank you for the reflection to a repository.

To Raoul :
The matter of the next email is still left.
Please tell your opinion.
* http://www.gossamer-threads.com/lists/linuxha/dev/76409

Best Regards,
Hideo Yamauchi.

--- On Thu, 2012/5/10, Dejan Muhamedagic <dejan@suse.de> wrote:

> Hi Raoul,
>
> On Thu, May 10, 2012 at 01:21:42PM +0200, Raoul Bhatia [IPAX] wrote:
> > Hi!
> >
> > While reviewing my repository and patch collection for the
> > resource agents, i opened a pull request [1] for the postfix patches
> > that have been lurking around in my repository since a couple of months.
> >
> > I think there is some outstanding discussion with Hideo-san but
> > I would like to pick them up afterwards.
> >
> > Comments and feedback is welcome!
>
> I just pulled the patches. Thanks!
>
> Cheers,
>
> Dejan
>
> > Thanks,
> > Raoul
> >
> > [1] https://github.com/ClusterLabs/resource-agents/pull/82
> > --
> > ____________________________________________________________________
> > DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia@ipax.at
> > Technischer Leiter
> >
> > IPAX - Aloy Bhatia Hava OG          web.          http://www.ipax.at
> > Barawitzkagasse 10/2/2/11           email.            office@ipax.at
> > 1190 Wien                           tel.               +43 1 3670030
> > FN 277995t HG Wien                  fax.            +43 1 3670030 15
> > ____________________________________________________________________
> >
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
Hi Hideo-san!

On 2012-05-11 02:09, renayama19661014@ybb.ne.jp wrote:
> Hi Raoul,
> Hi Dejan,
>
> Thank you for the reflection to a repository.
>
> To Raoul :
> The matter of the next email is still left.
> Please tell your opinion.
> * http://www.gossamer-threads.com/lists/linuxha/dev/76409

I think the only patch left is postfix.patch.1121 from
http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?

> diff -r aaf72a017c98 postfix
> --- a/postfix Mon Nov 21 10:32:33 2011 +0900
> +++ b/postfix Mon Nov 21 10:34:08 2011 +0900
> @@ -264,7 +264,13 @@
> fi
>
> if ocf_is_true $status_support; then
> - data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> + orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> + data_dir=`echo $orig_data_dir | tr ',' ' '`
> + dcount=`echo $data_dir | wc -w`
> + if [ $dcount -gt 1 ]; then
> + ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
> + return $OCF_ERR_PERM
> + fi
> if [ ! -d "$data_dir" ]; then
> if ocf_is_probe; then
> ocf_log info "Postfix data directory '$data_dir' not readable during probe."

i would slightly modify this:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff --git a/heartbeat/postfix b/heartbeat/postfix
index 273d5c9..2f4ab13 100755
--- a/heartbeat/postfix
+++ b/heartbeat/postfix
@@ -264,6 +264,11 @@ postfix_validate_all()

if ocf_is_true $status_support; then
data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory
2>/dev/null`
+ data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
+ if [ $data_dir_count -gt 1 ]; then
+ ocf_log err "Postfix data directory '$orig_data_dir'
cannot be set to multiple directories."
+ return $OCF_ERR_INSTALLED
+ fi
if [ ! -d "$data_dir" ]; then
if ocf_is_probe; then
ocf_log info "Postfix data directory '$data_dir'
not readable during probe."

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

what do you think about that?

> @@ -278,16 +284,14 @@
> # check directory permissions
> if ocf_is_true $status_support; then
> user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
> - for dir in "$data_dir"; do
> - if ! su -s /bin/sh - $user -c "test -w $dir"; then
> - if ocf_is_probe; then
> - ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
> - else
> - ocf_log err "Directory '$dir' is not writable by user '$user'."
> - return $OCF_ERR_PERM;
> - fi
> + if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
> + if ocf_is_probe; then
> + ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
> + else
> + ocf_log err "Directory '$data_dir' is not writable by user '$user'."
> + return $OCF_ERR_PERM;
> fi
> - done
> + fi
> fi
> fi
>

As outlined, i see no benefit in removing the loop and would like to
keep it in case we want to check some other directories in the future.

quoting http://www.gossamer-threads.com/lists/linuxha/dev/76453#76453 :

>> the current loop:
>>> for dir in "$data_dir"; do
>>> ...
>>> done
>> (looping exactly one dir)
>>
>> could easily be enhanced to check more dirs, e.g.:
>>> for dir in "$data_dir" "$data_dir/active" "$data_dir/incoming"; do
>>> ...
>>> done
>> (looping three dirs)
>>
>> without having to re-introduce the loop.

Cheers,
Raoul
--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. r.bhatia@ipax.at
Technischer Leiter

IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. office@ipax.at
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________


_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
I've prepared your patch for inclusion into the main repository:

https://github.com/raoulbhatia/resource-agents/tree/postfix

Please let me know if there are any objections (please see my comments
below). Otherwise, I'll issue a pull request on Wednesday.

Cheers,
Raoul

On 2012-05-11 10:11, Raoul Bhatia [IPAX] wrote:
> Hi Hideo-san!
>
> On 2012-05-11 02:09, renayama19661014@ybb.ne.jp wrote:
>> Hi Raoul,
>> Hi Dejan,
>>
>> Thank you for the reflection to a repository.
>>
>> To Raoul :
>> The matter of the next email is still left.
>> Please tell your opinion.
>> * http://www.gossamer-threads.com/lists/linuxha/dev/76409
>
> I think the only patch left is postfix.patch.1121 from
> http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?
>
>> diff -r aaf72a017c98 postfix
>> --- a/postfix Mon Nov 21 10:32:33 2011 +0900
>> +++ b/postfix Mon Nov 21 10:34:08 2011 +0900
>> @@ -264,7 +264,13 @@
>> fi
>>
>> if ocf_is_true $status_support; then
>> - data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
>> + orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
>> + data_dir=`echo $orig_data_dir | tr ',' ' '`
>> + dcount=`echo $data_dir | wc -w`
>> + if [ $dcount -gt 1 ]; then
>> + ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
>> + return $OCF_ERR_PERM
>> + fi
>> if [ ! -d "$data_dir" ]; then
>> if ocf_is_probe; then
>> ocf_log info "Postfix data directory '$data_dir' not readable during probe."
>
> i would slightly modify this:
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> diff --git a/heartbeat/postfix b/heartbeat/postfix
> index 273d5c9..2f4ab13 100755
> --- a/heartbeat/postfix
> +++ b/heartbeat/postfix
> @@ -264,6 +264,11 @@ postfix_validate_all()
>
> if ocf_is_true $status_support; then
> data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory
> 2>/dev/null`
> + data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
> + if [ $data_dir_count -gt 1 ]; then
> + ocf_log err "Postfix data directory '$orig_data_dir'
> cannot be set to multiple directories."
> + return $OCF_ERR_INSTALLED
> + fi
> if [ ! -d "$data_dir" ]; then
> if ocf_is_probe; then
> ocf_log info "Postfix data directory '$data_dir'
> not readable during probe."
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> what do you think about that?
>
>> @@ -278,16 +284,14 @@
>> # check directory permissions
>> if ocf_is_true $status_support; then
>> user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
>> - for dir in "$data_dir"; do
>> - if ! su -s /bin/sh - $user -c "test -w $dir"; then
>> - if ocf_is_probe; then
>> - ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
>> - else
>> - ocf_log err "Directory '$dir' is not writable by user '$user'."
>> - return $OCF_ERR_PERM;
>> - fi
>> + if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
>> + if ocf_is_probe; then
>> + ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
>> + else
>> + ocf_log err "Directory '$data_dir' is not writable by user '$user'."
>> + return $OCF_ERR_PERM;
>> fi
>> - done
>> + fi
>> fi
>> fi
>>
>
> As outlined, i see no benefit in removing the loop and would like to
> keep it in case we want to check some other directories in the future.
>
> quoting http://www.gossamer-threads.com/lists/linuxha/dev/76453#76453 :
>
>>> the current loop:
>>>> for dir in "$data_dir"; do
>>>> ...
>>>> done
>>> (looping exactly one dir)
>>>
>>> could easily be enhanced to check more dirs, e.g.:
>>>> for dir in "$data_dir" "$data_dir/active" "$data_dir/incoming"; do
>>>> ...
>>>> done
>>> (looping three dirs)
>>>
>>> without having to re-introduce the loop.
>
> Cheers,
> Raoul
>


--
____________________________________________________________________
DI (FH) Raoul Bhatia M.Sc. email. r.bhatia@ipax.at
Technischer Leiter

IPAX - Aloy Bhatia Hava OG web. http://www.ipax.at
Barawitzkagasse 10/2/2/11 email. office@ipax.at
1190 Wien tel. +43 1 3670030
FN 277995t HG Wien fax. +43 1 3670030 15
____________________________________________________________________


_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
Hi Raoul,

Thank you for comments.

I am slightly busy.
I confirm it and will send an email tomorrow.

Best Regards,
Hideo Yamauchi.

--- On Fri, 2012/5/11, Raoul Bhatia [IPAX] <r.bhatia@ipax.at> wrote:

> Hi Hideo-san!
>
> On 2012-05-11 02:09, renayama19661014@ybb.ne.jp wrote:
> > Hi Raoul,
> > Hi Dejan,
> >
> > Thank you for the reflection to a repository.
> >
> > To Raoul :
> >   The matter of the next email is still left.
> >   Please tell your opinion.
> >   * http://www.gossamer-threads.com/lists/linuxha/dev/76409
>
> I think the only patch left is postfix.patch.1121 from
> http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?
>
> > diff -r aaf72a017c98 postfix
> > --- a/postfix    Mon Nov 21 10:32:33 2011 +0900
> > +++ b/postfix    Mon Nov 21 10:34:08 2011 +0900
> > @@ -264,7 +264,13 @@
> >          fi
> >
> >          if ocf_is_true $status_support; then
> > -            data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > +            orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > +            data_dir=`echo $orig_data_dir | tr ',' ' '`
> > +            dcount=`echo $data_dir | wc -w`
> > +            if [ $dcount -gt 1 ]; then
> > +                    ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
> > +                    return $OCF_ERR_PERM
> > +            fi
> >              if [ ! -d "$data_dir" ]; then
> >                  if ocf_is_probe; then
> >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
>
> i would slightly modify this:
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> diff --git a/heartbeat/postfix b/heartbeat/postfix
> index 273d5c9..2f4ab13 100755
> --- a/heartbeat/postfix
> +++ b/heartbeat/postfix
> @@ -264,6 +264,11 @@ postfix_validate_all()
>
>          if ocf_is_true $status_support; then
>              data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> +            data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
> +            if [ $data_dir_count -gt 1 ]; then
> +               ocf_log err "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
> +                return $OCF_ERR_INSTALLED
> +            fi
>              if [ ! -d "$data_dir" ]; then
>                  if ocf_is_probe; then
>                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
>
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> what do you think about that?
>
> > @@ -278,16 +284,14 @@
> >          # check directory permissions
> >          if ocf_is_true $status_support; then
> >              user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
> > -            for dir in "$data_dir"; do
> > -                if ! su -s /bin/sh - $user -c "test -w $dir"; then
> > -                    if ocf_is_probe; then
> > -                        ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
> > -                    else
> > -                        ocf_log err "Directory '$dir' is not writable by user '$user'."
> > -                        return $OCF_ERR_PERM;
> > -                    fi
> > +            if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
> > +                if ocf_is_probe; then
> > +                    ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
> > +                else
> > +                    ocf_log err "Directory '$data_dir' is not writable by user '$user'."
> > +                    return $OCF_ERR_PERM;
> >                  fi
> > -            done
> > +            fi
> >          fi
> >      fi
> >
>
> As outlined, i see no benefit in removing the loop and would like to
> keep it in case we want to check some other directories in the future.
>
> quoting http://www.gossamer-threads.com/lists/linuxha/dev/76453#76453 :
>
> >> the current loop:
> >>> for dir in "$data_dir"; do
> >>> ...
> >>> done
> >> (looping exactly one dir)
> >>
> >> could easily be enhanced to check more dirs, e.g.:
> >>> for dir in "$data_dir" "$data_dir/active" "$data_dir/incoming"; do
> >>> ...
> >>> done
> >> (looping three dirs)
> >>
> >> without having to re-introduce the loop.
>
> Cheers,
> Raoul
> -- ____________________________________________________________________
> DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia@ipax.at
> Technischer Leiter
>
> IPAX - Aloy Bhatia Hava OG          web.          http://www.ipax.at
> Barawitzkagasse 10/2/2/11           email.            office@ipax.at
> 1190 Wien                           tel.               +43 1 3670030
> FN 277995t HG Wien                  fax.            +43 1 3670030 15
> ____________________________________________________________________
>
>
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
Hi Raoul,

> > I think the only patch left is postfix.patch.1121 from
> > http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?
> >
> > > diff -r aaf72a017c98 postfix
> > > --- a/postfix Mon Nov 21 10:32:33 2011 +0900
> > > +++ b/postfix Mon Nov 21 10:34:08 2011 +0900
> > > @@ -264,7 +264,13 @@
> > > fi
> > >
> > > if ocf_is_true $status_support; then
> > > - data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > + orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > + data_dir=`echo $orig_data_dir | tr ',' ' '`
> > > + dcount=`echo $data_dir | wc -w`
> > > + if [ $dcount -gt 1 ]; then
> > > + ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
> > > + return $OCF_ERR_PERM
> > > + fi
> > > if [ ! -d "$data_dir" ]; then
> > > if ocf_is_probe; then
> > > ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> >
> > i would slightly modify this:
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > diff --git a/heartbeat/postfix b/heartbeat/postfix
> > index 273d5c9..2f4ab13 100755
> > --- a/heartbeat/postfix
> > +++ b/heartbeat/postfix
> > @@ -264,6 +264,11 @@ postfix_validate_all()
> >
> > if ocf_is_true $status_support; then
> > data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > + data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
> > + if [ $data_dir_count -gt 1 ]; then
> > + ocf_log err "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
> > + return $OCF_ERR_INSTALLED
> > + fi
> > if [ ! -d "$data_dir" ]; then
> > if ocf_is_probe; then
> > ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Thanks!
I agree to the patch which you changed.


> >
> > what do you think about that?
> >
> > > @@ -278,16 +284,14 @@
> > > # check directory permissions
> > > if ocf_is_true $status_support; then
> > > user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
> > > - for dir in "$data_dir"; do
> > > - if ! su -s /bin/sh - $user -c "test -w $dir"; then
> > > - if ocf_is_probe; then
> > > - ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
> > > - else
> > > - ocf_log err "Directory '$dir' is not writable by user '$user'."
> > > - return $OCF_ERR_PERM;
> > > - fi
> > > + if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
> > > + if ocf_is_probe; then
> > > + ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
> > > + else
> > > + ocf_log err "Directory '$data_dir' is not writable by user '$user'."
> > > + return $OCF_ERR_PERM;
> > > fi
> > > - done
> > > + fi
> > > fi
> > > fi
> > >
> >
> > As outlined, i see no benefit in removing the loop and would like to
> > keep it in case we want to check some other directories in the future.

Okay.
But, therefore does not the loop of data_dir have to change it as follows?

> > > - for dir in "$data_dir"; do
> > > + for dir in $data_dir; do

Many Thanks,
Hideo Yamauchi.


--- On Tue, 2012/5/15, renayama19661014@ybb.ne.jp <renayama19661014@ybb.ne.jp> wrote:

> Hi Raoul,
>
> Thank you for comments.
>
> I am slightly busy.
> I confirm it and will send an email tomorrow.
>
> Best Regards,
> Hideo Yamauchi.
>
> --- On Fri, 2012/5/11, Raoul Bhatia [IPAX] <r.bhatia@ipax.at> wrote:
>
> > Hi Hideo-san!
> >
> > On 2012-05-11 02:09, renayama19661014@ybb.ne.jp wrote:
> > > Hi Raoul,
> > > Hi Dejan,
> > >
> > > Thank you for the reflection to a repository.
> > >
> > > To Raoul :
> > >   The matter of the next email is still left.
> > >   Please tell your opinion.
> > >   * http://www.gossamer-threads.com/lists/linuxha/dev/76409
> >
> > I think the only patch left is postfix.patch.1121 from
> > http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?
> >
> > > diff -r aaf72a017c98 postfix
> > > --- a/postfix    Mon Nov 21 10:32:33 2011 +0900
> > > +++ b/postfix    Mon Nov 21 10:34:08 2011 +0900
> > > @@ -264,7 +264,13 @@
> > >          fi
> > >
> > >          if ocf_is_true $status_support; then
> > > -            data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > +            orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > +            data_dir=`echo $orig_data_dir | tr ',' ' '`
> > > +            dcount=`echo $data_dir | wc -w`
> > > +            if [ $dcount -gt 1 ]; then
> > > +                    ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
> > > +                    return $OCF_ERR_PERM
> > > +            fi
> > >              if [ ! -d "$data_dir" ]; then
> > >                  if ocf_is_probe; then
> > >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> >
> > i would slightly modify this:
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > diff --git a/heartbeat/postfix b/heartbeat/postfix
> > index 273d5c9..2f4ab13 100755
> > --- a/heartbeat/postfix
> > +++ b/heartbeat/postfix
> > @@ -264,6 +264,11 @@ postfix_validate_all()
> >
> >          if ocf_is_true $status_support; then
> >              data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > +            data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
> > +            if [ $data_dir_count -gt 1 ]; then
> > +               ocf_log err "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
> > +                return $OCF_ERR_INSTALLED
> > +            fi
> >              if [ ! -d "$data_dir" ]; then
> >                  if ocf_is_probe; then
> >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> >
> > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> >
> > what do you think about that?
> >
> > > @@ -278,16 +284,14 @@
> > >          # check directory permissions
> > >          if ocf_is_true $status_support; then
> > >              user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
> > > -            for dir in "$data_dir"; do
> > > -                if ! su -s /bin/sh - $user -c "test -w $dir"; then
> > > -                    if ocf_is_probe; then
> > > -                        ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
> > > -                    else
> > > -                        ocf_log err "Directory '$dir' is not writable by user '$user'."
> > > -                        return $OCF_ERR_PERM;
> > > -                    fi
> > > +            if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
> > > +                if ocf_is_probe; then
> > > +                    ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
> > > +                else
> > > +                    ocf_log err "Directory '$data_dir' is not writable by user '$user'."
> > > +                    return $OCF_ERR_PERM;
> > >                  fi
> > > -            done
> > > +            fi
> > >          fi
> > >      fi
> > >
> >
> > As outlined, i see no benefit in removing the loop and would like to
> > keep it in case we want to check some other directories in the future.
> >
> > quoting http://www.gossamer-threads.com/lists/linuxha/dev/76453#76453 :
> >
> > >> the current loop:
> > >>> for dir in "$data_dir"; do
> > >>> ...
> > >>> done
> > >> (looping exactly one dir)
> > >>
> > >> could easily be enhanced to check more dirs, e.g.:
> > >>> for dir in "$data_dir" "$data_dir/active" "$data_dir/incoming"; do
> > >>> ...
> > >>> done
> > >> (looping three dirs)
> > >>
> > >> without having to re-introduce the loop.
> >
> > Cheers,
> > Raoul
> > -- ____________________________________________________________________
> > DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia@ipax.at
> > Technischer Leiter
> >
> > IPAX - Aloy Bhatia Hava OG          web.          http://www.ipax.at
> > Barawitzkagasse 10/2/2/11           email.            office@ipax.at
> > 1190 Wien                           tel.               +43 1 3670030
> > FN 277995t HG Wien                  fax.            +43 1 3670030 15
> > ____________________________________________________________________
> >
> >
> >
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra [ In reply to ]
Hi Raoul,

I forgot it.

Is not it necessary to convert a comma into the space from data_dir if you leave a loop of data_dir?

example) data_dir=`echo $data_dir | tr ',' ' '`

Best Regards,
Hideo Yamauchi.


--- On Wed, 2012/5/16, renayama19661014@ybb.ne.jp <renayama19661014@ybb.ne.jp> wrote:

> Hi Raoul,
>
> > > I think the only patch left is postfix.patch.1121 from
> > > http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?
> > >
> > > > diff -r aaf72a017c98 postfix
> > > > --- a/postfix    Mon Nov 21 10:32:33 2011 +0900
> > > > +++ b/postfix    Mon Nov 21 10:34:08 2011 +0900
> > > > @@ -264,7 +264,13 @@
> > > >          fi
> > > >
> > > >          if ocf_is_true $status_support; then
> > > > -            data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > > +            orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > > +            data_dir=`echo $orig_data_dir | tr ',' ' '`
> > > > +            dcount=`echo $data_dir | wc -w`
> > > > +            if [ $dcount -gt 1 ]; then
> > > > +                    ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
> > > > +                    return $OCF_ERR_PERM
> > > > +            fi
> > > >              if [ ! -d "$data_dir" ]; then
> > > >                  if ocf_is_probe; then
> > > >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> > >
> > > i would slightly modify this:
> > >
> > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > > diff --git a/heartbeat/postfix b/heartbeat/postfix
> > > index 273d5c9..2f4ab13 100755
> > > --- a/heartbeat/postfix
> > > +++ b/heartbeat/postfix
> > > @@ -264,6 +264,11 @@ postfix_validate_all()
> > >
> > >          if ocf_is_true $status_support; then
> > >              data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > +            data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
> > > +            if [ $data_dir_count -gt 1 ]; then
> > > +               ocf_log err "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
> > > +                return $OCF_ERR_INSTALLED
> > > +            fi
> > >              if [ ! -d "$data_dir" ]; then
> > >                  if ocf_is_probe; then
> > >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> > >
> > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
>
> Thanks!
> I agree to the patch which you changed.
>
>
> > >
> > > what do you think about that?
> > >
> > > > @@ -278,16 +284,14 @@
> > > >          # check directory permissions
> > > >          if ocf_is_true $status_support; then
> > > >              user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
> > > > -            for dir in "$data_dir"; do
> > > > -                if ! su -s /bin/sh - $user -c "test -w $dir"; then
> > > > -                    if ocf_is_probe; then
> > > > -                        ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
> > > > -                    else
> > > > -                        ocf_log err "Directory '$dir' is not writable by user '$user'."
> > > > -                        return $OCF_ERR_PERM;
> > > > -                    fi
> > > > +            if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
> > > > +                if ocf_is_probe; then
> > > > +                    ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
> > > > +                else
> > > > +                    ocf_log err "Directory '$data_dir' is not writable by user '$user'."
> > > > +                    return $OCF_ERR_PERM;
> > > >                  fi
> > > > -            done
> > > > +            fi
> > > >          fi
> > > >      fi
> > > >
> > >
> > > As outlined, i see no benefit in removing the loop and would like to
> > > keep it in case we want to check some other directories in the future.
>
> Okay.
> But, therefore does not the loop of data_dir have to change it as follows?
>
> > > > -            for dir in "$data_dir"; do
> > > > +            for dir in $data_dir; do
>
> Many Thanks,
> Hideo Yamauchi.
>
>
> --- On Tue, 2012/5/15, renayama19661014@ybb.ne.jp <renayama19661014@ybb.ne.jp> wrote:
>
> > Hi Raoul,
> >
> > Thank you for comments.
> >
> > I am slightly busy.
> > I confirm it and will send an email tomorrow.
> >
> > Best Regards,
> > Hideo Yamauchi.
> >
> > --- On Fri, 2012/5/11, Raoul Bhatia [IPAX] <r.bhatia@ipax.at> wrote:
> >
> > > Hi Hideo-san!
> > >
> > > On 2012-05-11 02:09, renayama19661014@ybb.ne.jp wrote:
> > > > Hi Raoul,
> > > > Hi Dejan,
> > > >
> > > > Thank you for the reflection to a repository.
> > > >
> > > > To Raoul :
> > > >   The matter of the next email is still left.
> > > >   Please tell your opinion.
> > > >   * http://www.gossamer-threads.com/lists/linuxha/dev/76409
> > >
> > > I think the only patch left is postfix.patch.1121 from
> > > http://www.gossamer-threads.com/lists/linuxha/dev/76532#76532 right?
> > >
> > > > diff -r aaf72a017c98 postfix
> > > > --- a/postfix    Mon Nov 21 10:32:33 2011 +0900
> > > > +++ b/postfix    Mon Nov 21 10:34:08 2011 +0900
> > > > @@ -264,7 +264,13 @@
> > > >          fi
> > > >
> > > >          if ocf_is_true $status_support; then
> > > > -            data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > > +            orig_data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > > +            data_dir=`echo $orig_data_dir | tr ',' ' '`
> > > > +            dcount=`echo $data_dir | wc -w`
> > > > +            if [ $dcount -gt 1 ]; then
> > > > +                    ocf_log err "Postfix data directory '$orig_data_dir' cannot set plural parameters."
> > > > +                    return $OCF_ERR_PERM
> > > > +            fi
> > > >              if [ ! -d "$data_dir" ]; then
> > > >                  if ocf_is_probe; then
> > > >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> > >
> > > i would slightly modify this:
> > >
> > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > > diff --git a/heartbeat/postfix b/heartbeat/postfix
> > > index 273d5c9..2f4ab13 100755
> > > --- a/heartbeat/postfix
> > > +++ b/heartbeat/postfix
> > > @@ -264,6 +264,11 @@ postfix_validate_all()
> > >
> > >          if ocf_is_true $status_support; then
> > >              data_dir=`postconf $OPTION_CONFIG_DIR -h data_directory 2>/dev/null`
> > > +            data_dir_count=`echo "$data_dir" | tr ',' ' ' | wc -w`
> > > +            if [ $data_dir_count -gt 1 ]; then
> > > +               ocf_log err "Postfix data directory '$orig_data_dir' cannot be set to multiple directories."
> > > +                return $OCF_ERR_INSTALLED
> > > +            fi
> > >              if [ ! -d "$data_dir" ]; then
> > >                  if ocf_is_probe; then
> > >                      ocf_log info "Postfix data directory '$data_dir' not readable during probe."
> > >
> > > - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
> > >
> > > what do you think about that?
> > >
> > > > @@ -278,16 +284,14 @@
> > > >          # check directory permissions
> > > >          if ocf_is_true $status_support; then
> > > >              user=`postconf $OPTION_CONFIG_DIR -h mail_owner 2>/dev/null`
> > > > -            for dir in "$data_dir"; do
> > > > -                if ! su -s /bin/sh - $user -c "test -w $dir"; then
> > > > -                    if ocf_is_probe; then
> > > > -                        ocf_log info "Directory '$dir' is not writable by user '$user' during probe."
> > > > -                    else
> > > > -                        ocf_log err "Directory '$dir' is not writable by user '$user'."
> > > > -                        return $OCF_ERR_PERM;
> > > > -                    fi
> > > > +            if ! su -s /bin/sh - $user -c "test -w $data_dir"; then
> > > > +                if ocf_is_probe; then
> > > > +                    ocf_log info "Directory '$data_dir' is not writable by user '$user' during probe."
> > > > +                else
> > > > +                    ocf_log err "Directory '$data_dir' is not writable by user '$user'."
> > > > +                    return $OCF_ERR_PERM;
> > > >                  fi
> > > > -            done
> > > > +            fi
> > > >          fi
> > > >      fi
> > > >
> > >
> > > As outlined, i see no benefit in removing the loop and would like to
> > > keep it in case we want to check some other directories in the future.
> > >
> > > quoting http://www.gossamer-threads.com/lists/linuxha/dev/76453#76453 :
> > >
> > > >> the current loop:
> > > >>> for dir in "$data_dir"; do
> > > >>> ...
> > > >>> done
> > > >> (looping exactly one dir)
> > > >>
> > > >> could easily be enhanced to check more dirs, e.g.:
> > > >>> for dir in "$data_dir" "$data_dir/active" "$data_dir/incoming"; do
> > > >>> ...
> > > >>> done
> > > >> (looping three dirs)
> > > >>
> > > >> without having to re-introduce the loop.
> > >
> > > Cheers,
> > > Raoul
> > > -- ____________________________________________________________________
> > > DI (FH) Raoul Bhatia M.Sc.          email.          r.bhatia@ipax.at
> > > Technischer Leiter
> > >
> > > IPAX - Aloy Bhatia Hava OG          web.          http://www.ipax.at
> > > Barawitzkagasse 10/2/2/11           email.            office@ipax.at
> > > 1190 Wien                           tel.               +43 1 3670030
> > > FN 277995t HG Wien                  fax.            +43 1 3670030 15
> > > ____________________________________________________________________
> > >
> > >
> > >
> > _______________________________________________________
> > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> > Home Page: http://linux-ha.org/
> >
> _______________________________________________________
> Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
> Home Page: http://linux-ha.org/
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra *call for help* [ In reply to ]
Hello Hideo-san!

On 16.05.2012 06:22, renayama19661014@ybb.ne.jp wrote:
> Hi Raoul,
>
> I forgot it.
>
> Is not it necessary to convert a comma into the space from data_dir if you leave a loop of data_dir?
>
> example) data_dir=`echo $data_dir | tr ',' ' '`

I think we still have a major misunderstanding :)

This loop is *not* about looping multiple data directories
(multiple data directories are not possible and an error is
issued by the new patch)

This loop is kept in place if we want to loop different, additional
directories, for example the data_dir *and* the "mail_spool_directory"
*and* the queue_directory.

As of now, we do not loop more directories but the loop does not harm
in any way, so I would rather keep it there.


Can anyone help me to express myself in a better way or help me
understand the real issue which Hideo-san wants to address?
*Please* :)

Cheers,
Raoul
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra *call for help* [ In reply to ]
Hi,

On Wed, May 16, 2012 at 07:49:09AM +0200, Raoul Bhatia [IPAX] wrote:
> Hello Hideo-san!
>
> On 16.05.2012 06:22, renayama19661014@ybb.ne.jp wrote:
> > Hi Raoul,
> >
> > I forgot it.
> >
> > Is not it necessary to convert a comma into the space from data_dir if you leave a loop of data_dir?
> >
> > example) data_dir=`echo $data_dir | tr ',' ' '`
>
> I think we still have a major misunderstanding :)
>
> This loop is *not* about looping multiple data directories
> (multiple data directories are not possible and an error is
> issued by the new patch)
>
> This loop is kept in place if we want to loop different, additional
> directories, for example the data_dir *and* the "mail_spool_directory"
> *and* the queue_directory.
>
> As of now, we do not loop more directories but the loop does not harm
> in any way, so I would rather keep it there.
>
>
> Can anyone help me to express myself in a better way or help me
> understand the real issue which Hideo-san wants to address?
> *Please* :)

Must say that I don't see any loops :) But please just post the
patch or send pull request so that we can tag the rc.

Cheers,

Dejan

> Cheers,
> Raoul
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra *call for help* [ In reply to ]
Hi Raoul,

As for me, you understood a meaning.
And I understood that plural contents were not set at data_dir.
It is that this loop is a loop in consideration of the expansion of the future directory check.

Is my understanding wrong?

Many Thanks.
Hideo Yamauchi.

--- On Wed, 2012/5/16, Raoul Bhatia [IPAX] <r.bhatia@ipax.at> wrote:

> Hello Hideo-san!
>
> On 16.05.2012 06:22, renayama19661014@ybb.ne.jp wrote:
> > Hi Raoul,
> >
> > I forgot it.
> >
> > Is not it necessary to convert a comma into the space from data_dir if you leave a loop of data_dir?
> >
> > example) data_dir=`echo $data_dir | tr ',' ' '`
>
> I think we still have a major misunderstanding :)
>
> This loop is *not* about looping multiple data directories
> (multiple data directories are not possible and an error is
> issued by the new patch)
>
> This loop is kept in place if we want to loop different, additional
> directories, for example the data_dir *and* the "mail_spool_directory"
> *and* the queue_directory.
>
> As of now, we do not loop more directories but the loop does not harm
> in any way, so I would rather keep it there.
>
>
> Can anyone help me to express myself in a better way or help me
> understand the real issue which Hideo-san wants to address?
> *Please* :)
>
> Cheers,
> Raoul
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra *call for help* [ In reply to ]
Hello Hideo-san!

On 16.05.2012 08:12, renayama19661014@ybb.ne.jp wrote:
> Hi Raoul,
>
> As for me, you understood a meaning.
> And I understood that plural contents were not set at data_dir.
> It is that this loop is a loop in consideration of the expansion of the future directory check.

Mhm, I *think* so.

So can we agree that there is nothing left to do and I can issue another
pull request? :)

Otherwise, I'm confused on what you're expecting from me.
(If it is simply removing the loop because there currently is *no need*
for looping, to which i agree, I would still refrain from this
particular change because we would not anything here.)

Thanks,
Raoul

_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/
Re: pull request 82 for postfix ra *call for help* [ In reply to ]
Hi Raoul,

Thank you for comments.

I agree to your correction.
I am sorry that I confused you.

Many Thanks!
Hideo Yamauchi.

--- On Wed, 2012/5/16, Raoul Bhatia [IPAX] <r.bhatia@ipax.at> wrote:

> Hello Hideo-san!
>
> On 16.05.2012 08:12, renayama19661014@ybb.ne.jp wrote:
> > Hi Raoul,
> >
> > As for me, you understood a meaning.
> > And I understood that plural contents were not set at data_dir.
> > It is that this loop is a loop in consideration of the expansion of the future directory check.
>
> Mhm, I *think* so.
>
> So can we agree that there is nothing left to do and I can issue another
> pull request? :)
>
> Otherwise, I'm confused on what you're expecting from me.
> (If it is simply removing the loop because there currently is *no need*
> for looping, to which i agree, I would still refrain from this
> particular change because we would not anything here.)
>
> Thanks,
> Raoul
>
>
_______________________________________________________
Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev
Home Page: http://linux-ha.org/