Browse Source

Merge "Fix type error on call to mount device" into stable/queens

tags/17.0.12
Zuul 1 month ago
parent
commit
6172009f95
2 changed files with 3 additions and 1 deletions
  1. 2
    0
      nova/tests/unit/virt/disk/mount/test_nbd.py
  2. 1
    1
      nova/virt/disk/mount/api.py

+ 2
- 0
nova/tests/unit/virt/disk/mount/test_nbd.py View File

@@ -259,6 +259,8 @@ class NbdTestCase(test.NoDBTestCase):
259 259
         mount.map_dev = fake_returns_true
260 260
 
261 261
         self.assertFalse(mount.do_mount())
262
+        mock_mount.assert_called_once_with(
263
+                None, None, tempdir, None)
262 264
 
263 265
     @mock.patch('nova.privsep.fs.nbd_connect')
264 266
     @mock.patch('nova.privsep.fs.nbd_disconnect')

+ 1
- 1
nova/virt/disk/mount/api.py View File

@@ -248,7 +248,7 @@ class Mount(object):
248 248
         LOG.debug("Mount %(dev)s on %(dir)s",
249 249
                   {'dev': self.mapped_device, 'dir': self.mount_dir})
250 250
         out, err = nova.privsep.fs.mount(None, self.mapped_device,
251
-                                         self.mount_dir)
251
+                                         self.mount_dir, None)
252 252
         if err:
253 253
             self.error = _('Failed to mount filesystem: %s') % err
254 254
             LOG.debug(self.error)

Loading…
Cancel
Save