summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Check for systems in subdirectoriesbaserock/adamcoldrick/chunks-in-defs-with-morph-edit-changesAdam Coldrick2014-04-151-5/+5
| | | | | | Make morph look for system morphologies in subdirectories of the system branch root repository checkout, in case the repository contains all its system morphologies in a specific subdirectory.
* Don't force the morphology name to be the basename of the .morph fileAdam Coldrick2014-04-151-5/+0
|
* Don't check if a morphology exists when loading from cached reposAdam Coldrick2014-04-151-21/+9
| | | | | | When loading a morphology from the repo cache, don't bother doing ls-tree to check if the file exists. Instead just try to cat the file and raise an error if it is empty.
* Use exact filenames to refer to morphology filesAdam Coldrick2014-04-156-13/+14
| | | | | | | | | | Rather than repeatedly stripping and appending an optional .morph extension morphology names, instead always use the file path of the morphology relative to the definitions repository. Also, make the repo and ref of chunk morphology triplets be some branch of the definitions repository, rather than the repo/ref given in the morphology itself (which is the location of the chunk source).
* Make auto-generated chunk morphologies be YAML not JSONAdam Coldrick2014-04-151-5/+3
|
* Make morph edit use a path to a morphology as its only argumentAdam Coldrick2014-04-151-54/+23
| | | | | To edit a chunk, do `morph edit path/to/chunk.morph` where the path is relative to the root of the definitions repository checkout.
* Allow comment, repo and ref fields in chunk morphologiesAdam Coldrick2014-04-151-0/+4
|
* Make morph load chunk morphologies from definitionsAdam Coldrick2014-04-151-2/+23
| | | | | | Rather than traversing chunk triplets using the source repo and ref, use the definitions repository and add the correct triplet to the source pool using the repo and ref from the chunk morphology.
* Merge branch 'sam/distbuild-concurrency-fixes'Sam Thursfield2014-04-1411-60/+87
|\ | | | | | | Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * distbuild: Consistently name all maybe_ message callbacksSam Thursfield2014-04-142-25/+25
| | | | | | | | | | | | | | | | | | There are cases where a state machine handles an event but stays in the same state. A callback is registered which filters messages further before possibly taking action. There have been bugs caused by this pattern being incorrectly implemented (where the callback is expected to filter the message, but a transition takes place anyway). Hopefully a consistent naming convention will make the pattern clearer.
| * distbuild: Make some transitions more specificSam Thursfield2014-04-142-23/+18
| | | | | | | | | | | | There is always one BuildController object per InitiatorConnection. By coupling the objects slightly closer we can simplify some transitions in BuildController.
| * distbuild: Fix possible 'one user disconnecting breaks all builds' issueSam Thursfield2014-04-141-2/+2
| | | | | | | | | | This is similar to the issue fixed by commit c38b77bed86acc8b90f253ce354f3ecf98e475e7.
| * distbuild: Fix 'one build failure causes all concurrent builds to hang'Sam Thursfield2014-04-141-8/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each BuildController instance sets itself up to receive all messages from all workers (via the WorkerConnection instances). In the case of a build failure, all BuildController objects would transition to 'None' state (causing them all to be destroyed) on any WorkerBuildFailed message. This meant that if any one build failed on a distbuild network: - the user whose build actually failed would receive the error messages correctly - any concurrent users would see no further build messages from the controller, making it look like their builds had hung. Ctrl+C from the 'hung' users would still be correctly handled by the controller, as their InitiatorConnection instance would still be alive.
| * distbuild: Clarify InitiatorConnection docstringSam Thursfield2014-04-141-3/+6
| |
| * distbuild: Label state machine transition tablesSam Thursfield2014-04-1411-0/+12
| | | | | | | | Makes it easier to see what they mean at a glance.
| * distbuild: worker-build failure does not indicate an error in the controllerSam Thursfield2014-04-141-1/+1
|/
* Merge branch 'sam/distbuild-logging-improvements'Sam Thursfield2014-04-1413-47/+125
|\ | | | | | | | | Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk> Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * distbuild: Log IPs of initiators and workers in more placesSam Thursfield2014-04-102-32/+31
| | | | | | | | This makes tracking multiple builds through one log file a bit easier.
| * distbuild: Improve logging of connections and objectsSam Thursfield2014-04-1010-8/+94
| | | | | | | | | | | | | | | | | | | | New DistbuildSocket class that wraps socket.socket(), providing a descriptive repr() handler showing where the socket is connected, and providing a couple of helper methods for fetching local and remote endpoint names. This commit also adds a descriptive repr() handler to a few other objects (mostly giving socket connection details).
| * distbuild: Remove debug logging from serialise-artifact codeSam Thursfield2014-04-101-7/+0
| | | | | | | | | | We still log all messages sent to workers, which include the output of the serialise-artifact code in full. There's no need for these status messages.
| * distbuild: Disable extra debugging by defaultSam Thursfield2014-04-102-2/+2
| |
* | Merge branch 'sam/distbuild-gc-fix'Sam Thursfield2014-04-141-6/+14
|\ \ | |/ |/| | | Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * distbuild: Stop workers blowing their entire cache away every timeDaniel Silverstone2014-04-141-6/+14
|/
* Merge branch 'sam/tweak-no-origin-error'Sam Thursfield2014-04-091-6/+8
|\ | | | | | | Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * Tweak some user-facing error messages in 'gitdir'Sam Thursfield2014-04-081-6/+8
|/ | | | | | | | | | | | | | | The default Python __repr__() is useless for both developers and users, so avoid using it in error messages. The following message: ERROR: Push to remote <morphlib.gitdir.Remote object at 0x905096c>, push url None with refspecs (<morphlib.gitdir.RefSpec object at 0xf72fec2c>,) failed with exit code 128 Becomes: ERROR: Push to remote "origin", push url None failed with exit code 128
* Merge branch 'baserock/pedroalvarez/extra-kernel-args'Pedro Alvarez2014-04-041-1/+5
|\
| * Adding support to add extra kernel args in extlinux.confPedro Alvarez2014-04-041-1/+5
|/
* Merge branch 'baserock/adamcoldrick/git-fat-handle-whitespace-rebase'Adam Coldrick2014-04-031-1/+21
|\ | | | | | | | | | | | | | | Signed-off by: Adam Coldrick Reviewed by: Daniel Silverstone <daniel.silverstone@codethink.co.uk> Richard Maw <richard.maw@codethink.co.uk>
| * Escape special characters and handle whitespace in gitattributesbaserock/adamcoldrick/git-fat-handle-whitespace-rebaseAdam Coldrick2014-04-021-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since git's parsing of .gitattributes can't deal with spaces, or even with quotes, replace any whitespace with [[:space:]]. Also, make sure to escape any glob metacharacters to avoid accidental pattern matches. Note: This approach could cause a file "foo<tab>bar" to be treated as a binary if a file "foo bar" has already been added with morph add-binary. However this is as good of a workaround as I can find. Signed-off by: Adam Coldrick
* | Use larger buffer in _relay_exec_outputRichard Ipsum2014-04-011-1/+1
| |
* | Merge remote-tracking branch ↵Lars Wirzenius2014-03-318-75/+246
|\ \ | | | | | | | | | 'origin/baserock/markdoffman/s10617/add-yaml-help-option'
| * | Add help files for nfsboot, rawdisk and tar.baserock/markdoffman/s10617/add-yaml-help-optionMark Doffman2014-04-013-0/+24
| | | | | | | | | | | | | | | | | | Begin adding help documentation for configuration and write extensions starting with nfsboot.write, rawdisk.write and tar.write.
| * | Add write and configuration extensions to help.Mark Doffman2014-03-311-32/+45
| | | | | | | | | | | | | | | | | | Add a command 'help-extensions' to list all extensions. Add the ability to find help on an extension by calling 'morph help [extension name]'.
| * | Add utilities for listing and finding extensions.Mark Doffman2014-03-314-43/+177
|/ / | | | | | | | | | | | | | | | | Add a module to morphlib that can list all write and configuration extensions either in morph itself or the morphology repository. The module also contains methods to find an extension filename from the name and type.
* | Fix _maybe_abort in distbuildRichard Ipsum2014-03-281-1/+1
| |
* | Merge branch 'baserock/danielsilverstone/memoise-cache-keys-better'Daniel Silverstone2014-03-282-10/+36
|\ \ | |/ |/| | | Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
| * CacheKeyComputer Tests: Update to explicitly test for memoisationbaserock/danielsilverstone/memoise-cache-keys-betterDaniel Silverstone2014-03-281-0/+13
| | | | | | | | | | | | | | | | | | | | Explicitly test that we get the same result twice when computing ids and keys for the same artifact. This has the effect of verifying that the memoisation code is correctly operating. Signed-Off-By: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
| * CacheKeyComputer: Memoise cache keys more effectively.Daniel Silverstone2014-03-281-10/+23
|/ | | | | | | | | We were previously memoising the computation of the dictionaries but this patch adds support for memoising the computation of the cache key itself (the SHA string). This massively improves cache key computation performance. Signed-Off-By: Daniel Silverstone <daniel.silverstone@codethink.co.uk>
* Merge branch 'baserock/richardipsum/merge_distbuild'Richard Ipsum2014-03-2736-13/+4703
|\ | | | | | | | | | | | | | | | | | | Conflicts: morphlib/plugins/deploy_plugin.py without-test-modules Reviewed by: Richard Maw Lars Wirzenius
| * UI change: distbuild has its own subcommandRichard Ipsum2014-03-261-7/+39
| |
| * Remove Initiator and InitiatorBuildCommandRichard Ipsum2014-03-261-49/+0
| |
| * Bring InitiatorBuildCommand into buildcommandRichard Ipsum2014-03-261-0/+30
| |
| * Fix deployRichard Ipsum2014-03-261-2/+3
| | | | | | | | | | | | | | | | | | tarfile's open needs the file-like object to have a tell() method, objects returned from sockets don't have this method. So instead we fetch the artifact from the remote and cache it locally
| * Make morph install distbuildRichard Ipsum2014-03-261-3/+3
| |
| * Make InitiatorBuildCommand construct BuildCommandRichard Ipsum2014-03-261-0/+1
| | | | | | | | | | | | | | The constructor for BuildCommand sets up the caches, we want the caches to be set up for distbuild too so that we can deploy a system (system artifact will be fetched from the artifact cache)
| * Transfer all chunk artifacts after they are builtRichard Ipsum2014-03-261-10/+15
| | | | | | | | | | We want to be able to transfer all source artifacts in a single transaction
| * Fix build controllerRichard Ipsum2014-03-261-6/+34
| | | | | | | | | | | | | | | | | | | | Whenever the controller finds a source artifact it wants to build, it changes its state to BUILDING. We build all a chunk's source artifacts in one go. So for any chunk artifact, we change the state of all chunk artifacts that are built from the same source to BUILDING
| * Make serialise work with artifact splittingRichard Ipsum2014-03-261-26/+118
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Serialisation was simple when we only had 1 artifact per source. However, to allow smaller systems, we need artifact splitting to produce multiple artifacts per chunk source. So now the new serialisation format has a separate list of artifacts and sources, rather than the Source being generated from the artifact's serialisation. Python's id() function is used to encode the references between the various Sources and Artifacts, these are replaced with a reference to the new object after deserialisation. Previously the cache-key was used, but this is no longer sufficient to uniquely identify an Artifact. The resultant build graph after deserialisation is a little different to what went in: Strata end up with a different Source per Artifact, so it _is_ a 1 to 1 mapping, as opposed to Chunks, where it's many to 1. We serialise strata and chunks differently because stratum artifacts from the same source can have different dependencies, for example core-devel can have different dependencies to core-runtime. Without intervention we would serialise core-devel and core-devel's dependencies without including core-runtime's dependencies. To solve this we've decided to encode stratum artifacts completely indepedently: each stratum artifact has its own source. This is safe because stratum artifacts can be constructed independently, as opposed to Chunks where all the Artifacts for a Source are produced together. This is a little hacky in its current form, but it simplifies matters later in distbuild with regards to how it handles expressing that every Artifact that shares a Source is built together. Arguably, this should be the output of producing the build graph anyway, since it more helpfully represents which Artifacts are built together than checking the morphology kind all the time, but more assumptions need checking in morph before it's safe to make this change across the whole of the morph codebase.
| * Don't print worker in initiatorRichard Ipsum2014-03-261-2/+0
| | | | | | | | Worker name is not sent in message
| * Fix push_build_branchesRichard Ipsum2014-03-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | A semantic error in the BuildBranch class meant that it was not possible to push temporary branches. This escaped testing since BuildBranch interacts too tightly with other components to be easily unit-tested, so testing was deferred to a yarn test. However, coverage isn't measured in yarn tests, so this code path was forgotten.