Bug 1411963
Summary: | NetApp NFS Cmode: Fix NotFound exception - backport upstream fix | |||
---|---|---|---|---|
Product: | Red Hat OpenStack | Reporter: | Andreas Karis <akaris> | |
Component: | openstack-cinder | Assignee: | Eric Harney <eharney> | |
Status: | CLOSED ERRATA | QA Contact: | Tzach Shefi <tshefi> | |
Severity: | unspecified | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 8.0 (Liberty) | CC: | akaris, dcadzow, eharney, pgrist, srevivo, tshefi | |
Target Milestone: | --- | Keywords: | FeatureBackport, OtherQA, ZStream | |
Target Release: | 8.0 (Liberty) | |||
Hardware: | Unspecified | |||
OS: | Unspecified | |||
Whiteboard: | ||||
Fixed In Version: | openstack-cinder-7.0.3-4.el7ost | Doc Type: | If docs needed, set a value | |
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1411967 (view as bug list) | Environment: | ||
Last Closed: | 2017-03-09 17:53:52 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | 1411967 | |||
Bug Blocks: |
Description
Andreas Karis
2017-01-10 20:56:05 UTC
Andreas, How was this system install OSPD or packstack? If OSPD do you happen to have the storage yaml files used, as a template for me to reuse? Can you explain how reproduce/test? I noticed the below not sure I understand. ~~~ try: raise Exception.NotFound("not found") except Exception as e: print e ~~~ What script is this python? ~~~ [akaris@wks-akaris ~]$ ./test.py type object 'exceptions.Exception' has no attribute 'NotFound' ~~~ What does test.py include, the code snip-it from before? Hi, It was an OSPD production system at a customer site. The test.py script was only raising this exception: Exception.NotFound Check upper vs lower case! The code in OSP 8: ~~~ 512 except Exception.NotFound: 513 pass ~~~ The code in upstream: ~~~ except exception.NotFound: pass ~~~ Class 'Exception' has no NotFound exception. The OpenStack custom 'exception' though does have it. Hence, in the OSP 8 code, there is a typo. Please see here for what needs to be backported, it's only one line: https://github.com/openstack/cinder/commit/0125df9c25c156142d73356e305e3a31513a1fe8 All clear now? :) In order to verify this, you'd need an environment with NetApp backend storage and the CopyOffload feature configured. http://netapp.github.io/openstack-deploy-ops-guide/juno/content/figures/5/a/images/rapid_cloning_flowchart.png http://www.netapp.com/us/media/tr-4506.pdf Then, the NetApp storage Then, you'd run this with the netapp copy offload feature disabled on the netapp backend (I don't know how to do this, it was disabled / not functioning in the customer environemnt). You will need to somehow hit this exception, so this method here has to fail: self._get_ip_verify_on_cluster(conn.split(':')[0]) ~~~ less -N /usr/lib/python2.7/site-packages/cinder/volume/drivers/netapp/dataontap/nfs_cmode.py (...) 496 def _copy_from_img_service(self, context, volume, image_service, 497 image_id): 498 """Copies from the image service using copy offload.""" 499 LOG.debug("Trying copy from image service using copy offload.") 500 image_loc = image_service.get_location(context, image_id) 501 locations = self._construct_image_nfs_url(image_loc) 502 src_ip = None 503 selected_loc = None 504 # this will match the first location that has a valid IP on cluster 505 for location in locations: 506 conn, dr = self._check_get_nfs_path_segs(location) 507 if conn: 508 try: 509 src_ip = self._get_ip_verify_on_cluster(conn.split(':')[0]) 510 selected_loc = location 511 break 512 except Exception.NotFound: 513 pass ~~~ Long story short, this was an obvious typo, which was already fixed and waived upstream, so I don't know how much work (if at all) there is to do for QA. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2017-0479.html |