Merge ~smoser/cloud-init:fix/1404745-growfs-freebsd-y into cloud-init:master

Proposed by Scott Moser
Status: Merged
Approved by: Chad Smith
Approved revision: d8e1fce2dde31834f4204e27c8b16b04c745cf79
Merge reported by: Chad Smith
Merged at revision: fed07fc6cddebcbc3e744926509c362d9e200aeb
Proposed branch: ~smoser/cloud-init:fix/1404745-growfs-freebsd-y
Merge into: cloud-init:master
Diff against target: 26 lines (+2/-2)
2 files modified
cloudinit/config/cc_resizefs.py (+1/-1)
tests/unittests/test_handler/test_handler_resizefs.py (+1/-1)
Reviewer Review Type Date Requested Status
Chad Smith Approve
Server Team CI bot continuous-integration Approve
Harm Weites Pending
Review via email: mp+344024@code.launchpad.net

Commit message

FreeBSD: Invoke growfs on ufs filesystems such that it does not prompt.

By default, FreeBSD's growfs runs interactively asking a question
which can be mitigated using the '-y' command line option. The fix
here is simply to pass -y to growfs to avoid the prompt.

LP: #1404745

Description of the change

see commit message

To post a comment you must log in.
Revision history for this message
Scott Moser (smoser) wrote :

Harm,
I've marked you as the author of this commit.
Its really just a copy of what you did at:
https://code.launchpad.net/~harmw/cloud-init/growfs-gpart-fixes_for_fbsd/+merge/246075

If for some reason you object, please say so.

Revision history for this message
Server Team CI bot (server-team-bot) wrote :

PASSED: Continuous integration, rev:d8e1fce2dde31834f4204e27c8b16b04c745cf79
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1046/
Executed test runs:
    SUCCESS: Checkout
    SUCCESS: Unit & Style Tests
    SUCCESS: Ubuntu LTS: Build
    SUCCESS: Ubuntu LTS: Integration
    SUCCESS: MAAS Compatability Testing
    IN_PROGRESS: Declarative: Post Actions

Click here to trigger a rebuild:
https://jenkins.ubuntu.com/server/job/cloud-init-ci/1046/rebuild

review: Approve (continuous-integration)
Revision history for this message
Chad Smith (chad.smith) wrote :

+1 shows up in the man page and approach seems simple/sane.

review: Approve
Revision history for this message
Chad Smith (chad.smith) wrote :

An upstream commit landed for this bug.

To view that commit see the following URL:
https://git.launchpad.net/cloud-init/commit/?id=fed07fc6

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/cloudinit/config/cc_resizefs.py b/cloudinit/config/cc_resizefs.py
index 82f29e1..2edddd0 100644
--- a/cloudinit/config/cc_resizefs.py
+++ b/cloudinit/config/cc_resizefs.py
@@ -81,7 +81,7 @@ def _resize_xfs(mount_point, devpth):
8181
8282
83def _resize_ufs(mount_point, devpth):83def _resize_ufs(mount_point, devpth):
84 return ('growfs', devpth)84 return ('growfs', '-y', devpth)
8585
8686
87def _resize_zfs(mount_point, devpth):87def _resize_zfs(mount_point, devpth):
diff --git a/tests/unittests/test_handler/test_handler_resizefs.py b/tests/unittests/test_handler/test_handler_resizefs.py
index 7a7ba1f..f92175f 100644
--- a/tests/unittests/test_handler/test_handler_resizefs.py
+++ b/tests/unittests/test_handler/test_handler_resizefs.py
@@ -147,7 +147,7 @@ class TestResizefs(CiTestCase):
147 def test_resize_ufs_cmd_return(self):147 def test_resize_ufs_cmd_return(self):
148 mount_point = '/'148 mount_point = '/'
149 devpth = '/dev/sda2'149 devpth = '/dev/sda2'
150 self.assertEqual(('growfs', devpth),150 self.assertEqual(('growfs', '-y', devpth),
151 _resize_ufs(mount_point, devpth))151 _resize_ufs(mount_point, devpth))
152152
153 @mock.patch('cloudinit.util.get_mount_info')153 @mock.patch('cloudinit.util.get_mount_info')

Subscribers

People subscribed via source and target branches