| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
systemd is moving towards having /usr to be vendor operating system only,
whilst /etc will be used for configuration only
(the contents of this directory could be erased to do a factory reset) [1].
/usr/lib is the recommended place to place this file [2]
[1] http://0pointer.net/blog/projects/stateless.html
[2] http://www.freedesktop.org/software/systemd/man/os-release.html
This has been reported by Tiago Gomes
Change-Id: I58dd711fac162751a71e8a7d9c65ce9583a23cc7
|
|
|
|
|
|
| |
Also attr doesnt depend on automake to build
Change-Id: Ied3ba4af7991c44ed080362a8dae5d00092e5514
|
|
|
|
|
|
|
|
|
| |
Some of the extensions had extraneous imports, and a couple didn't
import things they used. The same bug as in the kvm deployment
extension existed in the virtualbox deployment extension, and is
fixed in this commit.
Change-Id: I2bd8169818ce5444af522c135a9e0326c1212ce2
|
|
|
|
|
|
|
|
| |
Deployment to kvm got broken by the patch to remove dependencies
on morphlib and cliapp. This commit fixes the issues that were
introduced.
Change-Id: Iface1b38e638be4d84cf86b434ee30e1fffc34a0
|
|
|
|
|
|
| |
This script helps developers to share logs via paste.baserock.org
Change-Id: I22b255c90e0b42a4b65dea41ec196ae92577a7f8
|
|
|
|
| |
Change-Id: Ifaaced5256ce7aeca786118a2075c991b3fa103f
|
|
|
|
|
|
|
|
|
| |
"OpenStackClient (aka OSC) is a command-line client for OpenStack that
brings the command set for Compute, Identity, Image, Object Store and
Volume APIs together in a single shell with a uniform command
structure."
Change-Id: Icf3200e99100f46e5d8044844232025e7bada75d
|
|
|
|
| |
Change-Id: Iffce1a4c25965ca4d7e635534fab16d0e8ccb39b
|
|\
| |
| |
| |
| |
| |
| |
| | |
This stops the deployment extensions from depending on morphlib
and cliapp, as well as setting the definitions version to 5.
Reviewed-by: Sam Thursfield <sam.thursfield@codethink.co.uk>
Reviewed-by: Paul Sherwood <paul.sherwood@codethink.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This is done by either copying some utility functions from morph
into writeexts.py, and using the `subprocess` module rather than
cliapp's runcmd and ssh_runcmd.
Note that this means that these extensions will require
"$definitions_checkout/extensions" in PYTHONPATH when they are
run.
This commit also updates VERSION to 5, since the PYTHONPATH
requirement means that this change is incompatible with old
versions of morph.
Change-Id: Iec6fa7e3c7219619ce55e18493e5c37c36e97816
|
| |
| |
| |
| | |
Change-Id: I46ed5f3ec85f9662bebac592eff7a6eb6d628f28
|
| |\
| | |
| | |
| | | |
This merge commit adds the history of the two scripts as well.
|
| | |
| | |
| | |
| | | |
Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
|
| | |
| | |
| | |
| | |
| | | |
os.read is limited to an int in size. copy_slice_from_file was trying
to os.read more than that causing an OverflowError.
|
| | | |
|
| | | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The KVM and VirtualBox deployments use sparse files for raw disk
images. This means they can store a large disk (say, tens or hundreds
of gigabytes) without using more disk space than is required for the
actual content (e.g., a gigabyte or so for the files in the root
filesystem). The kernel and filesystem make the unwritten parts of the
disk image look as if they are filled with zero bytes. This is good.
However, during deployment those sparse files get transferred as if
there really are a lot of zeroes. Those zeroes take a lot of time to
transfer. rsync, for example, does not handle large holes efficiently.
This change introduces a couple of helper tools (morphlib/xfer-hole
and morphlib/recv-hole), which transfer the holes more efficiently.
The xfer-hole program reads a file and outputs records like these:
DATA
123
binary data (exaclyt 123 bytes and no newline at the end)
HOLE
3245
xfer-hole can do this efficiently, without having to read through all
the zeroes in the holes, using the SEEK_DATA and SEEK_HOLE arguments
to lseek.
Using this, the holes take only take a few bytes each, making it
possible to transfer a disk image faster. In my benchmarks,
transferring a 100G byte disk image took about 100 seconds for KVM,
and 220 seconds for VirtualBox (which needs to more work at the
receiver to convert the raw disk to a VDI). Both benchmarks were from
a VM on my laptop to the laptop itself.
The interesting bit here is that the receiver (recv-hole) is simple
enough that it can be implemented in a bit of shell script, and the
text of the shell script can be run on the remote end by giving it to
ssh as a command line argument. This means there is no need to install
any special tools on the receiver, which makes using this improvement
much simpler.
|
| |
| |
| |
| | |
Change-Id: I7f3702e80678aeee89dd22116510a6d8d7e04841
|
| |
| |
| |
| | |
Change-Id: I6eb8fe69416bbf483ffa8c1c317c8f8cea56ef0e
|
| |\
| | |
| | |
| | |
| | |
| | | |
This is only used by write extensions, all of which are now in
definitions. This merge commit also adds all the history of the
writeexts.py file from morphlib.
|
| | |\ |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
I accidentally tried to deploy a Baserock upgrade to a Fedora cloud
machine. Every SSH command that Morph ran got the following output:
Please login as the user "fedora" rather than the user "root".
The existing implementation of check_ssh_connectivity() didn't raise
an exception, leading to confusing errors further down.
The new implementation produces this error:
ERROR: Unexpected output from remote machine: Please login as the
user "fedora" rather than the user "root".
Change-Id: Ida5a82b25d759167aa842194b0d833d0565b4acf
|
| | |\ \ |
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: Ibda7a938cd16e35517a531140f39ef4664d85c72
|
| | |\ \ \
| | | |/ /
| | |/| |
| | | | |
| | | | | |
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
|
| | | | |
| | | | |
| | | | |
| | | | | |
Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
|
| | |\ \ \
| | | |/ /
| | |/| | |
|
| | | |/
| | | |
| | | |
| | | | |
Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
|
| | |/
| | |
| | |
| | | |
Change-Id: I771c3de9cecda7a503f4d36ae5d9fabc040892e4
|
| | |\
| | | |
| | | |
| | | |
| | | |
| | | | |
Reviewed-By: Paul Sherwood <paul.sherwood@codethink.co.uk>
Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk>
|
| | | | |
|
| | |/ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Since the version of btrfs-progs in the Baserock reference system
definitions was updated to v3.18.2, Morph has produced unbootable
x86 systems. This is down to lack of support for new Btrfs features
in SYSLINUX.
This patch disables the new features so that deployed systems will boot.
Although I generally don't want to have compatibility code in Morph,
this patch keeps support for the old mkfs.btrfs (which doesn't support
the commandline options that we need to pass to new mkfs.btrfs). This
will hopefully save people from suffering 'I need to use new Morph to
upgrade my devel system, but new Morph doesn't run on my devel system'.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
parameters
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This way we can still use create_local_system to create
a raw disk, but also reuse bits of it to be able e.g. to
deploy to devices.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
This way when deploying to a device it will format
it without asking the user if the device already
has format.
|
| | | |
|
| | |
| | |
| | |
| | |
| | | |
The upstream cliapp project is not interested in this functionality
right now.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously logging was disabled for Python deploy extensions.
We get a lot of useful information for free in the log file by
doing this: the environment will be written when the subprocess starts,
and if it crashes the full backtrace will be written there too. Subcommand
execution with cliapp.runcmd() will also be logged.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove the BOOTLOADER environment variable and instead favour
BOOTLOADER_CONFIG_FORMAT to set the desired bootloader format, and
BOOTLOADER_INSTALL to set the type of bootloader to install.
For example, since u-boot can boot using extlinux.conf files, it's
conceivable that someone might want to do CONFIG_FORMAT=extlinux.conf,
INSTALL=u-boot.
However, for most platforms you would want to set INSTALL to "none"
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
If btrfs is not present in the kernel we end up with strange output like
this:
Error creating disk image2014-06-10 16:00:40
[devel-system-x86_64-generic][my-raw-disk-image][rawdisk.write]Failure
to create disk image at /src/tmp/testdev.img
ERROR: Command failed: mount -o loop /src/tmp/testdev.img
/src/tmp/deployments/tmpQ7wXO1/tmp4lVDcu/tmpvHSzDE
mount: mounting /dev/loop0 on
/src/tmp/deployments/tmpQ7wXO1/tmp4lVDcu/tmpvHSzDE failed: Device or
resource busy
To avoid this confusing error, Morph should explicitly check first.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This makes systems use the UUID of the disk in the fstab when there is
no pre-existing fstab entry for /.
This happens whether the system has an initramfs or not, since it should
be harmless, and by this point we're in userland, so can know what the
UUIDs are.
Passing the UUID to `complete_fstab_for_btrfs_layout` is optional, and
defaults to the old behaviour of using /dev/sda, since it is called
directly by some write extensions for doing upgrades, and upgrading
systems that use an initramfs will be part of a later patch.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It's only ever called from the core of the write extensions library, so
we can change it to be mandatory in all cases.
install_extlinux is left with the uuid being optional and defaulting to
/dev/sda, since it is called directly from the rawdisk write extension
currently, and upgrades of systems that have an initramfs will be part
of a later patch series.
|