•  
      request #13646 Incorrect path in compute_all_dailystats.sh
    Infos
    #13646
    Gerke Max Preussner (gmpreussner)
    2019-07-24 08:48
    2019-07-20 19:59
    14827
    Details
    Incorrect path in compute_all_dailystats.sh
    After upgrade from 11.3 to 11.4, Tuleap generates the following errors:

    ```
    2019-07-20T15:45:34+02:00 [10731] [error] SystemEvent_ROOT_DAILY '/usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh' errors. Stdout:

    Stderr:
    /bin/grep: /etc/codendi/conf/local.inc: No such file or directory
    /bin/grep: /etc/codendi/conf/local.inc: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 30: cd: /download: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 31: ./stats_logparse.sh: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 36: cd: /cvs1: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 37: ./cvs_history_parse.pl: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 41: cd: /underworld-root: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 42: ./stats_nightly.sh: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 47: cd: /projects-fileserver: No such file or directory
    /usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh: line 48: ./stats_projects_logparse.pl: No such file or directory
    ```

    The path `/etc/codendi/conf/local.inc` does not exist. Apparently, this problem was always present, but only now exposed due to other changes.

    Workaround is to a change `CODENDI_LOCAL_INC` in the script to `/etc/tuleap/conf/local.inc`
    Empty
    All
    EL7 (CentOS|RHEL)
    • [ ] enhancement
    • [ ] internal improvement
    Empty
    Stage
    Thomas Gerbet (tgerbet)
    Closed
    2019-07-24
    Attachments
    Empty
    References

    Follow-ups

    User avatar
    Thomas Gerbet (tgerbet)2019-07-24 08:48
    Thanks for the report!

    • Status changed from Under review to Closed
    • Close date set to 2019-07-24
    User avatar
    last edited by: Gerke Max Preussner (gmpreussner) 2019-07-23 16:13

    I applied the changes, and I am now see this new error in the log (the hourly task still fails with warnings):

     [724] [error] SystemEvent_ROOT_DAILY '/usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh' errors. Stdout:
    Parsing cvs logs looking for traffic on day 22, month 07, year 2019.
    Base log directory '/var/log/tuleap/cvslogs' does not exist!--- Beginning of stats_nightly.sh ---
    --- End of stats_nightly.sh ---
    
    Stderr:
    Use of ?PATTERN? without explicit operator is deprecated at (eval 222) line 1,  line 39.
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 223) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
     at ../include.pl line 53.
    
    User avatar
    Thomas Gerbet (tgerbet)2019-07-22 08:37
    • Status changed from New to Verified
    • Reported in version changed from development to All
    User avatar
    last edited by: Gerke Max Preussner (gmpreussner) 2019-07-20 22:02

    My proposed workaround is actually not a solution. While it fixes the original error, it generates new ones:

    2019-07-20T21:56:28+02:00 [20451] [error] SystemEvent_ROOT_DAILY '/usr/share/tuleap/src/common/system_event/include/../../../utils/compute_all_daily_stats.sh' errors. Stdout:
    Parsing cvs logs looking for traffic on day 19, month 07, year 2019.
    Base log directory '/var/log/tuleap/cvslogs' does not exist!--- Beginning of stats_nightly.sh ---
    --- End of stats_nightly.sh ---
    Stderr:
    Use of ?PATTERN? without explicit operator is deprecated at (eval 222) line 1, <FILE> line 39.
    install_driver(mysql) failed: Can't locate DBD/mysql.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at (eval 223) line 3.
    Perhaps the DBD::mysql perl module hasn't been fully installed,
    or perhaps the capitalisation of 'mysql' isn't right.
    Available drivers: DBM, ExampleP, File, Gofer, Proxy, Sponge.
     at ../include.pl line 53.