]> git.ipfire.org Git - thirdparty/libvirt.git/commit
conf: Add SCSI hostdev check for disk drive address already in use
authorJohn Ferlan <jferlan@redhat.com>
Wed, 12 Aug 2015 19:30:45 +0000 (15:30 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Wed, 12 Aug 2015 19:40:00 +0000 (15:40 -0400)
commit8d46386bfe01b84982e25e915ad9cfbae5cf4cb1
tree0395baad6c88c92e8792613506ff6aca4cbee9c9
parent69a3b0df2ddba98d4fcbfa5d188894575c242643
conf: Add SCSI hostdev check for disk drive address already in use

https://bugzilla.redhat.com/show_bug.cgi?id=1210587  (partial)

If a SCSI subsystem <hostdev> element address is provided, we need to
make sure the address provided doesn't conflict with an existing or
libvirt generated address for a SCSI <disk> element. We can handle
this condition in device post processing since we're not generating an
address based on some target name - rather it's either generated based
on space or provided from the user. If the user provides one that conflicts,
then we need to disallow the change.

This will fix the issue where the domain XML provided an <address> for
the <hostdev>, but not the <disk> element where the address provided
ends up being the same address used for the <disk>. A <disk> address
is generated using it's assigned <target> 'dev' name prior to the
check/validation of the <hostdev> address value.
src/conf/domain_conf.c