Privilege class B is needed to use fiber channel volumes
The problem
When trying to use "Attach Volume" Feilong API call (https://cloudlib4zvm.readthedocs.io/en/latest/restapi.html#attach-volume) one gets an error message like:
{HTTP status: 404, body: {"overallRC": 404, "modID": 30, "rc": 404, "rs": 1, "errmsg":
"FCP with id: fc04 does not exist.", "output": ""}
After debugging, it appears it is because the information about the FCP device was not stored in the database at the startup of zvmsdk. This is turn is caused by:
[2024-01-17 16:56:18] [ERROR] Failed to get PCHID for the CHPID '60' with command
'['sudo', '/sbin/vmcp', 'query chpid', '60', 'pchid']'. Check the z/VM userid 'FEILONG' on the z/VM
'S390ZL0C' is authorized to run the CP command: 'QUERY CHPID yy PCHID'.
The solutions
The remediation is to add privilege class B to the ZVM connector VM (Feilong).
Ideally, Feilong should use something else than vmcp query chpid XX pchid to query zVM, because this command requires class B.
If that is not technically possible, the issue should at least be documented in Feilong's documentation. I suggest adding:
6. Add privilege class B
If you are planning to use Fiber Channel volumes, you need to add privilege class B to your BYOL:
replace G with BG at the end of the first definition line (starting with USER).
to section 3.1.1. Preparation on BYOL (https://cloudlib4zvm.readthedocs.io/en/latest/quickstart.html#preparation-on-byol), and changing final note:
Note Preparation step 2 and step 3 require to logoff then re-logon the BYOL to make
the updates become effective.
to:
Note Preparation step 2 , step 3, and step 6 require to logoff then re-logon the BYOL to make
the updates become effective.
@dongyanyang any comments on this? Thanks