summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* WIP fixups for tests with new morph syntax. ./check --full fails, thoughbaserock/ps/simple-edit-syntaxPaul Sherwood2014-06-0823-70/+33
|
* Add messages to help user know what is happeningPaul Sherwood2014-06-081-0/+16
|
* Simplify morph edit syntax and logicPaul Sherwood2014-06-081-124/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since we removed ref: fields from the system morph files, some of the logic in morph edit is no longer needed. In particular, running morph edit <system> <stratum> is a no-op. This is because the version of <system> and <stratum> are now implicit from the context of what we are doing. In other words we're always working with the current version of <system> and <stratum> from the system branch we are in. Because of the complexity of morph's logic, we didn't notice this when dropping the ref: fields, and we missed the opportunity to simplify our logic for 'morph edit' This patch aims to provide the simplest possible implementation of morph edit: morph edit <chunk> It checks all strata for instances of <chunk>, and does what morph edit should do for the instances it finds. A later patch can add warnings to help users deal with situations where <chunk> is not found, or is found more than once. Also since this changes the syntax of morph, it breaks many of our tests. Later patches will address that.
* Make morph gc clear out deployments in tmpdirPaul Sherwood2014-06-071-1/+6
| | | | | | | | Generally deployment temp dirs are removed by morph during deployment, but in some cases deployment dirs may not be cleared up, for example if morph gets a SIGKILL or something unexpected happens that causes morph to terminate without having a chance to cleanup.
* Merge branch 'baserock/richardmaw/S11226/writeext-fstab'Richard Maw2014-06-061-5/+7
|\ | | | | | | | | Reviewed-by: Pedro Alvarez Reviewed-by: Sam Thursfield
| * Use UUID in fstab entries if providedRichard Maw2014-06-041-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Make uuid mandatory when calling create_btrfs_system_layoutRichard Maw2014-06-041-1/+1
| | | | | | | | | | | | | | | | | | | | 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.
* | Update NEWS for Baserock 14.23 releasebaserock-14.23Adam Coldrick2014-06-051-0/+10
| |
* | Merge branch 'sam/list-artifacts'Sam Thursfield2014-06-053-143/+125
|\ \ | | | | | | | | | | | | Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk> Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
| * | Rewrite copy_artifacts plugin as list_artifactsSam Thursfield2014-06-053-143/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The copy-artifacts and list-artifacts commands are mainly useful for making releases. As part of the release process we copy artifacts for the entire build graph of the release to the artifact cache on trove.baserock.org, to provide Baserock users with ready-built artifacts. This part of the release process is now automated, and the automation require the list-artifacts command to function as a 'plumbing' command. The copy-artifacts command is no longer required. It can be replaced with: morph list-artifacts --quiet REPO REF MORPH | rsync --files-from=- $TARGET The previous version of this plugin looked in the system artifact's metadata for the list of artifacts. This is flawed as the final system does not necessarily contain every build dependency. The new version of the plugin calculates the build graph from source, using the same process as the 'buildcommand' module. It also required looking in Morph's artifact cache for the system artifact file to analyse.
* | | Move presence check for job into remove functionRichard Ipsum2014-06-041-6/+6
| | | | | | | | | | | | We always want to warn if we attempt to remove a job that's not present
* | | Add comment to explain the use of _JobFailed eventRichard Ipsum2014-06-041-0/+6
| | |
* | | Merge branch 'baserock/richardipsum/distbuild_state_fix'Richard Ipsum2014-06-041-23/+28
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Reviewed by: Sam Thursfield Adam Coldrick Richard Maw
| * | | Make Jobs finish when caching is completeRichard Ipsum2014-06-031-24/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a new build request makes a request for an artifact that is currently being cached then the artifact will be needlessly rebuilt. To avoid this the new build request should wait for caching to finish. We rename _ExecStarted, _ExecEnded, _ExecFailed to _JobStarted, _JobFinished, _JobFailed and Job's is_building attribute is renamed to running.
| * | | Make job fail if caching failsRichard Ipsum2014-06-031-0/+5
| |/ / | | | | | | | | | | | | This fixes the bug that causes the distbuild controller to crash when population of the artifact cache fails.
* | | Improve error message in _notify_annotation_failedRichard Ipsum2014-06-041-4/+6
| |/ |/|
* | Merge branch 'baserock/richardmaw/S11159/initramfs-support'Richard Maw2014-06-036-8/+128
|\ \ | |/ |/| | | Reviewed-by: Sam Thursfield and Richard Ipsum
| * Add initramfs support to write extensions that produce disksRichard Maw2014-06-024-8/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If INITRAMFS_PATH is specified and the file exists, then the produced kernel command line will use root=UUID=$uuid_of_created_disk rather than root=/dev/sda, which may be incorrect. Help files have been updated to mention the new option. This leads to an unfortunate duplication of the path to the initramfs, in both the location field of the nested deployment and the INITRAMFS_PATH of the disk image creation. However, an initramfs could be produced by a chunk and put in the same place, so it doesn't make sense to couple the rawdisk and initramfs write extensions to remove this duplication. Similarly, there may be multiple valid initramfs in the rootfs e.g. extlinux loads a hypervisor, which is Linux + initramfs, and the initramfs then boots a guest Linux system, which uses a different initramfs. This makes it important to explicitly let the rootfs write extensions know which to use, or not as the case may be. util-linux's blkid is required, since the busybox version ignores the options to filter its output, and parsing the output is undesirable. Because syslinux's btrfs subvolume support is limited to being able to use a non-0 default subvolume, the initramfs has to be copied out of the run-time rootfs subvolume and into the boot subvolume. This pushed the required disk space of a minimal system over the 512M threshold because we do not have the userland tooling support to be able to do a btrfs file contents clone.
| * Add initramfs write extensionRichard Maw2014-06-022-0/+62
|/ | | | | | | | | | | | | | | This creates a gzipped cpio archive that may be used as an initramfs. It is hard-coded to use gzip to compress the initramfs, since it's the most common way to do it. This is unfortunate, since the busybox gzip utility only allows maximum compression, which is rather slow and doesn't give progress reporting, so you can easily think it's gotten stuck. It's possible to use other compression formats, but they need the kernel to be built with them supported, and in the case of lz4, unusual userland tools to create it, since the version of lz4 supported in the kernel is not what the standard lz4 tools produce.
* Update NEWS for Baserock 14.22 releasebaserock-14.22Sam Thursfield2014-05-291-0/+12
|
* Merge remote-tracking branch 'origin/sam/ssh-rsync-check'Sam Thursfield2014-05-232-26/+24
|\ | | | | | | | | Reviewed-By: Richard Maw <richard.maw@codethink.co.uk> Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * deploy: Do sanity checks earlier in ssh-rsync (upgrade) extensionSam Thursfield2014-05-202-26/+24
| |
* | Fix long lineDaniel Silverstone2014-05-161-1/+2
| |
* | Merge branch 'baserock/danielsilverstone/vagrant-support'Daniel Silverstone2014-05-162-8/+16
|\ \ | |/ |/|
| * Fix state subvolume generator to preserve permissionsbaserock/danielsilverstone/vagrant-supportDaniel Silverstone2014-05-161-1/+1
| | | | | | | | | | | | shutil.move() does not preserve permissions, file modes, ownerships etc, resulting in much confusion when prepopulating a non-root user during deployment. This change to `mv` fixes that.
| * VirtualBox Write Extension: Vagrant supportDaniel Silverstone2014-05-161-7/+15
|/ | | | | | | Add support to the VirtualBox write extension to notice if we are doing a Vagrant Basebox installation and not do the clever network setup we normally do to allow machines to talk to one another since this confuses Vagrant quite a bit if it is left in.
* Update NEWS for Baserock 14.20 releasebaserock-14.20Sam Thursfield2014-05-141-0/+22
|
* Update README for Baserock 14.20 releaseSam Thursfield2014-05-141-12/+8
|
* Merge remote-tracking branch 'origin/sam/distbuild-logs-2'Sam Thursfield2014-05-141-0/+1
|\ | | | | | | | | Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk> Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * distbuild: Include .build-log when copying chunk artifacts to the TroveSam Thursfield2014-05-141-0/+1
| | | | | | | | | | Users need to be able to see logs of all builds, not just those that failed.
* | Merge branch 'sam/distbuild-morphology'Sam Thursfield2014-05-141-0/+23
|\ \ | | | | | | | | | Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk>
| * | Add distbuild-morphology command.Sam Thursfield2014-05-141-0/+23
|/ / | | | | | | | | | | | | | | | | This is useful to build releases using distbuild. It avoids having the SHA1 fields in the artifact metadata files pointing to commits that exist only on temporary build branches. It also avoids file:// URLs in the repo fields. Note that the repo URL still points to the Trove used by the distbuild network, rather than being an upstream URL pointing to git.baserock.org.
* | Merge branch 'baserock/richardipsum/build-log-on-stdout-tee2'Richard Ipsum2014-05-146-26/+74
|\ \ | |/ |/| | | | | | | | | Reviewed by: Lars Wirzenius Sam Thursfield Daniel Silverstone
| * Make distbuild put worker logs onto stdoutRichard Ipsum2014-05-141-0/+1
| |
| * Use logfile kwarg to generate build logRichard Ipsum2014-05-141-24/+47
| | | | | | | | | | | | | | | | | | We could just set stdout to subprocess.PIPE then read from the pipe, but then we won't get the output till the command's finished and some commands take a long time. Using the logfile kwarg a file will be created by tee and the output will be written to it in 'real time'.
| * Add logfile kwarg to staging area runcmdRichard Ipsum2014-05-141-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | We use tee to write the output to a file as well as to stdout. Using Popen it should be straight forward to send the output to a pipe and then read that pipe and write to wherever. At the moment morph uses cliapp's runcmd rather than Popen. cliapp's runcmd is a blocking call, so we're not able to read from the pipe until the command has completed, which prevents real time logging to a number of files. One solution to this problem might be to spawn a thread which opens a pipe to the command being executed, the thread then reads from the pipe and writes to our collection of logfiles.
| * Add --build-log-on-stdout flagRichard Ipsum2014-05-141-0/+3
| |
| * Add test for get_source_metadata_filenameRichard Ipsum2014-05-141-0/+11
| |
| * Add get_source_metadata_filenameRichard Ipsum2014-05-141-1/+4
| |
* | Add help for install-files.configureRichard Ipsum2014-05-092-28/+60
|/ | | | | Move the help out of the comment and into a help file, and add a clearer example.
* Merge branch 'baserock/richardipsum/distbuild_cancel2'Richard Ipsum2014-05-073-29/+158
|\ | | | | | | | | | | | | Reviewed by: Richard Maw Lars Wirzenius Daniel Silverstone
| * Add _ExecFailed eventRichard Ipsum2014-05-061-4/+24
| | | | | | | | To cancel jobs cleanly we need to know when a job has failed.
| * Use messages to update job stateRichard Ipsum2014-05-061-3/+24
| |
| * Add cancelling to WorkerBuildSchedulerRichard Ipsum2014-05-061-13/+93
| |
| * Remove unused import and methodRichard Ipsum2014-05-061-3/+0
| | | | | | | | add_initiator() isn't necessary given lists have a remove method.
| * Rename vars in dequeue_eventsRichard Ipsum2014-05-061-2/+2
| |
| * Add cancelling to build controllerRichard Ipsum2014-05-051-7/+19
| |
| * Remove route mapRichard Ipsum2014-04-241-1/+0
| |
* | Fix bad indentationRichard Ipsum2014-05-071-2/+2
| |
* | A more useful morphology syntax error messageRichard Ipsum2014-05-071-4/+3
| | | | | | | | | | There's no longer any need to log the exception separately, it will be logged with the MorphologySyntaxError