attach volume failed in redhat6.7 first time afer rebooting system.

Bug #1773953 reported by cao biao
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
zVM Cloud Connector
Fix Committed
Medium
cao biao

Bug Description

reboot the system and attach volume to instance of os version redhat 6.7 will failed and report error like following:

>>> vop.attach(connection_info)
No handlers could be found for logger "ZVMSDK"
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "volumeop.py", line 463, in attach
    multipath, os_version)
  File "volumeop.py", line 440, in _attach
    raise exception.SDKBaseException(msg=errmsg)
zvmsdk.exception.SDKBaseException: z/VM SDK error: rollback attach because error:SMUT request failed. RequestData: 'cmdVM sample01 CMD 'sudo echo 0x0026000000000000 > /sys/bus/ccw/drivers/zfcp/0.0.1fc5/0x5005076801402797/unit_add'', Results: '{'rs': 1, 'errno': 0, 'strError': '', 'overallRC': 2, 'rc': 8, 'response': ['(Error) ULTVMU0316E On SAMPLE01, command sent through IUCV failed. cmd: sudo echo 0x0026000000000000 > /sys/bus/ccw/drivers/zfcp/0.0.1fc5/0x5005076801402797/unit_add, rc: 8, rs: 1, out: ERROR: ', 'Return code 8, Reason code 1.']}'

But if I execute attach again, the action will succeed.
Reason still not found, open a bug to track this.

cao biao (flytiger)
Changed in python-zvm-sdk:
assignee: nobody → cao biao (flytiger)
jichenjc (jichenjc)
Changed in python-zvm-sdk:
importance: Undecided → Critical
importance: Critical → Medium
status: New → Confirmed
Revision history for this message
cao biao (flytiger) wrote :

I found the solution but still do not know the reason of this problem.

solution is call config.load_config before init SDKAPI, like this:

from zvmsdk import config
config.load_config()
from zvmsdk import api
sdkapi = api.SDKAPI()
sdkapi.volume_attach(connection_info)

by doing this, the problem will not happen again.
I think this problem will disappear after I add REST API for volume.
Because load_config is called in wsgi now.

Revision history for this message
jichenjc (jichenjc) wrote :

so this is a valid bug or not?

Revision history for this message
cao biao (flytiger) wrote :

I refine the code and this problem did not happen again. closed.

Changed in python-zvm-sdk:
status: Confirmed → Incomplete
status: Incomplete → Fix Committed
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.