Skip to content
This repository has been archived by the owner on Apr 3, 2018. It is now read-only.

Commit

Permalink
block: Fix disabling block device use
Browse files Browse the repository at this point in the history
This configuration was added to disable block devices from being
used and using 9p instead. This got lost, add it back.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
  • Loading branch information
amshinde committed Jan 26, 2018
1 parent b2697bd commit 8bd1c5b
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions container.go
Original file line number Diff line number Diff line change
Expand Up @@ -523,12 +523,14 @@ func (c *Container) start() error {
}
defer c.pod.proxy.disconnect()

agentCaps := c.pod.agent.capabilities()
hypervisorCaps := c.pod.hypervisor.capabilities()
if !c.pod.config.HypervisorConfig.DisableBlockDeviceUse {
agentCaps := c.pod.agent.capabilities()
hypervisorCaps := c.pod.hypervisor.capabilities()

if agentCaps.isBlockDeviceSupported() && hypervisorCaps.isBlockDeviceHotplugSupported() {
if err := c.hotplugDrive(); err != nil {
return err
if agentCaps.isBlockDeviceSupported() && hypervisorCaps.isBlockDeviceHotplugSupported() {
if err := c.hotplugDrive(); err != nil {
return err
}
}
}

Expand Down

0 comments on commit 8bd1c5b

Please sign in to comment.