libvirt/docs
Eric Farman c733e97323 docs: Fix XML schema handling of LUN address in hostdev tag
Defining a domain with a SCSI disk attached via a hostdev
tag and a source address unit value longer than two digits
causes an error when editing the domain with virsh edit,
even if no changes are made to the domain definition.
The error suggests invalid XML, somewhere:

  # virsh edit lmb_guest
  error: XML document failed to validate against schema:
  Unable to validate doc against /usr/local/share/libvirt/schemas/domain.rng
  Extra element devices in interleave
  Element domain failed to validate content

The virt-xml-validate tool fails with a similar error:

  # virt-xml-validate lmb_guest.xml
  Relax-NG validity error : Extra element devices in interleave
  lmb_guest.xml:17: element devices: Relax-NG validity error :
  Element domain failed to validate content
  lmb_guest.xml fails to validate

The hostdev tag requires a source address to be specified,
which includes bus, target, and unit address attributes.
According to the SCSI Architecture Model spec (section
4.9 of SAM-2), a LUN address is 64 bits and thus could be
up to 20 decimal digits long.  Unfortunately, the XML
schema limits this string to just two digits.  Similarly,
the target field can be up to 32 bits in length, which
would be 10 decimal digits.

  # lsscsi -xx
  [0:0:19:0x4022401100000000]  disk    IBM      2107900          3.44 /dev/sda
  # lsscsi
  [0:0:19:1074872354]disk    IBM      2107900          3.44  /dev/sda
  # cat lmb_guest.xml
  <domain type='kvm'>
    <name>lmb_guest</name>
    <memory unit='MiB'>1024</memory>
  ...trimmed...
    <devices>
      <controller type='scsi' model='virtio-scsi' index='0'/>
      <hostdev mode='subsystem' type='scsi'>
        <source>
          <adapter name='scsi_host0'/>
          <address bus='0' target='19' unit='1074872354'/>
        </source>
      </hostdev>
  ...trimmed...

Since the reference unit and target fields are used in
several places in the XML schema, create a separate one
specific for SCSI Logical Units that will permit the
greater length.  This permits both the validation utility
and the virsh edit command to succeed when a hostdev
tag is included.

Signed-off-by: Eric Farman <farman@linux.vnet.ibm.com>
Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com>
Reviewed-by: Stefan Zimmermann <stzi@linux.vnet.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>
2015-06-22 16:15:49 -04:00
..
api_extension xen_xs: name xendConfigVersion magic numbers 2012-02-01 16:28:17 -07:00
devhelp maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
html maint: consolidate several .gitignore files 2012-02-03 15:27:16 -07:00
internals Move daemon-related parts of virNetServer to virNetDaemon 2015-06-16 13:46:19 +02:00
schemas docs: Fix XML schema handling of LUN address in hostdev tag 2015-06-22 16:15:49 -04:00
32favicon.png * docs/site.xsl docs/*.png docs/*.html: update the images from Diana, 2006-01-23 22:55:41 +00:00
404.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
acl.html.in docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
aclpolkit.html.in doc: fix mismatched ACL attribute name 2014-11-07 10:49:39 +01:00
api_extension.html.in maint: improve VIR_ERR_INVALID_CONN usage 2014-01-06 21:41:02 -07:00
api.html.in docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
apibuild.py Add XML files with admin API specification 2015-06-16 13:46:20 +02:00
apps.html.in docs: Add Host sFlow into monitoring apps 2015-04-02 16:05:32 +02:00
archdomain.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
architecture.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
architecture.gif * docs/architecture.* docs/*: added a section on the architecture 2005-12-21 16:59:34 +00:00
architecture.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
archnetwork.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
archnode.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
archstorage.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
auditlog.html.in audit: Audit smartcard devices 2014-07-07 12:56:45 +02:00
auth.html.in Add documentation for access control system 2013-08-09 17:13:02 +01:00
bindings.html.in docs: Fix docs about python bindings package 2015-01-19 14:50:52 +01:00
bugs.html.in Fix common misspellings 2015-03-23 09:01:30 +01:00
cgroups.html.in docs: cgroups: fix typo about LXC cgroups 2014-03-27 06:52:20 -06:00
compiling.html.in build: honor autogen.sh --no-git 2013-07-09 16:15:29 -06:00
contact.html.in Fix common misspellings 2015-03-23 09:01:30 +01:00
csharp.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
deployment.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
devguide.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
docs.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
downloads.html.in docs: update github project name 2015-05-26 15:07:18 +01:00
drivers.html.in bhyve: add basic documentation 2014-03-01 23:44:58 +04:00
drvbhyve.html.in drvbhyve: Use boot-order for grub-bhyve boot device 2014-11-13 15:40:48 +01:00
drvesx.html.in typos: fix s/it/is/ where applicable 2014-05-05 11:49:36 +02:00
drvhyperv.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvlxc.html.in docs: fix a typo in drvlxc 2014-10-06 13:15:31 +02:00
drvopenvz.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvparallels.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvphyp.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvqemu.html.in Fix docs generator regression in previous commit 2013-05-03 16:58:46 +01:00
drvremote.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvtest.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
drvuml.html.in docs: typo fix 2014-03-03 17:41:26 +04:00
drvvbox.html.in Move VirtualBox driver into libvirtd 2013-05-16 16:28:53 +01:00
drvvmware.html.in VMware: Initial VMware Fusion support 2013-09-29 18:40:36 +08:00
drvxen.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
errors.html.in docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
et.png * docs/Makefile.am docs/et.png docs/libvirt.css docs/page.xsl 2008-04-28 08:29:35 +00:00
firewall.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
footer_corner.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
footer_pattern.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
format.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
formatcaps.html.in docs: mention more about older capability feature bits 2014-07-14 06:11:34 -06:00
formatdomain.html.in docs: Fix XML schema handling of LUN address in hostdev tag 2015-06-22 16:15:49 -04:00
formatdomaincaps.html.in formatdomaincaps: Correctly format API reference 2015-01-13 16:31:14 +01:00
formatnetwork.html.in docs: clarify nat range behavior 2015-02-18 15:36:45 +01:00
formatnode.html.in maint: remove incorrect apostrophes from 'its' 2015-06-04 10:01:42 +02:00
formatnwfilter.html.in nwfilter: Add support for icmpv6 filtering 2015-01-07 11:41:49 -05:00
formatsecret.html.in docs: remove <auth> from secret XML format 2014-02-14 16:47:14 +01:00
formatsnapshot.html.in Visually separate snapshot disk subelements 2015-04-13 14:05:23 +02:00
formatstorage.html.in storage: Generate correct parameters for CIFS 2015-06-15 17:25:47 -04:00
formatstorageencryption.html.in docs: fix encryption format attribute in example 2014-09-10 09:25:40 +02:00
genaclperms.pl Add documentation for access control system 2013-08-09 17:13:02 +01:00
generic.css Remove unnecessary empty first lines 2014-06-06 10:52:05 +02:00
goals.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
governance.html.in Fix minor typo in governance doc 2014-02-04 10:43:15 -07:00
hacking1.xsl maint: tweak use of <a> in HACKING 2013-07-09 11:49:20 -06:00
hacking2.xsl maint: tweak use of <a> in HACKING 2013-07-09 11:49:20 -06:00
hacking.html.in maint: document use of zanata for translations 2015-06-10 15:26:44 -06:00
hooks.html.in qemu: hook: Provide hook when restoring a domain save image 2014-09-22 17:11:56 +02:00
hvsupport.pl docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
index.html.in bhyve: add basic documentation 2014-03-01 23:44:58 +04:00
index.py Test for object identity when checking for None in Python 2013-08-23 08:12:26 +02:00
internals.html.in Move daemon-related parts of virNetServer to virNetDaemon 2015-06-16 13:46:19 +02:00
intro.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
java.html.in docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
library.xen remove all trailing blank lines 2009-07-16 15:06:42 +02:00
libvirt-daemon-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-daemon-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-driver-arch.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-driver-arch.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-header-bg.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-header-logo.png Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
libvirt-net-logical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-logical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-net-physical.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-net-physical.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-object-model.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
libvirt-object-model.png build: regenerate .png files 2012-07-23 16:07:13 -06:00
libvirt-virConnect-example.fig internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
libvirt-virConnect-example.png internals: Update to include RPC and Lock links and add new data 2013-03-04 17:36:03 -05:00
libvirt.css Remove unnecessary empty first lines 2014-06-06 10:52:05 +02:00
libvirtLogo404.png Add a custom 404 error page for the website 2012-06-18 20:10:29 +01:00
libvirtLogo.png * //* : renamed the project libvirt , this affects all makefiles, 2006-02-09 17:45:11 +00:00
locking-lockd.html.in docs: add page about virtlockd setup 2015-02-17 13:59:54 +00:00
locking-sanlock.html.in docs: split out sanlock setup docs 2015-02-17 13:59:19 +00:00
locking.html.in docs: add page about virtlockd setup 2015-02-17 13:59:54 +00:00
logging.html.in Remove global log buffer feature entirely 2014-03-18 14:29:22 +00:00
madeWith.png * //* : renamed the project libvirt , this affects all makefiles, 2006-02-09 17:45:11 +00:00
main.css Split website out into one file per page. APply new layout and styling 2008-04-23 17:08:31 +00:00
Makefile.am Add XML files with admin API specification 2015-06-16 13:46:20 +02:00
migration-managed-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-managed-p2p.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-managed-p2p.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-native.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-native.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-tunnel.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-tunnel.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration-unmanaged-direct.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
migration-unmanaged-direct.png Add documentation about migration. 2011-10-28 10:07:45 +01:00
migration.html.in Fix minor typos in messages and docs 2013-07-30 07:07:33 -06:00
newapi.xsl docs: generate links from plain text documentation 2013-10-30 17:30:12 +01:00
news.html.in Release of libvirt-1.2.16 2015-06-01 10:30:29 +08:00
news.xsl Convert NEWS to UTF-8 2009-07-29 09:04:21 +01:00
node.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
node.gif * doc/*: augment and try to complete the doc in its current state 2006-01-23 13:24:07 +00:00
page.xsl docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
pending.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
php.html.in docs: php: remove reference to Red Hat 2015-06-04 10:00:59 +02:00
python.html.in docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
relatedlinks.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
remote.html.in Fix typos in various docs 2013-12-02 10:21:26 +08:00
search.php.code.in docs: autogenerate search.php 2012-08-10 10:58:38 +02:00
search.php.in Repair the search on libvirt.org 2013-09-12 17:18:32 +08:00
secureusage.html.in Add some notes about secure usage of libvirt 2013-10-15 11:33:01 +01:00
securityprocess.html.in Fix common misspellings 2015-03-23 09:01:30 +01:00
site.xsl Fix docs generator regression in previous commit 2013-05-03 16:58:46 +01:00
sitemap.html.in docs: add page about virtlockd setup 2015-02-17 13:59:54 +00:00
storage.html.in storage: Generate correct parameters for CIFS 2015-06-15 17:25:47 -04:00
structures.fig Remove trailing whitespace from all xfig files 2011-10-28 10:11:16 +01:00
subsite.xsl virCommand: docs for usage of new command APIs 2010-12-02 16:00:47 -07:00
testapi.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
testsuites.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
testtck.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
todo.cfg-example Add automatic generation of a todo item page 2010-10-12 11:26:52 +01:00
todo.pl Fix namespace bugs in API docs, todo page & hv support page 2013-05-07 11:19:04 +01:00
uri.html.in docs: Correct invalid hyperlinks 2014-12-02 07:30:10 +01:00
virshcmdref.html.in Fix multiple formatting problems in HTML docs 2013-05-03 15:56:15 +01:00
windows.html.in Point users to Virt-Viewer MSI installers for Windows builds 2013-05-07 15:29:37 +01:00
wrapstring.xsl Generate HACKING from docs/hacking.html.in 2010-11-12 19:47:20 +01:00