| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
I was getting the following error when running the 'do-release.py'
script:
ERROR:root:Command failed: morph --quiet --trove-host=git.baserock.org list-artifacts baserock:baserock/definitions sam/auto-release minimal-system-x86_32-generic
ERROR: Ref d67a0e110187abd560a1de63fa172894a52839d5 is an invalid reference for repo git://git.baserock.org/delta/linux
The commit that it wants did actually exist in git.baserock.org and the
logs show that Morph hadn't done a `git remote update` to get the commit
locally.
This turned out to be because it'd had already looked up a different ref
in linux.git. It hadn't needed to run 'git remote update', but it *had*
added linux.git to a "don't need to update this repo again" list. Oops!
I've moved the code in question to the cachedrepo module so that the repo
object keeps that of whether it should be updated. The bug is now fixed.
As a side effect this patch fixes the spurious 'Updating repo
file:///...' messages, which were printed even though repos with
file:/// URLs are never updated.
|
| |
|
|\
| |
| |
| |
| |
| |
| | |
'origin/baserock/richardipsum/improve_getmorph_errmsg'
Reviewed-by: Lars Wirzenius
Reviewed-by: Emmet Hikory
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The error message:
ERROR: Failed to determine the build system of repo file://foo/bar/baz at
ref 59713cf997385a094091443fdcce9d5c17313f39: was looking for
distbuild-system-x86-64.morph
is confusing since our system morph has nothing to do with build systems,
the fact that build system autodetection is executed when looking for
distbuild-system-x86-64.morph is an implementation detail that shouldn't be
exposed to the user.
This patch replaces this error message with:
ERROR: Couldn't find morphology: distbuild-system-x86-64.morph
This is still not ideal, since there are cases where we may not be able
find the morph because build system autodection has failed, but out of the
two user typos/mistakes are probably more likely.
Differentiating between user error and build system detection failure would
require more substantial changes.
This patch also splits the get_morphology function into two functions
_get_morphology_text, that actually fetches the morph text from the cache
or otherwise infers it from the build system,
and get_morphology which constructs a Morphology object from the text.
|
|/ |
|
| |
|
|
|
|
|
| |
This error message didn't report the cluster morph at fault.
We also fix a minor formatting issue.
|
|\
| |
| |
| |
| | |
Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk>
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
I found an issue in distbuild where the controller was stuck in a busy
loop where it was continually writing to a closed socket. With 'strace'
I saw write(), SIGPIPE, write(), SIGPIPE, ad infinitum. I got this much
of a Python backtrace using GDB:
distbuild.socketsrc.SocketEventSource.write()
distbuild.sockbuf.SocketBuffer._flush()
distbuild.sm.StateMachine.handle_event()
I didn't manage to get further. However, I suspect one of the state
machine transitions may be creating an event loop instead of correctly
handling the error.
The log file was quiet at this point, the last entries were:
2014-06-19 08:57:36 INFO There seems to be nothing to build
2014-06-19 08:57:36 INFO Requested artifact is built
2014-06-19 08:57:36 DEBUG InitiatorConnection: sent to 10.24.1.215:53818: {'mess
age': 'Need to build 0 artifacts', 'type': 'build-progress', 'id': 790629564}
2014-06-19 08:57:36 DEBUG Notifying initiator of successful build
2014-06-19 08:57:36 DEBUG MainLoop.remove_state_machine: <BuildController at 0xb
6c554c, request-id InitiatorConnection-93>
2014-06-19 08:57:36 DEBUG InitiatorConnection: sent to 10.24.1.215:53818: {'type
': 'build-finished', 'id': 790629564, 'urls': [u'http://hawkdevtrove:8080/1.0/ar
tifacts?filename=861f640923494ca3626bbd65655b350ce1bebea4c0bf7a57693bc06ed122cef
4.system.devel-system-x86_32-chroot-rootfs']}
2014-06-19 08:57:36 DEBUG InitiatorConnection: 10.24.1.215:53818: closing: <Json
Machine at 0xc6cb22c: socket 10.24.1.164:7878 -> 10.24.1.215:53818, max_buffer 1
6384>
2014-06-19 08:57:36 DEBUG MainLoop.remove_state_machine: <InitiatorConnection at 0xc6cbcec: remote 10.24.1.215:53818>
2014-06-19 08:57:36 DEBUG MainLoop.remove_state_machine: <JsonMachine at 0xc6cb22c: socket 10.24.1.164:7878 -> 10.24.1.215:53818, max_buffer 16384>
2014-06-19 08:57:36 DEBUG MainLoop.remove_state_machine: <SocketBuffer at 0xc6cbe2c: socket None max_buffer 16384>
This commit should improve matters a little: in future the log file will show
the ID of the SocketEventSource object and error we hit when calling its
write() function.
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk>
Reviewed-By: Pedro Alvarez <pedro.alvarez@codethink.co.uk>
|
| |/
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When the given ref points to a specific commit, and it's already available in the
locally cached copy of repo, there's no need to update the repo.
If the ref points to a branch or tag, and the user didn't pass --no-git-update, the
locally cached copy of the repo will still be updated.
This should speed up many Morph commands.
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed by: Richard Maw <richard.maw@codethink.co.uk>
Lars Wirzenius <lars.wirzenius@codethink.co.uk>
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Instead of taking the name of a cluster morphology and zero or more
parameters for overriding the cluster morphology, morph deploy should
take the name of a cluster morphology and the names of zero or more
system deployments that are defined in the cluster morphology. If no
deployment names are given then all deployments are deployed.
|
| | | |
|
|/ /
| |
| |
| |
| | |
The names of deployments in cluster morphologies will need to be unique
in order for the deployment of selected systems to work.
|
|/
|
|
|
|
| |
We want to supply the end of options option before
the SYSTEM_INTEGRATION_PATH so that the system integration path
doesn't get interpreted as an option if it happens to begin with a -
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Several reviews; all were happy with the code but not all were sure that
this is the correct approach to take. I have merged, because we need this
change to make Baserock releases easier. We can revisit it in the future
if we want to provide semantic versioning for Morph, instead of our
current "report the version of the containing OS image instead"
approach.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This still (ab)uses 'git describe', in order to get an '-unreproducible'
postfix when the tree has uncommitted changes.
Previously we tagged morph.git with the name of the corresponding
Baserock release that it was to be part of. This made the Baserock
release process awkward. We needed to first create and test the
release images, then (once we knew the version of Morph we were
releasing was good) tag morph.git, and then build all the release
images again so that the new tag would be picked up and the output of
`morph --version` would be correct.
|
|\ \
| | |
| | |
| | | |
Reviewed-By: Lars Wirzenius <lars.wirzenius@codethink.co.uk>
|
| | |
| | |
| | |
| | |
| | |
| | | |
There is code that assumes these exist in at least one place:
StagingArea.abort(). That code should be fixed, but we should also stop
deleting them every time we run 'morph gc'.
|
| |/
|/| |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|\ \
| | |
| | |
| | |
| | |
| | | |
Reviewed by:
Lars Wirzenius
Richard Maw
|
| | |
| | |
| | |
| | |
| | |
| | | |
After a failed attempt to connect to the controller node
the initiator will wait 30 seconds before attempting a reconnect,
if this reconnect fails the initiator gives up.
|
| | | |
|
| | |
| | |
| | |
| | | |
This change is made just for consistency.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The InitiatorConnectionMachine wraps the ConnectionMachine,
so we can continue to use ConnectionMachine without providing
it with an app.
|
|/ /
| |
| |
| |
| |
| |
| | |
By default there is no limit on the number of reconnection attempts.
We make the reconnect_interval a parameter, but the default
interval remains 1 second.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Currently the mainloop unintentionally busy-waits if
we can't connect to the controller.
We want the mainloop's select call to wait for the timeout
not for this socket's descriptors (which are always ready).
We could just call stop_reading() and stop_writing() but since
we won't be needing this socket again we may as well close the
entire event source, which calls stop_reading(), stop_writing()
and then closes the socket.
|
| | |
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk>
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Artifacts can have multiple parts; while this may not be an ideal
design, changing the format of artifacts has implications for backwards
compatibility.
We should transfer all parts at once and delete them all if we encounter
any errors, to reduce the change of getting the local artifact cache
into an inconsistent state.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Previously Morph would check if an artifact is present in the remote
artifact cache, then fetch the necessary files. If an error occured
during fetching, it would raise an error and abort.
Instead, we should just try and fetch the files and if anything fails,
move on to building locally. This avoids the situation where an error in
the remote cache makes local building impossible, which we experienced
recently.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Before:
ERROR: Failed to get metadata meta for the artifact
file:///src/ws-baserock-hawk/baserock/ps/build-system/baserock/baserock/definitions|refs/heads/baserock/builds/778b1a370a1f43c497c1354a2a949de1/56c9ec89d09240fd80faa7d2226b7eda|core|core-devel
from the artifact cache http://git.baserock.org:8080/
After:
ERROR: Failed to get metadata meta for the artifact
f896a081beacd4a99ded38d28b44fbf02970038fb53349265f85f8f3298ead9d.stratum.core-devel
from the artifact cache http://git.baserock.org:8080/
When debugging artifact cache issues, the information that's most
useful is the filename of the artfact.
|
| | |
| | |
| | |
| | | |
This saves from having to catch three separate exceptions.
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
Reviewed-by: Adam Coldrick
Reviewed-by: Pedro Alvarez
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The deploy plugin is relying on existing code which respects the
'no-git-update' setting and updates gits if it is not set.
Since deploy can only work for built systems anyway, we can force this
True for deployments, to avoid wasting the user/caller's time.
|
|\ \ \
| |_|/
|/| |
| | | |
Reviewed-by: Sam Thursfield and Richard Ipsum
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reviewed-By: Adam Coldrick <adam.coldrick@codethink.co.uk>
Reviewed-By: Richard Ipsum <richard.ipsum@codethink.co.uk>
Reviewed-By: Richard Maw <richard.maw@codethink.co.uk>
Reviewed-By: Sam Thursfield <sam.thursfield@codethink.co.uk>
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
- All tests now pass
- The odd case of chunks with the same name but different repo URLs now
correctly informs the user of the multiple checkouts that were done.
- Tidyups
|
| | | | |
|
| | | | |
|
|/ / /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
|/ /
| |
| |
| |
| |
| |
| |
| | |
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.
|