Skip to content

Commit

Permalink
Merge pull request #15 from flyingcircusio/PL-133015-uuid-regen-only-…
Browse files Browse the repository at this point in the history
…during-bootstrap

Only regenerate XFS UUID during bootstrap.
  • Loading branch information
ctheune authored Sep 26, 2024
2 parents 1e8de38 + b5ec86b commit 2723864
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Release notes
1.4.5 (unreleased)
------------------

- Nothing changed yet.
- Only regenerate XFS UUIDs when bootstrapping a VM.


1.4.4 (2024-08-18)
Expand Down
3 changes: 1 addition & 2 deletions src/fc/qemu/hazmat/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@


class Ceph(object):

# Attributes on this class can be overriden in a controlled fashion
# from the sysconfig module. See __init__(). The defaults are here to
# support testing.
Expand Down Expand Up @@ -73,8 +72,8 @@ def ensure_root_volume(self):
if not self.root.exists():
self.log.info("create-vm")
cmd(self.CREATE_VM.format(**self.cfg), self.log)
self.root.regen_xfs_uuid()
self.root.lock()
self.root.regen_xfs_uuid()

def ensure_swap_volume(self):
self.log.info("ensure-swap")
Expand Down
2 changes: 1 addition & 1 deletion src/fc/qemu/tests/vm_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ def test_simple_vm_lifecycle_start_stop(vm):
fc-create-vm> Finished
fc-create-vm> --------
/nix/store/.../bin/fc-create-vm machine=simplevm returncode=0 subsystem=ceph
lock machine=simplevm subsystem=ceph volume=rbd.ssd/simplevm.root
rbd args=-c "/etc/ceph/ceph.conf" --id "host1" map "rbd.ssd/simplevm.root" machine=simplevm subsystem=ceph volume=rbd.ssd/simplevm.root
rbd> /dev/rbd0
rbd machine=simplevm returncode=0 subsystem=ceph volume=rbd.ssd/simplevm.root
Expand All @@ -106,6 +105,7 @@ def test_simple_vm_lifecycle_start_stop(vm):
xfs_admin machine=simplevm returncode=0 subsystem=ceph volume=rbd.ssd/simplevm.root
rbd args=-c "/etc/ceph/ceph.conf" --id "host1" unmap "/dev/rbd/rbd.ssd/simplevm.root" machine=simplevm subsystem=ceph volume=rbd.ssd/simplevm.root
rbd machine=simplevm returncode=0 subsystem=ceph volume=rbd.ssd/simplevm.root
lock machine=simplevm subsystem=ceph volume=rbd.ssd/simplevm.root
ensure-tmp machine=simplevm subsystem=ceph
lock machine=simplevm subsystem=ceph volume=rbd.ssd/simplevm.tmp
rbd args=-c "/etc/ceph/ceph.conf" --id "host1" map "rbd.ssd/simplevm.tmp" machine=simplevm subsystem=ceph volume=rbd.ssd/simplevm.tmp
Expand Down

0 comments on commit 2723864

Please sign in to comment.