Uploaded image for project: 'DeltaCloud'
  1. DeltaCloud
  2. DTACLOUD-333

inconvenient logging to /var/log/messages

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: Server
    • Labels:
      None
    • Environment:
      fedora 17

      Description

      While I expect /var/log/messages to contain short log messages from critical system components, when using aoelus i find my messages filled up with hundreds of log messages from deltacloud including:

      • access-log-like entries:
        Oct 4 11:11:44 test1 deltacloudd[537]: 127.0.0.1 - - [04/Oct/2012 11:11:44] "GET /api HTTP/1.1" 200 1114 0.0218
      • stacktraces:
        Oct 4 11:11:44 test1 deltacloudd[537]: OVIRT::OvirtException:No route to host - connect(2)
        Oct 4 11:11:44 test1 deltacloudd[537]: /usr/share/gems/gems/rbovirt-0.0.12/lib/rbovirt.rb:131:in `handle_fault'
        Oct 4 11:11:44 test1 deltacloudd[537]: /usr/share/gems/gems/rbovirt-0.0.12/lib/rbovirt.rb:69:in `rescue in http_get'
        Oct 4 11:11:44 test1 deltacloudd[537]: /usr/share/gems/gems/rbovirt-0.0.12/lib/rbovirt.rb:66:in `http_get'
        Oct 4 11:11:44 test1 deltacloudd[537]: /usr/share/gems/gems/rbovirt-0.0.12/lib/client/datacenter_api.rb:14:in `datace
        nters'
        ...

      I would expect these log messages to reside in appropriate files under /var/log/deltacloud or something like that

        Activity

        Hide
        rlandy Ronelle Landy added a comment -

        Closing this issue as fixed in Deltacloud commit version: 29a4ad3f242e634545ae78cf60c7aaeab037860d

        Using -L option logs deltacloud output to the location of the user's choosing:

        [root@qe-blade-13 deltacloud]# API_PROVIDER="...." ./server/bin/deltacloudd -i rhevm -r <hostname> -p 3005 -L "/home/dcloud/workspace/dc.log"
        Starting Deltacloud API :: rhevm :: https://10.16.120.230:8443/api;9754dc7f-489e-49dd-99d0-2c2ea7657b56 :: http:/hostname:3005/api

        >> Thin web server (v1.5.0 codename Knife)
        >> Debugging ON
        >> Maximum connections set to 1024
        >> Listening on qe-blade-13.idm.lab.bos.redhat.com:3005, CTRL+C to stop
        ^C>> Stopping ...

        [root@qe-blade-13 deltacloud]#

        [root@qe-blade-13 workspace]# cat dc.log

        1. Logfile created on Tue Jan 08 12:01:26 -0500 2013 by logger.rb/1.2.6
          I, 2013-01-08T12:01:26.899438 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:26] "GET /api/docs/instance_states HTTP/1.1" 200 99837 0.0828

        I, 2013-01-08T12:01:29.789725 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:29] "GET /api/docs/instance_states/index HTTP/1.1" 200 99487 0.0284

        I, 2013-01-08T12:01:41.711615 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:41] "GET /api HTTP/1.1" 200 4601 0.1944

        I, 2013-01-08T12:01:43.721532 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:43] "GET /api/drivers HTTP/1.1" 200 6509 0.1108

        I, 2013-01-08T12:01:47.051683 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:47] "GET /api/storage_volumes HTTP/1.1" 200 4162 0.4608

        I, 2013-01-08T12:01:48.927050 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:48] "GET /api/storage_volumes/4286906a-a362-4f48-afff-ea008a6dcd50 HTTP/1.1" 200 4756 0.4024

        Show
        rlandy Ronelle Landy added a comment - Closing this issue as fixed in Deltacloud commit version: 29a4ad3f242e634545ae78cf60c7aaeab037860d Using -L option logs deltacloud output to the location of the user's choosing: [root@qe-blade-13 deltacloud] # API_PROVIDER="...." ./server/bin/deltacloudd -i rhevm -r <hostname> -p 3005 -L "/home/dcloud/workspace/dc.log" Starting Deltacloud API :: rhevm :: https://10.16.120.230:8443/api;9754dc7f-489e-49dd-99d0-2c2ea7657b56 :: http:/hostname:3005/api >> Thin web server (v1.5.0 codename Knife) >> Debugging ON >> Maximum connections set to 1024 >> Listening on qe-blade-13.idm.lab.bos.redhat.com:3005, CTRL+C to stop ^C>> Stopping ... [root@qe-blade-13 deltacloud] # [root@qe-blade-13 workspace] # cat dc.log Logfile created on Tue Jan 08 12:01:26 -0500 2013 by logger.rb/1.2.6 I, 2013-01-08T12:01:26.899438 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:26] "GET /api/docs/instance_states HTTP/1.1" 200 99837 0.0828 I, 2013-01-08T12:01:29.789725 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:29] "GET /api/docs/instance_states/index HTTP/1.1" 200 99487 0.0284 I, 2013-01-08T12:01:41.711615 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:41] "GET /api HTTP/1.1" 200 4601 0.1944 I, 2013-01-08T12:01:43.721532 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:43] "GET /api/drivers HTTP/1.1" 200 6509 0.1108 I, 2013-01-08T12:01:47.051683 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:47] "GET /api/storage_volumes HTTP/1.1" 200 4162 0.4608 I, 2013-01-08T12:01:48.927050 #18117 INFO – : 10.10.54.18 - - [08/Jan/2013 12:01:48] "GET /api/storage_volumes/4286906a-a362-4f48-afff-ea008a6dcd50 HTTP/1.1" 200 4756 0.4024
        Hide
        mfojtik Michal Fojtik added a comment -

        commit 74f3ef37bce7a9ff4cd65f166d1ca853ffa4bcb5
        Author: Michal Fojtik <mfojtik@redhat.com>
        Date: Mon Oct 8 15:57:01 2012 +0200

        Core: Various fixed in logging errors

        • 404 is not longer logged as 'error'
        • Using -L option on deltacloudd should redirec all logs into
          specified file
        • 404 error page in UI does not longer print super-long message

        Signed-off-by: Michal fojtik <mfojtik@redhat.com>
        TrackedAt: http://tracker.deltacloud.org/patch/117f80b2eeb4715154d662fc6c29a04a42b0f339

        Show
        mfojtik Michal Fojtik added a comment - commit 74f3ef37bce7a9ff4cd65f166d1ca853ffa4bcb5 Author: Michal Fojtik <mfojtik@redhat.com> Date: Mon Oct 8 15:57:01 2012 +0200 Core: Various fixed in logging errors 404 is not longer logged as 'error' Using -L option on deltacloudd should redirec all logs into specified file 404 error page in UI does not longer print super-long message Signed-off-by: Michal fojtik <mfojtik@redhat.com> TrackedAt: http://tracker.deltacloud.org/patch/117f80b2eeb4715154d662fc6c29a04a42b0f339
        Hide
        mfojtik Michal Fojtik added a comment -

        For logging to file:

        http://tracker.deltacloud.org/set/88

        NOTE: Deltacloud need to be started with '-L' parameter with the full path for the file where it will log. Like: $ deltacloudd -i mock -L /var/log/deltacloud-core/api.log

        The SystemD scripts in RPM need update too, to make this configurable.

        Show
        mfojtik Michal Fojtik added a comment - For logging to file: http://tracker.deltacloud.org/set/88 NOTE: Deltacloud need to be started with '-L' parameter with the full path for the file where it will log. Like: $ deltacloudd -i mock -L /var/log/deltacloud-core/api.log The SystemD scripts in RPM need update too, to make this configurable.
        Hide
        mfojtik Michal Fojtik added a comment -

        Fix for long exceptions:

        http://tracker.deltacloud.org/set/84

        It also use ExceptionHandler.logger method that can be set to the Logger class and with right configuration you can achieve that Deltacloud will log wherever you want

        Show
        mfojtik Michal Fojtik added a comment - Fix for long exceptions: http://tracker.deltacloud.org/set/84 It also use ExceptionHandler.logger method that can be set to the Logger class and with right configuration you can achieve that Deltacloud will log wherever you want
        Hide
        mfojtik Michal Fojtik added a comment -

        Hi Martin,

        There are two 'bugs':

        1. The stacktrace should definitely not be 100+ lines long. I need to play with Sinatra :show_errors/:dump_exceptions settings to make this more sane.
        2. Under Fedora/RHEL we log into syslog, so you can configure syslog to forward DC logs wherever you want. The there should be also --log option for deltacloudd that we should make available in sysconfig/deltacloud-core.

        Show
        mfojtik Michal Fojtik added a comment - Hi Martin, There are two 'bugs': 1. The stacktrace should definitely not be 100+ lines long. I need to play with Sinatra :show_errors/:dump_exceptions settings to make this more sane. 2. Under Fedora/RHEL we log into syslog, so you can configure syslog to forward DC logs wherever you want. The there should be also --log option for deltacloudd that we should make available in sysconfig/deltacloud-core.

          People

          • Assignee:
            mfojtik Michal Fojtik
            Reporter:
            mpovolny Martin Povolny
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development