Merge ~rjschwei/cloud-init:btrfsResize into cloud-init:master
| Status: | Needs review |
|---|---|
| Proposed branch: | ~rjschwei/cloud-init:btrfsResize |
| Merge into: | cloud-init:master |
| Diff against target: |
176 lines (+95/-8) 4 files modified
cloudinit/config/cc_resizefs.py (+11/-1) cloudinit/tests/test_util.py (+46/-0) cloudinit/util.py (+17/-6) tests/unittests/test_handler/test_handler_resizefs.py (+21/-1) |
| Related bugs: |
| Reviewer | Review Type | Date Requested | Status |
|---|---|---|---|
| Server Team CI bot | continuous-integration | Approve on 2017-12-11 | |
| Scott Moser | 2017-11-28 | Needs Fixing on 2017-12-11 | |
|
Review via email:
|
|||
Commit Message
btrfs: support resizing if root is mounted ro.
Resize of btrfs fails if the mount point for the file system we are trying
to resize, i.e. the root of the filesystem is read only. With this change
we use a known (currently snapper specific) rw location to work around a
flaw that blocks resizing of the ro filesystem.
LP: #1734787
Description of the Change
Resize of btrfs fails if "/" is mounted ro. However, it should be allowed to resize the file system. Use a subvolume that is rw as the mountpoint to trick the tools into letting the filesystem be resized as desired
| Scott Moser (smoser) wrote : | # |
A unit test on this would be nice.
I'm fine if you just test _resize_btrfs that calling it returns the right thing
just make a good comment on it with reference to the bug. Heres an example, placed
in cloudinit/
http://
Also,
a.) it seems like we should check if / is in-fact read-only before taking the alternate path.
b.) knowledge of 'ro' might be useful to pass to *all* the handlers, as if a fs is read-only
taking a different path seems reasonable.
Lastly,
please fix your commit message
Subject
<blank line>
More info.
<blank line>
LP: #1734787
- fbc04d2... by Robert Schweikert on 2017-11-29
- 022503d... by Robert Schweikert on 2017-11-29
| Robert Schweikert (rjschwei) wrote : | # |
@smoser
Did some refactoring and added some tests. Hopefully this is more agreeable now.
W.r.t. the commit message, sorry I am at a loss about what you are after.
PASSED: Continuous integration, rev:66e933e1fe2
https:/
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:/
PASSED: Continuous integration, rev:cfd1ea17887
https:/
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:/
| Scott Moser (smoser) wrote : | # |
This does look good, thank you.
Fix your 'Set commit message' button above to be the right form as I said earlier.
Then, I am also curious about /.snapshots as rharper was.
Sorry for the noob questions he and I just dont' have much experience with brtfs.
| Robert Schweikert (rjschwei) wrote : | # |
Commit message set.
As far as .snapshot is concerned, this is "snapper" [1] related. I think until proven otherwise this will do. The other solution is to walk the subvolumes and find one that's mounted rw. For now I think the subvolume walking is overkill.
- e1348e3... by Robert Schweikert on 2017-12-01
PASSED: Continuous integration, rev:8914a05cdad
https:/
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:/
| Scott Moser (smoser) wrote : | # |
please rebase and address conflicts and one bit about verticle space below.
I think i seems fine after that.
- 09f8aeb... by Robert Schweikert on 2017-12-08
FAILED: Continuous integration, rev:e1348e3c6a7
https:/
Executed test runs:
SUCCESS: Checkout
FAILED: Unit & Style Tests
Click here to trigger a rebuild:
https:/
- 0c12fbf... by Robert Schweikert on 2017-12-08
PASSED: Continuous integration, rev:0c12fbf916e
https:/
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:/
| Scott Moser (smoser) wrote : | # |
I think I'm ok with this if you fix the little comment fixes inline.
- cd9dab4... by Robert Schweikert on 2017-12-11
PASSED: Continuous integration, rev:cd9dab43dad
https:/
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:/
Unmerged commits
- cd9dab4... by Robert Schweikert on 2017-12-11
- 0c12fbf... by Robert Schweikert on 2017-12-08
- 09f8aeb... by Robert Schweikert on 2017-12-08
- e1348e3... by Robert Schweikert on 2017-12-01
- 022503d... by Robert Schweikert on 2017-11-29
- fbc04d2... by Robert Schweikert on 2017-11-29
- 02848e7... by Robert Schweikert on 2017-11-28


PASSED: Continuous integration, rev:6763d7eb536 b9f07e29e4e0325 89cee693be9d0d /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 552/
https:/
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: /jenkins. ubuntu. com/server/ job/cloud- init-ci/ 552/rebuild
https:/