Merge "Bind mount /run into chroot when installing grub" into stable/pike

This commit is contained in:
Zuul 2019-05-21 22:54:58 +00:00 committed by Gerrit Code Review
commit a48a585c9b
3 changed files with 15 additions and 1 deletions

View File

@ -30,7 +30,7 @@ from ironic_python_agent import utils
LOG = log.getLogger(__name__)
BIND_MOUNTS = ('/dev', '/proc')
BIND_MOUNTS = ('/dev', '/proc', '/run')
def _get_partition(device, uuid):

View File

@ -84,6 +84,8 @@ class TestImageExtension(test_base.BaseTestCase):
self.fake_dir + '/dev'),
mock.call('mount', '-o', 'bind', '/proc',
self.fake_dir + '/proc'),
mock.call('mount', '-o', 'bind', '/run',
self.fake_dir + '/run'),
mock.call('mount', '-t', 'sysfs', 'none',
self.fake_dir + '/sys'),
mock.call(('chroot %s /bin/sh -c '
@ -99,6 +101,8 @@ class TestImageExtension(test_base.BaseTestCase):
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir + '/proc',
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir + '/run',
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir + '/sys',
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir, attempts=3,
@ -127,6 +131,8 @@ class TestImageExtension(test_base.BaseTestCase):
self.fake_dir + '/dev'),
mock.call('mount', '-o', 'bind', '/proc',
self.fake_dir + '/proc'),
mock.call('mount', '-o', 'bind', '/run',
self.fake_dir + '/run'),
mock.call('mount', '-t', 'sysfs', 'none',
self.fake_dir + '/sys'),
mock.call('mount', self.fake_efi_system_part,
@ -150,6 +156,8 @@ class TestImageExtension(test_base.BaseTestCase):
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir + '/proc',
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir + '/run',
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir + '/sys',
attempts=3, delay_on_retry=True),
mock.call('umount', self.fake_dir, attempts=3,
@ -187,6 +195,8 @@ class TestImageExtension(test_base.BaseTestCase):
self.fake_dir + '/dev'),
mock.call('mount', '-o', 'bind', '/proc',
self.fake_dir + '/proc'),
mock.call('mount', '-o', 'bind', '/run',
self.fake_dir + '/run'),
mock.call('mount', '-t', 'sysfs', 'none',
self.fake_dir + '/sys'),
mock.call('mount', self.fake_efi_system_part,

View File

@ -0,0 +1,4 @@
---
fixes:
- |
Mounts /run into chroot when installing grub to prevent timeouts.