| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The test suite checks the output of the foreach command, this requires
repositories to be returned in a stable order.
The order returned from os.listdir differs by the filesystem used.
btrfs returns roughly in insertion order, tmpfs alphabetically.
This allowed the failure to sort pass through unchecked, since I was
testing on btrfs, but people discovered issues when using /tmp, which
is a tmpfs.
To fix this, foreach sorts the result of list_git_directories() by
directory name.
The previous code would always return the root repository first, this
was a unnecessary complication, so now everything is returned
asciibetically and the tests amended to reflect this.
|
|/ /
| |
| |
| |
| | |
This snuck in since the test suite could not be run when TMPDIR was
on a tmpfs.
|
|\ \
| |/
|/|
| | |
ssh://git.baserock.org/baserock/baserock/morph
|
|/
|
|
|
|
|
|
|
| |
openstackssh.write: Write extension which deploy a raw image of baserock
directly to an OpenStack machine using python-glanceclient. The raw image
deployed has modified its bootloader to use virtio disks.
vdaboot.configure: Configuration extension to change the mount point of
"/" to use virtio disks (/dev/vda).
|
|\
| |
| |
| |
| |
| |
| | |
git://git.baserock.org/baserock/baserock/morph
Reviewed-by: Lars Wirzenius
Reviewed-by: Jonathan Maw
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous version attempted to separate the output of the commands
run with newlines by printing a newline at the beginning if it wasn't
the first repository.
The check it used was for the first repository was flawed by assuming
that the root repository was the first repository processed.
Since the complication was not worth keeping the output identical, it
has been changed to separate by printing a newline after every command
and the test output has been amended to include the extra trailing
newline.
|
|\
| |
| |
| |
| | |
Reviewed-by: Lars Wirzenius
Reviewed-by: Jonathan Maw
|
| |
| |
| |
| |
| |
| |
| |
| | |
This also amends the test suite.
The git apply command to alter the stratum proved inflexible when
anything changed, so it has been replaced by a small in-line python
script.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The original contents of the morphology is not generally trackable,
comments are lost for example, and it's simpler to output a canonical
format than attempt to preserve everything of the original.
However, we don't want to clutter the output with fields that have
been filled out to be the defaults, so provide a method to remove
fields that are the same as their default.
This also removes a check in set_defaults that it is a valid kind,
since it explicitly declares it assumes the morphology is valid.
|
| |
| |
| |
| |
| | |
It's nicer to get a clean error message explaining what's wrong than a
stack trace.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This reverts commit 2dc382a2a9ae977b1158002cd2631ec5593959c1, reversing
changes made to 89a019af088ff62459699a6efdadf8ac8fe35dd9.
We decided to restore the old commands for the release, as we weren't
confident the new implementations were correct yet.
To gain that confidence we need to use them, so the old versions are no
longer available, and the new edit code is used when the edit subcommand
is invoked.
Doing so also requires the test suite to use the edit command instead of
new-edit.
|
|\ \
| |/
|/|
| | |
'origin/baserock/richardmaw/S8697/fixup-building-ccache'
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The issue is that the tempdir is added at the end of the list of
directories to keep writable, and entries earlier in the list are
subdirectories of tempdir.
The check encountered the subdirs first, so decided it must recurse and
make everything else read-only.
It never got as far as noticing that /tmp was requested writable.
Now, every path is checked for being equal, then checked for being
a subdirectory.
This changed style to use any and generator expressions, as it was more
concise than having an explicit loop for checking equality, then an
explicit loop for checking subdirectory.
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
git://git.baserock.org/baserock/baserock/morph
Reviewed-by: Lars Wirzenius
Reviewed-by: Jonathan Maw
Note: This branch was based off the `baserock/richardmaw/S8646/fix-tests`
branch, so that has also been merged with this commit.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously it would use `git config --get-regex`, which while more
terse, is a little arcane and the regular expression did not account
for slashes or dashes in the option names, and the names usually
correspond to a file path.
Now we use the Submodules class, which validates that the listed commit
is available.
|
| |
| |
| |
| |
| | |
They were missing build depends or were empty.
Now that edit does validation, this is not permitted.
|
| | |
|
|\ \
| |/
|/|
| | |
Reviewed-by: Lars Wirzenius
|
| |
| |
| |
| |
| | |
Somehow this was working on x86 even though it had no ability to
write to tempdirs, but on ARM it wasn't working.
|
| |
| |
| |
| |
| | |
This changes the semantics of the use_chroot flag to instead mean
chrooting to /
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This improves upon the logic by allowing subdirectories to be
marked as writable.
This is not needed in its state here, but it will be built upon.
It also does not attempt to make symlinks read-only, since the symlink
resolution is done before chrooting, so there will be dangling links,
which cause linux-user-chroot to fail during the bootstrap.
This also uses the --chdir option of linux-user-chroot instead of
running a shell script to cd and run the command.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This will list all the paths generated by the walker generator function
that aren't in the specified set.
It removes directories from those returned by the walker, since with
os.walk(topdown=True) this culls the search space.
In the set of provided paths and the set of returned paths, if a directory
is given, then its contents are virtually part of the set.
This oddly specific behaviour is because invert_paths is to be used
with linux-user-chroot to mark subtrees as read-only, when it only
has a set of paths it wants to keep writable.
It takes a walker, rather than being given a path and using os.walk, so
that it is a pure function, so is easier to unit test.
|
| | |
|
|\ \
| | |
| | |
| | | |
Reviewed-by: Daniel Silverstone
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The test suite got adapted so it requires the new edit instead of the
old one. So use the new edit instead of the old one in the test.
This is a kluge, and needs to be reverted after the BR10 release.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Most of the subcommands are available as "old-foo". The exception is
edit, for which we've decided to stick with the old implementation by
default. Thus the new implementation is "new-edit".
This is all meant to be a safety net so that for BR10 we are not stuck
in limbo in case the new implementations are broken in unexpected ways.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
This exposed a bug in yarn: it does not notice when two scenarios have
the same name, and uses the same DATADIR directory for two scenarios.
Oops.
Fixed this by changing one of the scenario names in the Morph test
suite. Yarn itself will be fixed separately.
|
| |
| |
| |
| | |
Patch from Paul Sherwood.
|
|\ \
| | |
| | |
| | | |
A tab fixed
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Although clusters morphologies are still loaded using
the old code, `checkout` in the new branch-and-merge
plugin tries to load and validate the morphology using
morphloader.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
From now on, `morph deploy` will work to only accept a cluster
morphology as argument. A cluster morphology defines a list of
systems to built, and for each system a list of ways to deploy
them. We will not support the old syntax anymore.
- Update `morph deploy` docstring with the new syntax, including
an explanation of cluster morphologies (also document `tar`
deployments).
- Fix tests that used the old syntax.
- Add tests for cluster deployments.
|
| | |
| | |
| | |
| | | |
Add the necessary tests to keep CoverageTestRunner happy.
|
|/ /
| |
| |
| |
| |
| |
| |
| |
| | |
This will be useful in the next commit, where we want
to construct an environment to run a command from a
dictionary.
The cliapp runcmd method expects that the values in this
dictionary are strings, so we need to convert them before.
|
|\ \
| | |
| | |
| | |
| | | |
Reviewed-by: Richard Maw
Reviewed-by: Daniel Silverstone
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
Suggested by Richard Maw
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is a bug fix. The code would previously blithely load the
morphology from the currently checked out ref (plus any local,
uncommitted changes). This is obviously wrong. However, we can't
check out the right ref, either, so the right thing to do is to
"git cat-file" it. But only when the right ref is not checked out.
This is fairly complex behaviour which may not be obvious to users
either. But we'll worry about that later, this is what needs to
happen now, and I don't want to make big behavioural changes in
the middle of a refactoring.
Bug found based on suggestion by Richard Maw.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This is needed when we load morphologies in "morph edit": it needs
to load things differently depending on whether we're loading from
the currently checked out ref or not.
The new method does not have a unit test, because I'm betting that
the test would not find a real bug. The test would just set up a
git repo and check whether the right ref is checked out in a couple
of ways (it is, and it isn't), and the code is simple enough that
it's unlikely to break the test. Creating the test, however, is a
fair bit of work. What the test would not catch is when we need the
method to do something quite different, but then we'll want a new
method anyway.
|
| | |
| | |
| | |
| | | |
Suggested by Richard Maw
|
| | |
| | |
| | |
| | | |
Suggested by Richard Maw
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The old code, which MorphologyLoader will replace, allows build-mode
test as well as bootstrap, so the new code needs to do that too.
Suggested by Richard Maw.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't have a real name for the dict that tells us what chunk
(or stratum) to use in a stratum (or system). The code was sometimes
using spec, and sometimes info. It now uses spec always.
Suggested by Richard Maw
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The new name is more descriptive, since it turns out that the
method doesn't just parse strings, but also open file handles.
Suggested by Richard Maw.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
It turns out the yaml module can handle strings directly, and does
not need explicit file handles.
Suggested by Richard Maw.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
To the best of my ability to understand the old "morph build" code, these
tests fail with this error:
Conflicting versions of stratum 'hello-stratum' appear in the build.
because of how the old "morph build" code creates temporary build refs,
and gets them wrong. I believe the new "morph edit" is correct, but have
not been able to find out what the root problem in "morph build" is,
because the code is beyond my ability to understand it within two hours.
Since I have a deadline for "morph edit", I reluctantly disable these
tests, temporarily, rather than back out of all "morph edit" changes.
|
| | |
| | |
| | |
| | |
| | | |
morph merge works badly enough that we don't really support it right now,
and I don't have time to tweak "morph edit" to make the tests pass.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
We don't know if we want to support keeping system and stratum
morphologies in different git repositories, and adding the support is too
much work for this deadline. I'm keeping the tests, but disabling them,
in case we want to enable it again.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
I shouldn't be doing this in the middle of refactoring, but trying to
get the new code to emit exactly the right kind of JSON is too much pain,
and these tests need to be rewritten to use YAML in the near future anyway
(we'll drop JSON support eventually), so I don't want to spend more time
on this than necessary.
The changes in this commit convert morphologies in JSON to YAML, and
fix test code that modifies the morphologies to work with the YAML.
There is probably more JSON lurking about.
|