forked from xapi-project/sm
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(NFSSR): ensure we can attach SR during attach_from_config call
We can get a trace like that if the SR is not attached: ``` 2170:Oct 10 16:02:59 xcp4 SM: [2564] ***** NFSFileVDI.attach_from_config: EXCEPTION <type 'exceptions.AttributeError'>, 'NoneType' object has no attribute 'xenapi' 2329-Oct 10 16:02:59 xcp4 SM: [2564] File "/opt/xensource/sm/NFSSR", line 296, in attach_from_config 2427-Oct 10 16:02:59 xcp4 SM: [2564] self.sr.attach(sr_uuid) 2487-Oct 10 16:02:59 xcp4 SM: [2564] File "/opt/xensource/sm/NFSSR", line 148, in attach 2573-Oct 10 16:02:59 xcp4 SM: [2564] self._check_hardlinks() 2633-Oct 10 16:02:59 xcp4 SM: [2564] File "/opt/xensource/sm/FileSR.py", line 1122, in _check_hardlinks 2734-Oct 10 16:02:59 xcp4 SM: [2564] self.session.xenapi.SR.remove_from_sm_config( 2816-Oct 10 16:02:59 xcp4 SM: [2564] ``` Because the session is not set during this call. So instead of using the XenAPI to store hardlink support, use a file on the storage itself. Signed-off-by: Ronan Abhamon <[email protected]>
- Loading branch information
Showing
3 changed files
with
54 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +0,0 @@ | ||
class Failure(Exception): | ||
def __init__(self, details): | ||
pass | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters