connector.py is calling iscsiadm 3 times instead of 1 when CHAP is enabled

Bug #1351990 reported by Yaniv Kaul
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Invalid
Wishlist
Unassigned

Bug Description

From brick/initiator/connector.py :
        if connection_properties.get('auth_method'):
            self._iscsiadm_update(connection_properties,
                                  "node.session.auth.authmethod",
                                  connection_properties['auth_method'])
            self._iscsiadm_update(connection_properties,
                                  "node.session.auth.username",
                                  connection_properties['auth_username'])
            self._iscsiadm_update(connection_properties,
                                  "node.session.auth.password",
                                  connection_properties['auth_password'])

This is inefficient - there is no reason why not call iscsiadm and update all 3 parameters in one call. Multiple '-n' ... '-v'... can be used.
There is no situation in which only one of the parameters will be updated - they are all updated at once.

Tags: chap iscsi
Revision history for this message
John Griffith (john-griffith) wrote :

Certainly poor, and certainly can/should be improved but wouldn't consider this a bug.

Changed in cinder:
status: New → Invalid
Revision history for this message
Yaniv Kaul (yaniv-kaul) wrote :

John, how is making this invalid improving the situation? If it's not a bug, what is ? A feature?

Revision history for this message
John Griffith (john-griffith) wrote :

Yaniv,
What's making it better is the code that I'm currently writing that consolidates it.

What's making it better is defining what a "bug" is... IMO this is poor code and inefficient, however it's perfectly functional.

I can make it triaged and wish list which in fact may be more appropriate.

Thanks

Changed in cinder:
status: Invalid → Triaged
importance: Undecided → Wishlist
Revision history for this message
Yaniv Kaul (yaniv-kaul) wrote :

Thanks John,

Note that while I found this while looking at the code, I was doing it while trying to run scale up tests (run as many VMs on a single host, running against a fast Cinder-based storage).

Revision history for this message
Rebecca Finn (rebeccax-finn) wrote :

This section and file no longer exist, so I don't think that this bug is still valid.

Changed in cinder:
status: Triaged → Invalid
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.