diff options
author | Zuul <zuul@review.opendev.org> | 2019-05-21 22:54:58 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2019-05-21 22:54:58 +0000 |
commit | a48a585c9be9341c3847095ed88c724e79bebab0 (patch) | |
tree | d6c64e307c93b909be641b6fe40fbfbdac6cc238 | |
parent | a6a46b5ac3d12ceb16eea98ecfb4c3d5914521a0 (diff) | |
parent | 9caea595d2a2c8db60ef3e56312a3a5b7f3a6371 (diff) | |
download | ironic-python-agent-stable/pike.tar.gz |
Merge "Bind mount /run into chroot when installing grub" into stable/pikepike-eolstable/pike
-rw-r--r-- | ironic_python_agent/extensions/image.py | 2 | ||||
-rw-r--r-- | ironic_python_agent/tests/unit/extensions/test_image.py | 10 | ||||
-rw-r--r-- | releasenotes/notes/bindmount-run-4c6a31d3ee4e0ed6.yaml | 4 |
3 files changed, 15 insertions, 1 deletions
diff --git a/ironic_python_agent/extensions/image.py b/ironic_python_agent/extensions/image.py index 2ed2e9fc..0ef04608 100644 --- a/ironic_python_agent/extensions/image.py +++ b/ironic_python_agent/extensions/image.py @@ -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): diff --git a/ironic_python_agent/tests/unit/extensions/test_image.py b/ironic_python_agent/tests/unit/extensions/test_image.py index 047e97b1..232da0a8 100644 --- a/ironic_python_agent/tests/unit/extensions/test_image.py +++ b/ironic_python_agent/tests/unit/extensions/test_image.py @@ -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, diff --git a/releasenotes/notes/bindmount-run-4c6a31d3ee4e0ed6.yaml b/releasenotes/notes/bindmount-run-4c6a31d3ee4e0ed6.yaml new file mode 100644 index 00000000..bdeb00db --- /dev/null +++ b/releasenotes/notes/bindmount-run-4c6a31d3ee4e0ed6.yaml @@ -0,0 +1,4 @@ +--- +fixes: + - | + Mounts /run into chroot when installing grub to prevent timeouts. |