Unnecessary error log about storage group is output when creating volume from image with EMC CLI iSCSI driver

Bug #1385594 reported by Rikimaru Honjo
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Low
Jeegn Chen

Bug Description

When I create a volume from image with EMC CLI iSCSI driver, error message is output to cinder-volume's log file.

2014-10-02 10:53:59.272 7615 ERROR cinder.exception [req-facb194d-42a5-43d2-a5ba-f67fc790ad8f 97a697dad7e048268838b43f14d78ca4 cba9b526d23048db978041b25e869538 - - -] EMCVnxCLICmdError : ('storagegroup', '-list', '-gname', 'W1DEV103') (Return Code: 83) (Output: [u'Error: storagegroup command failed\\nThe group name or UID does not match any storage groups for this array\\n\\n'])

But, volume creation is completely successful.
This is log level problem or error handling problem.
I think error level message should not output in normal pattern.

[reproduce]
openstack version is juno-3.

1. Set following values in cinder.conf.
* volume_driver=cinder.volume.drivers.emc.emc_cli_iscsi.EMCCLIISCSIDriver
* destroy_empty_storage_group=True
2. Delete all volumes. As a result, storage group is deleted.
3. Create a volume from image.
(ex. $ cinder create --image 397e713c-b95b-4186-ad46-6126863ea0a9 10)
    As a result, error message is oputput to log file.

[cause of bug]
When create a volume from image, EMC CLI iSCSI driver will check the presence of the storage group.
If the storage group is not exist, EMC CLI iSCSI driver will create the storage group.
Error message is output by above checking process.

* cinder/volume/drivers/ecm/emc_vnx_cli.py

    def initialize_connection(self, volume, connector):
        volume_metadata = {}
        for metadata in volume['volume_admin_metadata']:
            volume_metadata[metadata['key']] = metadata['value']
        access_mode = volume_metadata.get('attached_mode')
        if access_mode is None:
            access_mode = ('ro'
                           if volume_metadata.get('readonly') == 'True'
                           else 'rw')
        LOG.debug('Volume %(vol)s Access mode is: %(access)s.'
                  % {'vol': volume['name'],
                     'access': access_mode})

        """Initializes the connection and returns connection info."""
        @lockutils.synchronized('emc-connection-' + connector['host'],
                                "emc-connection-", True)
        def do_initialize_connection():
            device_number = self.assure_host_access(
                volume['name'], connector) ###Check and create storage group###
            return device_number

    def assure_host_access(self, volumename, connector):
        hostname = connector['host']
        auto_registration_done = False
        try:
            self.get_storage_group_uid(hostname) ### If storage group is not exist, error message is output and exception is raised. ###
        except EMCVnxCLICmdError as ex:
            if ex.rc != 83:
                raise ex
            # Storage Group has not existed yet
            self.assure_storage_group(hostname) ### Create storage group. ###
            if self.itor_auto_reg:
                self.auto_register_initiator(connector)
                auto_registration_done = True
            else:
                self._client.connect_host_to_storage_group(hostname, hostname)

        if self.itor_auto_reg and not auto_registration_done:
            self.auto_register_initiator(connector)

Tags: drivers emc vnx
Xing Yang (xing-yang)
Changed in cinder:
assignee: nobody → Jeegn Chen (jeegn-chen)
importance: Undecided → Low
Mike Perez (thingee)
Changed in cinder:
status: New → Confirmed
tags: added: drivers emc
Jeegn Chen (jeegn-chen)
Changed in cinder:
status: Confirmed → In Progress
Revision history for this message
Jeegn Chen (jeegn-chen) wrote :
Changed in cinder:
status: In Progress → Fix Committed
Jeegn Chen (jeegn-chen)
tags: added: vnx
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-3 → 2015.1.0
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.