Merge "Bind mount /run into chroot when installing grub"
This commit is contained in:
commit
73208b48b7
@ -30,7 +30,7 @@ from ironic_python_agent import utils
|
|||||||
LOG = log.getLogger(__name__)
|
LOG = log.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
BIND_MOUNTS = ('/dev', '/proc')
|
BIND_MOUNTS = ('/dev', '/proc', '/run')
|
||||||
|
|
||||||
|
|
||||||
def _get_partition(device, uuid):
|
def _get_partition(device, uuid):
|
||||||
|
@ -104,6 +104,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
self.fake_dir + '/dev'),
|
self.fake_dir + '/dev'),
|
||||||
mock.call('mount', '-o', 'bind', '/proc',
|
mock.call('mount', '-o', 'bind', '/proc',
|
||||||
self.fake_dir + '/proc'),
|
self.fake_dir + '/proc'),
|
||||||
|
mock.call('mount', '-o', 'bind', '/run',
|
||||||
|
self.fake_dir + '/run'),
|
||||||
mock.call('mount', '-t', 'sysfs', 'none',
|
mock.call('mount', '-t', 'sysfs', 'none',
|
||||||
self.fake_dir + '/sys'),
|
self.fake_dir + '/sys'),
|
||||||
mock.call(('chroot %s /bin/sh -c '
|
mock.call(('chroot %s /bin/sh -c '
|
||||||
@ -119,6 +121,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir + '/proc',
|
mock.call('umount', self.fake_dir + '/proc',
|
||||||
attempts=3, delay_on_retry=True),
|
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',
|
mock.call('umount', self.fake_dir + '/sys',
|
||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir, attempts=3,
|
mock.call('umount', self.fake_dir, attempts=3,
|
||||||
@ -143,6 +147,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
self.fake_dir + '/dev'),
|
self.fake_dir + '/dev'),
|
||||||
mock.call('mount', '-o', 'bind', '/proc',
|
mock.call('mount', '-o', 'bind', '/proc',
|
||||||
self.fake_dir + '/proc'),
|
self.fake_dir + '/proc'),
|
||||||
|
mock.call('mount', '-o', 'bind', '/run',
|
||||||
|
self.fake_dir + '/run'),
|
||||||
mock.call('mount', '-t', 'sysfs', 'none',
|
mock.call('mount', '-t', 'sysfs', 'none',
|
||||||
self.fake_dir + '/sys'),
|
self.fake_dir + '/sys'),
|
||||||
mock.call(('chroot %s /bin/sh -c '
|
mock.call(('chroot %s /bin/sh -c '
|
||||||
@ -159,6 +165,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir + '/proc',
|
mock.call('umount', self.fake_dir + '/proc',
|
||||||
attempts=3, delay_on_retry=True),
|
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',
|
mock.call('umount', self.fake_dir + '/sys',
|
||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir, attempts=3,
|
mock.call('umount', self.fake_dir, attempts=3,
|
||||||
@ -189,6 +197,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
self.fake_dir + '/dev'),
|
self.fake_dir + '/dev'),
|
||||||
mock.call('mount', '-o', 'bind', '/proc',
|
mock.call('mount', '-o', 'bind', '/proc',
|
||||||
self.fake_dir + '/proc'),
|
self.fake_dir + '/proc'),
|
||||||
|
mock.call('mount', '-o', 'bind', '/run',
|
||||||
|
self.fake_dir + '/run'),
|
||||||
mock.call('mount', '-t', 'sysfs', 'none',
|
mock.call('mount', '-t', 'sysfs', 'none',
|
||||||
self.fake_dir + '/sys'),
|
self.fake_dir + '/sys'),
|
||||||
mock.call('mount', self.fake_efi_system_part,
|
mock.call('mount', self.fake_efi_system_part,
|
||||||
@ -212,6 +222,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir + '/proc',
|
mock.call('umount', self.fake_dir + '/proc',
|
||||||
attempts=3, delay_on_retry=True),
|
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',
|
mock.call('umount', self.fake_dir + '/sys',
|
||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir, attempts=3,
|
mock.call('umount', self.fake_dir, attempts=3,
|
||||||
@ -249,6 +261,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
self.fake_dir + '/dev'),
|
self.fake_dir + '/dev'),
|
||||||
mock.call('mount', '-o', 'bind', '/proc',
|
mock.call('mount', '-o', 'bind', '/proc',
|
||||||
self.fake_dir + '/proc'),
|
self.fake_dir + '/proc'),
|
||||||
|
mock.call('mount', '-o', 'bind', '/run',
|
||||||
|
self.fake_dir + '/run'),
|
||||||
mock.call('mount', '-t', 'sysfs', 'none',
|
mock.call('mount', '-t', 'sysfs', 'none',
|
||||||
self.fake_dir + '/sys'),
|
self.fake_dir + '/sys'),
|
||||||
mock.call('mount', self.fake_efi_system_part,
|
mock.call('mount', self.fake_efi_system_part,
|
||||||
@ -294,6 +308,8 @@ class TestImageExtension(base.IronicAgentTest):
|
|||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir + '/proc',
|
mock.call('umount', self.fake_dir + '/proc',
|
||||||
attempts=3, delay_on_retry=True),
|
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',
|
mock.call('umount', self.fake_dir + '/sys',
|
||||||
attempts=3, delay_on_retry=True),
|
attempts=3, delay_on_retry=True),
|
||||||
mock.call('umount', self.fake_dir, attempts=3,
|
mock.call('umount', self.fake_dir, attempts=3,
|
||||||
|
4
releasenotes/notes/bindmount-run-4c6a31d3ee4e0ed6.yaml
Normal file
4
releasenotes/notes/bindmount-run-4c6a31d3ee4e0ed6.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- |
|
||||||
|
Mounts /run into chroot when installing grub to prevent timeouts.
|
Loading…
Reference in New Issue
Block a user