pcp updates: fix pmlogger_daily and pmlogger_check directory creation issues

"Ken McDonell" <[email protected]> Mon, 13 Feb 2017 07:21:53 +1100
Newsgroups gmane.comp.sysutils.pcp
Message-ID <[email protected]>
Changes committed to git://git.pcp.io/kenj/pcp master

Ken McDonell (8):
      qa/918 & qa/1083: (new) exercise pmcd rc-init script with systemd
      src/pcp/pmcd/rc-proc.sh: add mkdir_and_chown()
      qa/new: tweak script so _cleanup() provided and used in trap
      qa/934: (new) exercise mkdir_and_chown() from rc-proc.sh
      src/pmcd/rc-proc.sh & qa/934: add mode parameter to mkdir_and_chown
      src/pmlogger/pmlogger_check.sh & qa/920(new): use mkdir_and_chown()
      qa/920: report mode for created directories
      src/pmlogger/pmlogger_daily.sh & qa/925(new): created output directory hierarchy

 qa/1083                        |   61 ++++++++++++
 qa/1083.out                    |    7 +
 qa/918                         |   76 +++++++++++++++
 qa/918.out                     |    8 +
 qa/920                         |   75 +++++++++++++++
 qa/920.out                     |   41 ++++++--
 qa/925                         |   90 ++++++++++++++++++
 qa/925.out                     |   24 +++++
 qa/934                         |  145 +++++++++++++++++++++++++++---
 qa/934.out                     |  196 +++++++++++++++++++++++++++++++++++------
 qa/group                       |    5 +
 qa/new                         |    8 +
 src/pmcd/rc-proc.sh            |   69 +++++++++++++-
 src/pmlogger/pmlogger_check.sh |   11 --
 src/pmlogger/pmlogger_daily.sh |   16 ++-
 15 files changed, 768 insertions(+), 64 deletions(-)

Details ...

commit eaeeffd045546a3b7e4554e1f2ac7120f87dc715
Author: Ken McDonell <[email protected]>
Date:   Mon Feb 13 07:16:29 2017 +1100

    src/pmlogger/pmlogger_daily.sh & qa/925(new): created output directory hierarchy

    Replicate logic from pmlogger_check to create the full directory
    hierarchy for PCP archives (if it does not already exist) with the
    correct modes and ownership.

    This addresses the issue of pmlogger_daily possibly running before
    pmlogger_check as reported by Martins Innus <[email protected]>.

commit 2bf9fb89bb447e9e60ad1eec1da7f22f6fdb4f5f
Author: Ken McDonell <[email protected]>
Date:   Mon Feb 13 07:12:18 2017 +1100

    qa/920: report mode for created directories

commit 4cffba28eba781148fde2b703fb789f1165f0afa
Author: Ken McDonell <[email protected]>
Date:   Mon Feb 13 06:46:14 2017 +1100

    src/pmlogger/pmlogger_check.sh & qa/920(new): use mkdir_and_chown()

    Ensure all directories created by pmlogger_check for the PCP archives
    are writeable by $PCP_USER:$PCP_GROUP.

    This addresses the issue with multi-level directory structures from
    the control file, as reported by Martins Innus <[email protected]>.

commit 9ba8435dc7d748f8bcfe75e3b8d7990ed26a9f94
Author: Ken McDonell <[email protected]>
Date:   Mon Feb 13 06:32:38 2017 +1100

    src/pmcd/rc-proc.sh & qa/934: add mode parameter to mkdir_and_chown

    For our scripts using mkdir_and_chown() we need to control the mode
    of any created directories.

commit 9d08c13468262f7f1ed925c37cce8cef4c855d85
Author: Ken McDonell <[email protected]>
Date:   Sun Feb 12 17:05:58 2017 +1100

    qa/934: (new) exercise mkdir_and_chown() from rc-proc.sh

commit c7512ca3ac1cd4cac228274ca55e14f2fd208b19
Author: Ken McDonell <[email protected]>
Date:   Sun Feb 12 17:05:21 2017 +1100

    qa/new: tweak script so _cleanup() provided and used in trap

commit 0960182b7321eab37684676ed4290d34587469b3
Author: Ken McDonell <[email protected]>
Date:   Sun Feb 12 17:00:53 2017 +1100

    src/pcp/pmcd/rc-proc.sh: add mkdir_and_chown()

    This helper function provides the moral equivalent of mkdir -p,
    except that for any directories created there is an option to also
    chown each of these.

    Intended for the {pmlogger,pmie}_{check,daily} scripts where we
    are doing
    	mkdir -p $path
    	chown $PCP_USER:$PCP_GROUP $path
    which is not quite right of $path contains multiple directory
    levels that do not currently exist.

    This starts to address one of the problems reported by Martins Innus
    <[email protected]> on 31 Jan 2017.

commit 678dd3e9ce8c74163e2028bf12c6bbbedbdfb106
Author: Ken McDonell <[email protected]>
Date:   Sun Feb 12 11:49:19 2017 +1100

    qa/918 & qa/1083: (new) exercise pmcd rc-init script with systemd

    Explicitly check restart, stop, start and autorestart using systemd
    when it is available.

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#15119): https://groups.io/g/pcp/message/15119
View All Messages In Topic (1): https://groups.io/g/pcp/topic/4361958
Mute This Topic: https://groups.io/mt/4361958?uid=174580
New Topic: https://groups.io/g/pcp/post
-=-=-
pcp mailing list
[email protected]
https://groups.io/g/pcp/messages
-=-=-
Change Your Subscription: https://groups.io/g/pcp/editsub?uid=174580
Group Home: https://groups.io/g/pcp
Contact Group Owner: [email protected]
Terms of Service: https://groups.io/static/tos
Unsubscribe: https://groups.io/g/pcp/leave/354243/563757577/xyzzy
-=-=-=-=-=-=-=-=-=-=-=-