| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Change-Id: Id470c7a77a47c89118a5d9d0d23b2206d8a839e4
|
|
|
|
|
|
|
|
|
|
| |
This allows you to run `morph deploy` from any Git checkout of
definitions.git.
This also changes `morph help-extensions` to use the DefinitionsRepo
class, as the code overlaps.
Change-Id: I64c48f59c8ec5aebc7169f3b4b4abbb759bd0b9a
|
|
|
|
|
|
| |
Sometimes we don't want a separate mount namespace
Change-Id: I9f2645f552c69090612aecd45104a0320cd436c2
|
|\ |
|
| |
| |
| |
| | |
Change-Id: I992dc0c1d40f563ade56a833162d409b02be90a0
|
|/
|
|
| |
Change-Id: I771c3de9cecda7a503f4d36ae5d9fabc040892e4
|
|
|
|
|
|
|
|
|
| |
This command would use the sysbranchdir.open_from_within() function
call to search for a system branch, which traverses all subdirectories
looking for a directory. This is useful behaviour, but if the user ran
`morph help-extensions` in / it'd traverse their whole filesystem before
returning, which is stupid. This change means it only does the traverse
if it already detected a workspace.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| | |
This stripped out the commit from the patch series on the mailing list
to remove /dev/shm.
Reviewed-by: Sam Thursfield
Reviewed-by: Daniel Silverstone
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
If a build happens, it creates a new network namespace, and if this
happens while you have a disk image mounted, then you can't remove the
mount-point, because the other namespace is using it.
We can avoid the other namespace keeping this mount-point open by
creating the disk image in a private mount namespace, so it never sees
it.
The nicest way to do this is to have every extension run in a private
mount namespace, since you'd have to have extensions re-exec themselves,
since the appropriate system calls aren't exposed very well.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is achieved by passing it the write end of a pipe, so that the
extension has somewhere to write debug messages without clobbering either
stdout or stderr.
Previously deployment extensions could only display status messages on
stdout, which is good for telling the user what is happening but is not
useful when trying to do post-mortem debugging, when more information is
usually required.
This uses the asyncore asynchronous event framework, which is rather
specific to sockets, but can be made to work with file descriptors, and
has the advantage that it's part of the python standard library.
It relies on polling file descriptors, but there's a trick with pipes to
use them as a notification that a process has exited:
1. Ensure the write-end of the pipe is only open in the process you
want to know when it exits
2. Make sure the pipe's FDs are set in non-blocking read/write mode
3. Call select or poll on the read-end of the file descriptor
4. If select/poll says you can read from that FD, but you get an EOF,
then the process has closed it, and if you know it doesn't do that
in normal operation, then the process has terminated.
It took a few weird hacks to get the async_chat module to unregister
its event handlers on EOF, but the result is an event loop that is
asleep until the kernel tells it that it has to do something.
|
|
|
|
|
|
|
|
|
|
|
| |
This was previously used just so it could get the right repo and ref to
read the file out of.
However, there was a subtle bug in this behaviour, as if we had not
previously used morph build in that branch, it would attempt to read the
extensions from a branch which didn't exist.
So now it reads it from the working tree, which always exists.
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
This reverts commit ab0a83a09a93ca33aa402d9c4d3b916a48a1a882.
|
|
|