EQL driver does not follow format convention for log and error messages

Bug #1362337 reported by arkady kanevsky
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
arkady kanevsky

Bug Description

Need to follow conventions as defined in https://bugs.launchpad.net/nova/+bug/1348244

Debug logs should be:

    LOG.debug("message") should be LOG.debug(u"message")

Changed in cinder:
assignee: nobody → arkady kanevsky (arkady-kanevsky)
Revision history for this message
Jay Bryant (jsbryant) wrote :

Arkady,

This isn't really a change that you need to make. If you look closely at 1348244, we were able to resolve the issue further down the code path so that you do not need to add 'u' in your debug messages.

Changed in cinder:
status: New → Invalid
Revision history for this message
arkady kanevsky (arkady-kanevsky) wrote :

Thanks jungleboy.
I had filed that bug so I can cleanup EQL driver LOG messages.

This is to submit changes I made for eqlx.py when we were at f2f meeting.
Still fighting configuration so I can run git review -s.

Here are the changes:
diff --git a/cinder/volume/drivers/eqlx.py b/cinder/volume/drivers/eqlx.py
index f7fbf16..5c638c6 100644
--- a/cinder/volume/drivers/eqlx.py
+++ b/cinder/volume/drivers/eqlx.py
@@ -37,26 +37,26 @@ LOG = logging.getLogger(__name__)
 eqlx_opts = [
     cfg.StrOpt('eqlx_group_name',
                default='group-0',
- help='Group name to use for creating volumes'),
+ help='Group name to use for creating volumes.'),
     cfg.IntOpt('eqlx_cli_timeout',
                default=30,
- help='Timeout for the Group Manager cli command execution'),
+ help='Timeout for the Group Manager cli command execution.'),
     cfg.IntOpt('eqlx_cli_max_retries',
                default=5,
- help='Maximum retry count for reconnection'),
+ help='Maximum retry count for reconnection.'),
     cfg.BoolOpt('eqlx_use_chap',
                 default=False,
                 help='Use CHAP authentication for targets?'),
     cfg.StrOpt('eqlx_chap_login',
                default='admin',
- help='Existing CHAP account name'),
+ help='Existing CHAP account name.'),
     cfg.StrOpt('eqlx_chap_password',
                default='password',
- help='Password for specified CHAP account name',
+ help='Password for specified CHAP account name.',
                secret=True),
     cfg.StrOpt('eqlx_pool',
                default='default',
- help='Pool in which volumes will be created')
+ help='Pool in which volumes will be created.')
 ]

@@ -157,11 +157,11 @@ class DellEQLSanISCSIDriver(SanISCSIDriver):
         self._get_output(chan)

         cmd = 'stty columns 255'
- LOG.debug("Setting CLI terminal width: '%s'", cmd)
+ LOG.debug("Setting CLI terminal width: '%s'.", cmd)
         chan.send(cmd + '\r')
         out = self._get_output(chan)

- LOG.debug("Sending CLI command: '%s'", command)
+ LOG.debug("Sending CLI command: '%s'.", command)
         chan.send(command + '\r')
         out = self._get_output(chan)

@@ -199,7 +199,7 @@ class DellEQLSanISCSIDriver(SanISCSIDriver):
                 while attempts > 0:
                     attempts -= 1
                     try:

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/118737

Changed in cinder:
status: Invalid → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/118737
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=6225edf2618f051020377b12d9ed69b8ca486bbd
Submitter: Jenkins
Branch: master

commit 6225edf2618f051020377b12d9ed69b8ca486bbd
Author: ArkadyKanevsky <email address hidden>
Date: Wed Aug 27 16:47:37 2014 -0500

    Fixing format for log messages

    code_cleanup_batching for EQL driver
    Follow log essage format for i18n - http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages

    Closes-Bug: 1362337

    Change-Id: Ic3726f725efa4d29204e8530a8f191b801a4aac8

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → juno-rc1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: juno-rc1 → 2014.2
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.