storwize ssh_execute always sleeps on failure.

Bug #1640925 reported by Gerald McBrearty
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
New
Undecided
IBM Storage

Bug Description

    def _ssh_execute(self, sshpool, command,
                     check_exit_code = True, attempts=1):
        try:
            with sshpool.item() as ssh:
                while attempts > 0:
                    attempts -= 1
                    try:
                        return processutils.ssh_execute(
                            ssh,
                            command,
                            check_exit_code=check_exit_code)
                    except Exception as e:
                        LOG.error(_LE('Error has occurred: %s'), e)
                        last_exception = e
                        greenthread.sleep(self.DEFAULT_GR_SLEEP)
                    try:

If attempts is down to zero (meaning this is the last try) is there a reason to sleep?

tags: added: drivers ibm
Isaac Beckman (isaacb)
Changed in cinder:
assignee: nobody → IBM Storage (ibm-storage)
Revision history for this message
jiamin (shljia) wrote :

it is not recommended to retry immediately after failed, wait for a short time is better, i think this may be the reason.

Eric Harney (eharney)
tags: added: storwize
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.