Skip to content

Commit

Permalink
CA-253490 Add missing error codes
Browse files Browse the repository at this point in the history
The Dummy SR driver had a couple of incorrect error codes. Add one,
and adjust the other to something which exists.

Add an error code for "NoRootDev", as used in drivers/util.py

Note the error codes in the XML are not sorted in any particular order.

Signed-off-by: Tim Smith <tim.smith@citrix.com>
  • Loading branch information
TimSmithCtx committed Nov 6, 2023
1 parent e6d0aed commit a957460
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/DummySR.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ def check_no_other_vdi_operation_in_progress(self):
if len(active_vdis) != 0:
msg = "LVHDRT: found other operations in progress for VDI: %s" % active_vdis[0]['uuid']
util.SMlog(msg)
raise xs_errors.XenError('OtherVDIOperationInProgress')
raise xs_errors.XenError('VDIInUse')

def get_attached_vbds(self):
vdi_ref = self.session.xenapi.VDI.get_by_uuid(self.uuid)
Expand Down
10 changes: 10 additions & 0 deletions drivers/XE_SR_ERRORCODES.xml
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,11 @@
<description>Root system device, cannot be used for VM storage</description>
<value>105</value>
</code>
<code>
<name>NoRootDev</name>
<description>Root system device not found</description>
<value>118</value>
</code>
<code>
<name>InvalidIQN</name>
<description>The IQN provided is an invalid format</description>
Expand Down Expand Up @@ -764,6 +769,11 @@
<description>Gave up on leaf coalesce after leaf grew bigger than before snapshot taken</description>
<value>204</value>
</code>
<code>
<name>VBDListNotStable</name>
<description>LVHDRT: found a non-stable VBD</description>
<value>205</value>
</code>

<code>
<name>XMLParse</name>
Expand Down

0 comments on commit a957460

Please sign in to comment.