Browse Source

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

tags/18.2.2
Zuul 1 month ago
parent
commit
af624f6efe
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

@@ -260,6 +260,8 @@ class NbdTestCase(test.NoDBTestCase):
260 260
         mount.map_dev = fake_returns_true
261 261
 
262 262
         self.assertFalse(mount.do_mount())
263
+        mock_mount.assert_called_once_with(
264
+                None, None, tempdir, None)
263 265
 
264 266
     @mock.patch('nova.privsep.fs.nbd_connect')
265 267
     @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