Public bug reported:

Running openstack Ussuri + Focal with Cinder HPE 3PAR on Fiber Channel.

When trying to attach volumes or create a volume from an image, it fails with:
https://pastebin.ubuntu.com/p/mwPZhYK5c4/

That is cinder API-level error, but it happens on the client side of the 
communication.
It is the response of the API call made, requesting for a certain volume 
operation (so far, seen this with attachment and creating from volume).

That is happening because the properties field of the request is going empty.
It means the client is not populating the API request with the properties 
field, which would include the connector and an entry for "wwpns".

In the case of the create-volume-from-image
That property field is populated on: 
https://github.com/openstack/cinder/blob/393c2e4ad90c05ebf28cc3a2c65811d7e1e0bc18/cinder/volume/driver.py#L878

Which in turn, calls the os_brick lib on:
https://github.com/openstack/cinder/blob/393c2e4ad90c05ebf28cc3a2c65811d7e1e0bc18/cinder/volume/volume_utils.py#L1320

This is the os_brick method:
https://github.com/openstack/os-brick/blob/1b2e2295421615847d86508dcd487ec51fa45f25/os_brick/initiator/connectors/fibre_channel.py#L60

And eventually, calls:
https://github.com/openstack/os-brick/blob/1b2e2295421615847d86508dcd487ec51fa45f25/os_brick/initiator/linuxfc.py#L162

If systool is not installed, it will fail but the
get_connector_properties handles that and returns an empty properties
field instead.

In the case of HPE 3PAR, it expects the standard os_brick linuxfc.py to
correctly call the get_fc_hbas method. Then, it sends the result as a
request to the cinder API, resulting in the KeyError message as the
response.

The linuxfc.py code in the os_brick is a generic handler of Fiber Channel 
connections.
Sysfsutils is a dependency of that generic handler in os_brick.

Given this issue affects both cinder-volume and nova-compute and
standard cinder code on os_bricks uses sysfsutils, I'd recommend we set
sysfsutils as prerequisites of both python*-cinderclient and cinder-
volume packages.

WORK-AROUND:
The work-around possible so far is to have the cinder backend charm written to 
install the sysfsutils.
It does not cover the issue for the nova-computes, which also need that package 
to populate the properties field correctly.
Then, one workaround is to run:

$ juju run --application nova-compute "sudo apt install -y sysfsutils"
$ juju run --application cinder-volume "sudo apt install -y sysfsutils"

** Affects: python-cinderclient (Ubuntu)
     Importance: Undecided
         Status: New

** Also affects: python-cinderclient
   Importance: Undecided
       Status: New

** No longer affects: python-cinderclient

** Description changed:

  Running openstack Ussuri + Focal with Cinder HPE 3PAR on Fiber Channel.
  
  When trying to attach volumes or create a volume from an image, it fails with:
  https://pastebin.ubuntu.com/p/mwPZhYK5c4/
  
  That is cinder API-level error, but it happens on the client side of the 
communication.
  It is the response of the API call made, requesting for a certain volume 
operation (so far, seen this with attachment and creating from volume).
  
  That is happening because the properties field of the request is going empty.
  It means the client is not populating the API request with the properties 
field, which would include the connector and an entry for "wwpns".
  
  In the case of the create-volume-from-image
  That property field is populated on: 
https://github.com/openstack/cinder/blob/393c2e4ad90c05ebf28cc3a2c65811d7e1e0bc18/cinder/volume/driver.py#L878
  
  Which in turn, calls the os_brick lib on:
  
https://github.com/openstack/cinder/blob/393c2e4ad90c05ebf28cc3a2c65811d7e1e0bc18/cinder/volume/volume_utils.py#L1320
  
  This is the os_brick method:
  
https://github.com/openstack/os-brick/blob/1b2e2295421615847d86508dcd487ec51fa45f25/os_brick/initiator/connectors/fibre_channel.py#L60
  
  And eventually, calls:
  
https://github.com/openstack/os-brick/blob/1b2e2295421615847d86508dcd487ec51fa45f25/os_brick/initiator/linuxfc.py#L162
  
  If systool is not installed, it will fail but the
  get_connector_properties handles that and returns an empty properties
  field instead.
  
  In the case of HPE 3PAR, it expects the standard os_brick linuxfc.py to
  correctly call the get_fc_hbas method. Then, it sends the result as a
  request to the cinder API, resulting in the KeyError message as the
  response.
  
  The linuxfc.py code in the os_brick is a generic handler of Fiber Channel 
connections.
  Sysfsutils is a dependency of that generic handler in os_brick.
  
  Given this issue affects both cinder-volume and nova-compute and
  standard cinder code on os_bricks uses sysfsutils, I'd recommend we set
  sysfsutils as prerequisites of both python*-cinderclient and cinder-
  volume packages.
  
  WORK-AROUND:
- The work-around possible so far is to have the cinder backend charm written 
to deploy an integration to install the sysfsutils.
+ The work-around possible so far is to have the cinder backend charm written 
to install the sysfsutils.
  It does not cover the issue for the nova-computes, which also need that 
package to populate the properties field correctly.
  Then, one workaround is to run:
  
  $ juju run --application nova-compute "sudo apt install -y sysfsutils"
  $ juju run --application cinder-volume "sudo apt install -y sysfsutils"

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1927729

Title:
  Cinder packages should have sysfsutils as a dependency

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/python-cinderclient/+bug/1927729/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to